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

Skip to content

Commit 3992f5c

Browse files
committed
make ut_runner to fail if non-existent schema is provided or provided package is not a suite package
1 parent 8366919 commit 3992f5c

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

source/core/ut_suite_manager.pkb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ create or replace package body ut_suite_manager is
411411
for i in 1 .. l_paths.count loop
412412
l_path := l_paths(i);
413413
l_schema := regexp_substr(l_path, '^(\w+)(\.|:|$)', 1, 1, null, 1);
414+
415+
l_schema := sys.dbms_assert.schema_name(upper(l_schema));
414416

415417
l_schema_suites := get_schema_suites(upper(l_schema));
416418

@@ -434,6 +436,11 @@ create or replace package body ut_suite_manager is
434436
l_procedure_name := regexp_substr(l_path, '^\w+\.(\w+)(\.(\w+))?$', subexpression => 3);
435437

436438
l_temp_suite := config_package(l_schema, l_package_name);
439+
440+
if l_temp_suite is null then
441+
raise_application_error(ut_utils.gc_suite_package_not_found,'Suite package '||l_schema||'.'||l_package_name|| ' not found');
442+
end if;
443+
437444
l_path := rtrim(l_schema || ':' || l_temp_suite.path || '.' || l_procedure_name, '.');
438445
end;
439446
end if;

source/core/ut_utils.pks

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ create or replace package ut_utils authid definer is
4949
gc_invalid_path_format constant pls_integer := -20202;
5050
pragma exception_init(ex_invalid_path_format, -20202);
5151

52+
ex_suite_package_not_found exception;
53+
gc_suite_package_not_found constant pls_integer := -20204;
54+
pragma exception_init(ex_suite_package_not_found, -20204);
55+
5256
-- Reporting event time not supported
5357
ex_invalid_rep_event_time exception;
5458
gc_invalid_rep_event_time constant pls_integer := -20210;

0 commit comments

Comments
 (0)