Skip to content

Commit 2c0b2d0

Browse files
committed
Refactored tests to comply with new schema layout
1 parent 725d367 commit 2c0b2d0

54 files changed

Lines changed: 2117 additions & 2117 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ev
55
git rev-parse && cd "$(git rev-parse --show-cdup)"
66

77
time utPLSQL-cli/bin/utplsql run ${UT3_TESTER_HELPER}/${UT3_TESTER_HELPER_PASSWORD}@${CONNECTION_STR} \
8-
-source_path=source -owner=ut3 \
8+
-source_path=source -owner=ut3_develop \
99
-p='ut3_tester,ut3$user#' \
1010
-test_path=test -c \
1111
-f=ut_coverage_sonar_reporter -o=coverage.xml \

test/ut3_tester/core/annotations/test_annot_throws_exception.pkb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ is
88
l_package_spec varchar2(32737);
99
l_package_body varchar2(32737);
1010
l_exception_spec varchar2(32737);
11-
l_test_results ut3.ut_varchar2_list;
11+
l_test_results ut3_develop.ut_varchar2_list;
1212
begin
1313
l_exception_spec := q'[
1414
create or replace package exc_pkg is
@@ -251,9 +251,9 @@ is
251251
execute immediate l_package_body;
252252

253253

254-
select * bulk collect into l_test_results from table(ut3.ut.run(('annotated_package_with_throws')));
254+
select * bulk collect into l_test_results from table(ut3_develop.ut.run(('annotated_package_with_throws')));
255255

256-
g_tests_results := ut3.ut_utils.table_to_clob(l_test_results);
256+
g_tests_results := ut3_develop.ut_utils.table_to_clob(l_test_results);
257257
end;
258258

259259
procedure throws_same_annotated_except is

test/ut3_tester/core/annotations/test_annotation_cache.pkb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ create or replace package body test_annotation_cache is
66
begin
77
open l_actual_cache_info for
88
select *
9-
from ut3.ut_annotation_cache_info
9+
from ut3_develop.ut_annotation_cache_info
1010
where object_owner = 'UT3_CACHE_TEST_OWNER';
1111
open l_expected_cache_info for
1212
select 'UT3_CACHE_TEST_OWNER' as object_owner, upper( column_value ) as object_name
@@ -395,7 +395,7 @@ create or replace package body test_annotation_cache is
395395

396396
procedure t_ut_owner_cannot_run_tests is
397397
begin
398-
cant_run_any_packages( 'ut3' );
398+
cant_run_any_packages( 'ut3_develop' );
399399
cache_populated_for_packages( ut_varchar2_rows( 'GRANTED_TEST_SUITE', 'NOT_GRANTED_TEST_SUITE' ) );
400400
end;
401401

test/ut3_tester/core/annotations/test_annotation_manager.pkb

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -101,41 +101,41 @@ create or replace package body test_annotation_manager is
101101
begin
102102
select max(cache_id)
103103
into l_actual_cache_id
104-
from ut3.ut_annotation_cache_info
104+
from ut3_develop.ut_annotation_cache_info
105105
where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_PACKAGE'
106106
and parse_time >= a_start_date;
107107
ut.expect(l_actual_cache_id).to_be_not_null;
108108

109109
open l_actual for
110110
select annotation_position, annotation_name, annotation_text, subobject_name
111-
from ut3.ut_annotation_cache where cache_id = l_actual_cache_id
111+
from ut3_develop.ut_annotation_cache where cache_id = l_actual_cache_id
112112
order by annotation_position;
113113

114114
ut.expect(l_actual).to_be_empty();
115115
end;
116116

117117
procedure assert_dummy_test_package(a_start_time timestamp) is
118118
l_actual_cache_id integer;
119-
l_data ut3.ut_annotated_objects;
119+
l_data ut3_develop.ut_annotated_objects;
120120
l_result sys_refcursor;
121121
l_actual sys_refcursor;
122122
l_expected sys_refcursor;
123123
begin
124124
open l_expected for
125125
select
126-
ut3.ut_annotated_object(
126+
ut3_develop.ut_annotated_object(
127127
sys_context('USERENV', 'CURRENT_USER'),
128128
'DUMMY_TEST_PACKAGE', 'PACKAGE', a_start_time,
129-
ut3.ut_annotations(
130-
ut3.ut_annotation( 2, 'suite', 'dummy_test_suite', null ),
131-
ut3.ut_annotation( 3, 'rollback', 'manual', null ),
132-
ut3.ut_annotation( 7, 'test', 'dummy_test', 'some_dummy_test_procedure' ),
133-
ut3.ut_annotation( 8, 'beforetest', 'some_procedure', 'some_dummy_test_procedure' )
129+
ut3_develop.ut_annotations(
130+
ut3_develop.ut_annotation( 2, 'suite', 'dummy_test_suite', null ),
131+
ut3_develop.ut_annotation( 3, 'rollback', 'manual', null ),
132+
ut3_develop.ut_annotation( 7, 'test', 'dummy_test', 'some_dummy_test_procedure' ),
133+
ut3_develop.ut_annotation( 8, 'beforetest', 'some_procedure', 'some_dummy_test_procedure' )
134134
)
135135
) annotated_object
136136
from dual;
137137

138-
l_result := ut3.ut_annotation_manager.get_annotated_objects(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE', a_start_time);
138+
l_result := ut3_develop.ut_annotation_manager.get_annotated_objects(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE', a_start_time);
139139
fetch l_result bulk collect into l_data;
140140
open l_actual for select value(x) as annotated_object from table(l_data) x where object_name = 'DUMMY_TEST_PACKAGE';
141141
ut.expect(l_actual).to_equal(l_expected).exclude('ANNOTATED_OBJECT/PARSE_TIME').join_by('ANNOTATED_OBJECT/OBJECT_NAME');
@@ -153,7 +153,7 @@ create or replace package body test_annotation_manager is
153153
--Assert
154154
select max(cache_id)
155155
into l_actual_cache_id
156-
from ut3.ut_annotation_cache_info
156+
from ut3_develop.ut_annotation_cache_info
157157
where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE';
158158

159159
ut.expect(l_actual_cache_id).to_be_null;
@@ -185,7 +185,7 @@ create or replace package body test_annotation_manager is
185185
--Act
186186
annotation_cache_helper.enable_ddl_trigger();
187187
l_start_date := sysdate;
188-
ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
188+
ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
189189
--Assert
190190
assert_dummy_test_package(l_start_date);
191191
assert_dummy_package(l_start_date);
@@ -197,7 +197,7 @@ create or replace package body test_annotation_manager is
197197
--Arrange
198198
open l_actual for
199199
select *
200-
from ut3.ut_annotation_cache_info
200+
from ut3_develop.ut_annotation_cache_info
201201
where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_PACKAGE';
202202

203203
ut.expect(l_actual).to_be_empty();
@@ -207,7 +207,7 @@ create or replace package body test_annotation_manager is
207207
--Assert
208208
open l_actual for
209209
select *
210-
from ut3.ut_annotation_cache_info
210+
from ut3_develop.ut_annotation_cache_info
211211
where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_PACKAGE';
212212

213213
ut.expect(l_actual).to_be_empty();
@@ -233,7 +233,7 @@ create or replace package body test_annotation_manager is
233233
--Assert
234234
open l_actual for
235235
select *
236-
from ut3.ut_annotation_cache_info
236+
from ut3_develop.ut_annotation_cache_info
237237
where object_owner = sys_context('USERENV', 'CURRENT_USER')
238238
and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE';
239239

@@ -247,7 +247,7 @@ create or replace package body test_annotation_manager is
247247
--Arrange
248248
create_dummy_test_package();
249249
l_start_date := sysdate;
250-
ut3.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE');
250+
ut3_develop.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE');
251251
--Act & Assert
252252
assert_dummy_test_package(l_start_date);
253253
end;
@@ -273,7 +273,7 @@ create or replace package body test_annotation_manager is
273273

274274
--Assert
275275
ut.expect(
276-
ut3.ut_annotation_manager.get_annotated_objects(
276+
ut3_develop.ut_annotation_manager.get_annotated_objects(
277277
sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time
278278
),
279279
'Annotations are empty after package was dropped'
@@ -287,7 +287,7 @@ create or replace package body test_annotation_manager is
287287
create_dummy_package();
288288
--Act & Assert
289289
ut.expect(
290-
ut3.ut_annotation_manager.get_annotated_objects(
290+
ut3_develop.ut_annotation_manager.get_annotated_objects(
291291
sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time
292292
),
293293
'Annotations are empty for not annotated package'
@@ -300,7 +300,7 @@ create or replace package body test_annotation_manager is
300300
--Arrange
301301
create_dummy_package();
302302
ut.expect(
303-
ut3.ut_annotation_manager.get_annotated_objects(
303+
ut3_develop.ut_annotation_manager.get_annotated_objects(
304304
sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time
305305
),
306306
'Annotations are empty for non annotated package'
@@ -311,7 +311,7 @@ create or replace package body test_annotation_manager is
311311

312312
--Assert
313313
ut.expect(
314-
ut3.ut_annotation_manager.get_annotated_objects(
314+
ut3_develop.ut_annotation_manager.get_annotated_objects(
315315
sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time
316316
),
317317
'Annotations are empty after non annoteted package was dropped'
@@ -332,7 +332,7 @@ create or replace package body test_annotation_manager is
332332

333333
--Assert
334334
ut.expect(
335-
ut3.ut_annotation_manager.get_annotated_objects(
335+
ut3_develop.ut_annotation_manager.get_annotated_objects(
336336
sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time
337337
)
338338
).to_be_empty();
@@ -346,7 +346,7 @@ create or replace package body test_annotation_manager is
346346
procedure some_dummy_test_procedure;
347347
end;]');
348348
ut.expect(
349-
ut3.ut_annotation_manager.get_annotated_objects(
349+
ut3_develop.ut_annotation_manager.get_annotated_objects(
350350
sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time
351351
)
352352
).to_be_empty();
@@ -365,23 +365,23 @@ create or replace package body test_annotation_manager is
365365
l_start_date date;
366366
begin
367367
--Arrange
368-
ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
368+
ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
369369
l_start_date := sysdate;
370370
modify_dummy_test_package();
371371
--Act
372-
ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
372+
ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
373373
--Assert
374374
select max(cache_id)
375375
into l_actual_cache_id
376-
from ut3.ut_annotation_cache_info
376+
from ut3_develop.ut_annotation_cache_info
377377
where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE'
378378
and parse_time >= l_start_date;
379379

380380
ut.expect(l_actual_cache_id).to_be_not_null;
381381

382382
open l_actual for
383383
select annotation_position, annotation_name, annotation_text, subobject_name
384-
from ut3.ut_annotation_cache where cache_id = l_actual_cache_id
384+
from ut3_develop.ut_annotation_cache where cache_id = l_actual_cache_id
385385
order by annotation_position;
386386

387387
open l_expected for
@@ -407,7 +407,7 @@ create or replace package body test_annotation_manager is
407407
--Assert
408408
select count(1)
409409
into l_cache_count
410-
from ut3.ut_annotation_cache_info
410+
from ut3_develop.ut_annotation_cache_info
411411
where object_owner = sys_context('USERENV', 'CURRENT_USER')
412412
and object_type = 'PACKAGE'
413413
and object_name = 'DUMMY_TEST_PACKAGE'
@@ -417,14 +417,14 @@ create or replace package body test_annotation_manager is
417417

418418
procedure no_data_for_dropped_object is
419419
l_result sys_refcursor;
420-
l_data ut3.ut_annotated_objects;
420+
l_data ut3_develop.ut_annotated_objects;
421421
l_actual sys_refcursor;
422422
l_start_time timestamp := systimestamp;
423423
begin
424424
--Arrange
425425
drop_dummy_test_package();
426426
--Act
427-
l_result := ut3.ut_annotation_manager.get_annotated_objects( sys_context('USERENV', 'CURRENT_USER'),'PACKAGE', l_start_time );
427+
l_result := ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context('USERENV', 'CURRENT_USER'),'PACKAGE', l_start_time );
428428
fetch l_result bulk collect into l_data;
429429
open l_actual for select object_name from table(l_data) where object_name = 'DUMMY_TEST_PACKAGE';
430430
--Assert
@@ -435,14 +435,14 @@ create or replace package body test_annotation_manager is
435435
l_cache_count integer;
436436
begin
437437
--Arrange
438-
ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
438+
ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
439439
drop_dummy_test_package();
440440
--Act
441-
ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
441+
ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE');
442442
--Assert
443443
select count(1)
444444
into l_cache_count
445-
from ut3.ut_annotation_cache_info
445+
from ut3_develop.ut_annotation_cache_info
446446
where object_owner = sys_context('USERENV', 'CURRENT_USER')
447447
and object_type = 'PACKAGE'
448448
and object_name = 'DUMMY_TEST_PACKAGE';
@@ -457,7 +457,7 @@ create or replace package body test_annotation_manager is
457457
--Arrange
458458
create_dummy_test_package();
459459
l_start_date := sysdate;
460-
ut3.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE');
460+
ut3_develop.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE');
461461
--Act & Assert
462462
assert_dummy_test_package(l_start_date);
463463
end;

0 commit comments

Comments
 (0)