Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 858a675

Browse files
committed
Fixing broken test.
Adding test: reporters/test_coverage/test_html_extended_reporter reporters/test_extended_coverage
1 parent c508e79 commit 858a675

8 files changed

Lines changed: 36 additions & 7 deletions

File tree

.travis/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ grant create public database link to $UT3_TESTER_HELPER;
8686
grant drop public database link to $UT3_TESTER_HELPER;
8787
set feedback on
8888
--Needed for testing coverage outside of main UT3 schema.
89-
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary to $UT3_TESTER_HELPER;
89+
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary, create any synonym, drop any synonym to $UT3_TESTER_HELPER;
9090
grant create job to $UT3_TESTER_HELPER;
9191
exit
9292
SQL

test/ut3_tester/core/test_ut_test.pkb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,16 @@ create or replace package body test_ut_test is
404404
ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error);
405405
end;
406406

407+
procedure create_synonym is
408+
begin
409+
ut3_tester_helper.ut_example_tests.create_synonym;
410+
end;
411+
412+
procedure drop_synonym is
413+
begin
414+
ut3_tester_helper.ut_example_tests.drop_synonym;
415+
end;
416+
407417
procedure owner_name_null is
408418
--Arrange
409419
l_test ut3.ut_test := ut3.ut_test(

test/ut3_tester/core/test_ut_test.pks

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ create or replace package test_ut_test is
5050
--%test(Fails when owner name invalid)
5151
procedure owner_name_invalid;
5252

53-
--TODO: FIX that
53+
54+
procedure create_synonym;
55+
procedure drop_synonym;
56+
5457
--%test(Runs test as current schema when owner name null)
55-
--%disabled
58+
--%beforetest(create_synonym)
59+
--%aftertest(drop_synonym)
5660
procedure owner_name_null;
5761

5862
procedure create_invalid_package;

test/ut3_tester_helper/ut_example_tests.pkb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
create or replace package body ut_example_tests
22
as
3-
3+
procedure create_synonym is
4+
pragma autonomous_transaction;
5+
begin
6+
execute immediate 'create or replace synonym ut3_tester.ut_example_tests for ut3_tester_helper.ut_example_tests';
7+
end;
8+
9+
procedure drop_synonym is
10+
pragma autonomous_transaction;
11+
begin
12+
execute immediate 'drop synonym ut3_tester.ut_example_tests';
13+
end;
14+
415
procedure set_g_number_0 as
516
begin
617
g_number := 0;

test/ut3_tester_helper/ut_example_tests.pks

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
create or replace package ut_example_tests is
22
g_number number;
3+
4+
procedure create_synonym;
5+
procedure drop_synonym;
6+
37
procedure set_g_number_0;
48
procedure add_1_to_g_number;
59
procedure failing_procedure;

test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ create or replace package body test_html_extended_reporter is
1313
bulk collect into l_results
1414
from table(
1515
ut3.ut.run(
16-
a_path => 'ut3.test_dummy_coverage',
16+
a_path => 'ut3.test_block_dummy_coverage',
1717
a_reporter=> ut3.ut_coverage_html_reporter(),
1818
a_source_files => ut3.ut_varchar2_list( 'test/ut3.dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long.pkb' ),
1919
a_test_files => ut3.ut_varchar2_list( ),

test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
create or replace package test_html_extended_reporter is
22

33
--%suite(ut_html_extended_reporter)
4-
--%suitepath(utplsql.test_user.reporters.test_coverage.test_extended_coverage)
4+
--%suitepath(utplsql.test_user.reporters.test_extended_coverage)
55

66
--%test(reports on a project file mapped to database object in extended profiler coverage)
77
procedure report_on_file;

test/ut3_user/reporters/test_extended_coverage.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
create or replace package test_extended_coverage is
22

33
--%suite
4-
--%suitepath(utplsql.test_user.reporters.test_coverage)
4+
--%suitepath(utplsql.test_user.reporters)
55

66
--%beforeall
77
procedure setup_dummy_coverage;

0 commit comments

Comments
 (0)