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

Skip to content

Fixed issue with get_Cached_suite_rows syntax. #978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/core/ut_suite_cache_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ create or replace package body ut_suite_cache_manager is
l_cache_rows ut_suite_cache_rows;
l_results ut_suite_items_info;
begin
l_cache_rows := get_cached_suite_rows( a_object_owner, a_object_name );
l_cache_rows := get_cached_suite_rows( a_object_owner => a_object_owner, a_object_name =>a_object_name );
select ut_suite_item_info(
c.object_owner, c.object_name, c.name,
c.description, c.self_type, c.line_no,
Expand Down
10 changes: 9 additions & 1 deletion test/ut3_tester_helper/run_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ create or replace package body run_helper is
begin
execute immediate q'[create or replace package ut3$user#.dummy_test_package as
--%suite(dummy_test_suite)
--%suitepath(some.path)
--%rollback(manual)

--%test(dummy_test)
Expand All @@ -24,14 +25,21 @@ create or replace package body run_helper is
null;
end;]';

execute immediate q'[grant execute on ut3_tester_helper.dummy_test_procedure to public]';
execute immediate q'[grant execute on ut3_tester_helper.dummy_test_procedure to public]';

execute immediate q'[create or replace package ut3$user#.bad_test_package as
--%rollback(manual)
--%test(dummy_test)
procedure some_dummy_test_procedure;
end;]';
end;

procedure setup_cache_objectstag is
pragma autonomous_transaction;
begin
execute immediate q'[create or replace package ut3$user#.dummy_test_package as
--%suite(dummy_test_suite)
--%suitepath(some.path)
--%tags(dummy)
--%rollback(manual)

Expand Down
37 changes: 29 additions & 8 deletions test/ut3_user/api/test_ut_runner.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,22 @@ end;';
select
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'dummy_test_package' path, 0 disabled_flag,null tags
'some.path.dummy_test_package' path, 0 disabled_flag,null tags
from dual union all
select
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 5 item_line_no,
'dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,null tags
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,null tags
from dual union all
select
'UT3$USER#' object_owner, 'PATH' object_name, 'PATH' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some.path' path, 0 disabled_flag, null tags
from dual union all
select
'UT3$USER#' object_owner, 'SOME' object_name, 'SOME' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some' path, 0 disabled_flag, null tags
from dual;
--Act
open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE'));
Expand All @@ -289,12 +299,22 @@ end;';
select
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'dummy_test_package' path, 0 disabled_flag,'dummy' tags
'some.path.dummy_test_package' path, 0 disabled_flag,'dummy' tags
from dual union all
select
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
'dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,'testtag' tags
'dummy_test' item_description, 'UT_TEST' item_type, 7 item_line_no,
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,'testtag' tags
from dual union all
select
'UT3$USER#' object_owner, 'PATH' object_name, 'PATH' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some.path' path, 0 disabled_flag, null tags
from dual union all
select
'UT3$USER#' object_owner, 'SOME' object_name, 'SOME' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some' path, 0 disabled_flag, null tags
from dual;
--Act
open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE'));
Expand Down Expand Up @@ -562,7 +582,8 @@ end;';
procedure is_test_false is
begin
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', 'BAD' ) ).to_be_false();
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', null ) ).to_be_false();
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','BAD_TEST_PACKAGE', 'some_dummy_test_procedure' ) ).to_be_false();
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', null ) ).to_be_false();
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#',null,'some_dummy_test_procedure' ) ).to_be_false();
ut.expect( ut3.ut_runner.is_test( null,'DUMMY_TEST_PACKAGE','some_dummy_test_procedure' ) ).to_be_false();
end;
Expand All @@ -584,12 +605,12 @@ end;';
ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#','BAD' ) ).to_be_false();
ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#', null ) ).to_be_false();
ut.expect( ut3.ut_runner.is_suite( null,'DUMMY_TEST_PACKAGE' ) ).to_be_false();
ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#','bad_test_package' ) ).to_be_false();
end;

procedure has_suites_true is
begin
ut.expect( ut3.ut_runner.has_suites( a_owner => 'UT3$USER#' ) ).to_be_true();

ut.expect( ut3.ut_runner.has_suites( 'ut3$user#' ) ).to_be_true();
end;

Expand Down