Skip to content

Commit a62a6f1

Browse files
committed
Removed public grants for:
- `ut_coverage` - `ut_coverage_options` - `ut_coverage_helper`
1 parent c7b802f commit a62a6f1

15 files changed

+191
-193
lines changed

source/create_synonyms_and_grants_for_public.sql

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ grant execute on &&ut3_owner..ut_runner to public;
3737
grant execute on &&ut3_owner..ut_file_mappings to public;
3838
grant execute on &&ut3_owner..ut_file_mapping to public;
3939
grant execute on &&ut3_owner..ut_file_mapper to public;
40-
grant execute on &&ut3_owner..ut_key_value_pairs to public;
41-
grant execute on &&ut3_owner..ut_key_value_pair to public;
4240
grant execute on &&ut3_owner..ut_suite_items_info to public;
4341
grant execute on &&ut3_owner..ut_suite_item_info to public;
4442

43+
--generic types
44+
grant execute on &&ut3_owner..ut_varchar2_list to public;
45+
grant execute on &&ut3_owner..ut_varchar2_rows to public;
46+
grant execute on &&ut3_owner..ut_integer_list to public;
47+
grant execute on &&ut3_owner..ut_key_value_pairs to public;
48+
grant execute on &&ut3_owner..ut_key_value_pair to public;
49+
4550
--expectations
4651
grant execute on &&ut3_owner..ut_expectation to public;
4752
grant execute on &&ut3_owner..ut_expectation_compound to public;
@@ -63,37 +68,30 @@ grant execute on &&ut3_owner..ut_equal to public;
6368
grant execute on &&ut3_owner..ut_have_count to public;
6469
grant execute on &&ut3_owner..ut_match to public;
6570

66-
--generic types
67-
grant execute on &&ut3_owner..ut_varchar2_list to public;
68-
grant execute on &&ut3_owner..ut_varchar2_rows to public;
69-
grant execute on &&ut3_owner..ut_integer_list to public;
7071

71-
--reporters
72-
grant execute on &&ut3_owner..ut_debug_reporter to public;
72+
--reporters - test results
7373
grant execute on &&ut3_owner..ut_teamcity_reporter to public;
7474
grant execute on &&ut3_owner..ut_xunit_reporter to public;
7575
grant execute on &&ut3_owner..ut_junit_reporter to public;
7676
grant execute on &&ut3_owner..ut_tfs_junit_reporter to public;
7777
grant execute on &&ut3_owner..ut_documentation_reporter to public;
78+
grant execute on &&ut3_owner..ut_sonar_test_reporter to public;
79+
grant execute on &&ut3_owner..ut_realtime_reporter to public;
80+
--reporters - coverage
7881
grant execute on &&ut3_owner..ut_coverage_html_reporter to public;
7982
grant execute on &&ut3_owner..ut_coverage_sonar_reporter to public;
8083
grant execute on &&ut3_owner..ut_coveralls_reporter to public;
8184
grant execute on &&ut3_owner..ut_coverage_cobertura_reporter to public;
82-
grant execute on &&ut3_owner..ut_realtime_reporter to public;
83-
grant execute on &&ut3_owner..ut_sonar_test_reporter to public;
85+
--reporters - debug
86+
grant execute on &&ut3_owner..ut_debug_reporter to public;
8487

85-
--reporters base
88+
--reporters - base types
8689
grant execute on &&ut3_owner..ut_reporters to public;
8790
grant execute on &&ut3_owner..ut_reporter_base to public;
8891
grant execute on &&ut3_owner..ut_output_reporter_base to public;
8992
grant execute on &&ut3_owner..ut_coverage_reporter_base to public;
9093
grant execute on &&ut3_owner..ut_console_reporter_base to public;
9194

92-
--coverage
93-
grant execute on &&ut3_owner..ut_coverage to public;
94-
grant execute on &&ut3_owner..ut_coverage_options to public;
95-
grant execute on &&ut3_owner..ut_coverage_helper to public;
96-
9795
--outputs
9896
grant execute on &&ut3_owner..ut_output_data_row to public;
9997
grant execute on &&ut3_owner..ut_output_data_rows to public;
@@ -105,17 +103,17 @@ grant execute on &&ut3_owner..ut_output_clob_table_buffer to public;
105103
grant select, insert, update, delete on &&ut3_owner..ut_compound_data_tmp to public;
106104
grant select, insert, update, delete on &&ut3_owner..ut_compound_data_diff_tmp to public;
107105

106+
--needed for selecting from annotation objects
107+
grant execute on &&ut3_owner..ut_annotation_objs_cache_info to public;
108+
grant execute on &&ut3_owner..ut_annotation_obj_cache_info to public;
109+
108110
--other grants
109111
grant execute on &&ut3_owner..ut_executables to public;
110112
grant execute on &&ut3_owner..ut_executable_test to public;
111113
grant select on &&ut3_owner..ut_suite_cache to public;
112114
grant select on &&ut3_owner..ut_suite_cache_package to public;
113115
grant select on &&ut3_owner..ut_suite_cache_schema to public;
114116

115-
--needed for selecting from annotation objects
116-
grant execute on &&ut3_owner..ut_annotation_objs_cache_info to public;
117-
grant execute on &&ut3_owner..ut_annotation_obj_cache_info to public;
118-
119117
grant select, insert, delete, update on &&ut3_owner..dbmspcc_blocks to public;
120118
grant select, insert, delete, update on &&ut3_owner..dbmspcc_runs to public;
121119
grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to public;
@@ -126,10 +124,28 @@ grant execute on &&ut3_owner..ut_run_info to public;
126124

127125
prompt Creating synonyms for UTPLSQL objects in &&ut3_owner schema to PUBLIC
128126

127+
--public API
128+
create public synonym ut for &&ut3_owner..ut;
129+
create public synonym ut_runner for &&ut3_owner..ut_runner;
130+
create public synonym ut_file_mappings for &&ut3_owner..ut_file_mappings;
131+
create public synonym ut_file_mapping for &&ut3_owner..ut_file_mapping;
132+
create public synonym ut_file_mapper for &&ut3_owner..ut_file_mapper;
133+
create public synonym ut_suite_items_info for &&ut3_owner..ut_suite_items_info;
134+
create public synonym ut_suite_item_info for &&ut3_owner..ut_suite_item_info;
135+
136+
--generic types
137+
create public synonym ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
138+
create public synonym ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
139+
create public synonym ut_integer_list for &&ut3_owner..ut_integer_list;
140+
create public synonym ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
141+
create public synonym ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
142+
143+
--expectations
129144
create public synonym ut_expectation for &&ut3_owner..ut_expectation;
130145
create public synonym ut_expectation_compound for &&ut3_owner..ut_expectation_compound;
131146
create public synonym ut_expectation_json for &&ut3_owner..ut_expectation_json;
132147

148+
--matchers
133149
create public synonym be_between for &&ut3_owner..be_between;
134150
create public synonym be_empty for &&ut3_owner..be_empty;
135151
create public synonym be_false for &&ut3_owner..be_false;
@@ -146,41 +162,34 @@ create public synonym equal for &&ut3_owner..equal;
146162
create public synonym have_count for &&ut3_owner..have_count;
147163
create public synonym match for &&ut3_owner..match;
148164

149-
create public synonym ut for &&ut3_owner..ut;
150-
create public synonym ut_runner for &&ut3_owner..ut_runner;
151-
create public synonym ut_debug_reporter for &&ut3_owner..ut_debug_reporter;
165+
--reporters - test results
152166
create public synonym ut_teamcity_reporter for &&ut3_owner..ut_teamcity_reporter;
153167
create public synonym ut_xunit_reporter for &&ut3_owner..ut_xunit_reporter;
154168
create public synonym ut_junit_reporter for &&ut3_owner..ut_junit_reporter;
155169
create public synonym ut_tfs_junit_reporter for &&ut3_owner..ut_tfs_junit_reporter;
156170
create public synonym ut_documentation_reporter for &&ut3_owner..ut_documentation_reporter;
171+
create public synonym ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
172+
create public synonym ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;
173+
--reporters - coverage
157174
create public synonym ut_coverage_html_reporter for &&ut3_owner..ut_coverage_html_reporter;
158175
create public synonym ut_coverage_sonar_reporter for &&ut3_owner..ut_coverage_sonar_reporter;
159176
create public synonym ut_coveralls_reporter for &&ut3_owner..ut_coveralls_reporter;
160177
create public synonym ut_coverage_cobertura_reporter for &&ut3_owner..ut_coverage_cobertura_reporter;
178+
--reporters - debug
179+
create public synonym ut_debug_reporter for &&ut3_owner..ut_debug_reporter;
180+
181+
--reporters - base types
161182
create public synonym ut_reporters for &&ut3_owner..ut_reporters;
162-
create public synonym ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
163-
create public synonym ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
164-
create public synonym ut_integer_list for &&ut3_owner..ut_integer_list;
165183
create public synonym ut_reporter_base for &&ut3_owner..ut_reporter_base;
166184
create public synonym ut_output_reporter_base for &&ut3_owner..ut_output_reporter_base;
185+
186+
--other synonyms
167187
create public synonym ut_output_data_row for &&ut3_owner..ut_output_data_row;
168188
create public synonym ut_output_data_rows for &&ut3_owner..ut_output_data_rows;
169-
create public synonym ut_coverage for &&ut3_owner..ut_coverage;
170-
create public synonym ut_coverage_options for &&ut3_owner..ut_coverage_options;
171-
create public synonym ut_coverage_helper for &&ut3_owner..ut_coverage_helper;
172189
create public synonym ut_output_buffer_base for &&ut3_owner..ut_output_buffer_base;
173190
create public synonym ut_output_table_buffer for &&ut3_owner..ut_output_table_buffer;
174191
create public synonym ut_output_clob_table_buffer for &&ut3_owner..ut_output_clob_table_buffer;
175-
create public synonym ut_file_mappings for &&ut3_owner..ut_file_mappings;
176-
create public synonym ut_file_mapping for &&ut3_owner..ut_file_mapping;
177-
create public synonym ut_file_mapper for &&ut3_owner..ut_file_mapper;
178-
create public synonym ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
179-
create public synonym ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
180-
create public synonym ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
181-
create public synonym ut_suite_items_info for &&ut3_owner..ut_suite_items_info;
182-
create public synonym ut_suite_item_info for &&ut3_owner..ut_suite_item_info;
183-
create public synonym ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;
192+
184193
create public synonym dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks;
185194
create public synonym dbmspcc_runs for &&ut3_owner..dbmspcc_runs;
186195
create public synonym dbmspcc_units for &&ut3_owner..dbmspcc_units;

source/create_user_grants.sql

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,16 @@ grant execute on &&ut3_owner..ut_runner to &ut3_user;
5757
grant execute on &&ut3_owner..ut_file_mappings to &ut3_user;
5858
grant execute on &&ut3_owner..ut_file_mapping to &ut3_user;
5959
grant execute on &&ut3_owner..ut_file_mapper to &ut3_user;
60-
grant execute on &&ut3_owner..ut_key_value_pairs to &ut3_user;
61-
grant execute on &&ut3_owner..ut_key_value_pair to &ut3_user;
6260
grant execute on &&ut3_owner..ut_suite_items_info to &ut3_user;
6361
grant execute on &&ut3_owner..ut_suite_item_info to &ut3_user;
6462

63+
--generic types
64+
grant execute on &&ut3_owner..ut_varchar2_list to &ut3_user;
65+
grant execute on &&ut3_owner..ut_varchar2_rows to &ut3_user;
66+
grant execute on &&ut3_owner..ut_integer_list to &ut3_user;
67+
grant execute on &&ut3_owner..ut_key_value_pairs to &ut3_user;
68+
grant execute on &&ut3_owner..ut_key_value_pair to &ut3_user;
69+
6570
--expectations
6671
grant execute on &&ut3_owner..ut_expectation to &ut3_user;
6772
grant execute on &&ut3_owner..ut_expectation_compound to &ut3_user;
@@ -83,37 +88,29 @@ grant execute on &&ut3_owner..ut_equal to &ut3_user;
8388
grant execute on &&ut3_owner..ut_have_count to &ut3_user;
8489
grant execute on &&ut3_owner..ut_match to &ut3_user;
8590

86-
--generic types
87-
grant execute on &&ut3_owner..ut_varchar2_list to &ut3_user;
88-
grant execute on &&ut3_owner..ut_varchar2_rows to &ut3_user;
89-
grant execute on &&ut3_owner..ut_integer_list to &ut3_user;
90-
91-
--reporters
92-
grant execute on &&ut3_owner..ut_debug_reporter to &ut3_user;
91+
--reporters - tests
9392
grant execute on &&ut3_owner..ut_teamcity_reporter to &ut3_user;
9493
grant execute on &&ut3_owner..ut_xunit_reporter to &ut3_user;
9594
grant execute on &&ut3_owner..ut_junit_reporter to &ut3_user;
9695
grant execute on &&ut3_owner..ut_tfs_junit_reporter to &ut3_user;
9796
grant execute on &&ut3_owner..ut_documentation_reporter to &ut3_user;
97+
grant execute on &&ut3_owner..ut_realtime_reporter to &ut3_user;
98+
grant execute on &&ut3_owner..ut_sonar_test_reporter to &ut3_user;
99+
--reporters - coverage
98100
grant execute on &&ut3_owner..ut_coverage_html_reporter to &ut3_user;
99101
grant execute on &&ut3_owner..ut_coverage_sonar_reporter to &ut3_user;
100102
grant execute on &&ut3_owner..ut_coveralls_reporter to &ut3_user;
101103
grant execute on &&ut3_owner..ut_coverage_cobertura_reporter to &ut3_user;
102-
grant execute on &&ut3_owner..ut_realtime_reporter to &ut3_user;
103-
grant execute on &&ut3_owner..ut_sonar_test_reporter to &ut3_user;
104+
--reporters - debug
105+
grant execute on &&ut3_owner..ut_debug_reporter to &ut3_user;
104106

105-
--reporters base
107+
--reporters - base types
106108
grant execute on &&ut3_owner..ut_reporters to &ut3_user;
107109
grant execute on &&ut3_owner..ut_reporter_base to &ut3_user;
108110
grant execute on &&ut3_owner..ut_output_reporter_base to &ut3_user;
109111
grant execute on &&ut3_owner..ut_coverage_reporter_base to &ut3_user;
110112
grant execute on &&ut3_owner..ut_console_reporter_base to &ut3_user;
111113

112-
--coverage
113-
grant execute on &&ut3_owner..ut_coverage to &ut3_user;
114-
grant execute on &&ut3_owner..ut_coverage_options to &ut3_user;
115-
grant execute on &&ut3_owner..ut_coverage_helper to &ut3_user;
116-
117114
--outputs
118115
grant execute on &&ut3_owner..ut_output_buffer_base to &ut3_user;
119116
grant execute on &&ut3_owner..ut_output_data_row to &ut3_user;

source/create_user_synonyms.sql

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,28 @@ alter session set current_schema = &&ut3_owner;
5353

5454
prompt Creating synonyms for UTPLSQL objects in &&ut3_owner schema to user &&ut3_user
5555

56+
--public API
57+
create or replace synonym &ut3_user..ut for &&ut3_owner..ut;
58+
create or replace synonym &ut3_user..ut_runner for &&ut3_owner..ut_runner;
59+
create or replace synonym &ut3_user..ut_file_mappings for &&ut3_owner..ut_file_mappings;
60+
create or replace synonym &ut3_user..ut_file_mapping for &&ut3_owner..ut_file_mapping;
61+
create or replace synonym &ut3_user..ut_file_mapper for &&ut3_owner..ut_file_mapper;
62+
create or replace synonym &ut3_user..ut_suite_items_info for &&ut3_owner..ut_suite_items_info;
63+
create or replace synonym &ut3_user..ut_suite_item_info for &&ut3_owner..ut_suite_item_info;
64+
65+
--generic types
66+
create or replace synonym &ut3_user..ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
67+
create or replace synonym &ut3_user..ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
68+
create or replace synonym &ut3_user..ut_integer_list for &&ut3_owner..ut_integer_list;
69+
create or replace synonym &ut3_user..ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
70+
create or replace synonym &ut3_user..ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
71+
72+
--expectations
5673
create or replace synonym &ut3_user..ut_expectation for &&ut3_owner..ut_expectation;
5774
create or replace synonym &ut3_user..ut_expectation_compound for &&ut3_owner..ut_expectation_compound;
5875
create or replace synonym &ut3_user..ut_expectation_json for &&ut3_owner..ut_expectation_json;
5976

77+
--matchers
6078
create or replace synonym &ut3_user..be_between for &&ut3_owner..be_between;
6179
create or replace synonym &ut3_user..be_empty for &&ut3_owner..be_empty;
6280
create or replace synonym &ut3_user..be_false for &&ut3_owner..be_false;
@@ -73,40 +91,34 @@ create or replace synonym &ut3_user..equal for &&ut3_owner..equal;
7391
create or replace synonym &ut3_user..have_count for &&ut3_owner..have_count;
7492
create or replace synonym &ut3_user..match for &&ut3_owner..match;
7593

76-
create or replace synonym &ut3_user..ut for &&ut3_owner..ut;
77-
create or replace synonym &ut3_user..ut_runner for &&ut3_owner..ut_runner;
78-
create or replace synonym &ut3_user..ut_debug_reporter for &&ut3_owner..ut_debug_reporter;
94+
95+
--reporters - test results
7996
create or replace synonym &ut3_user..ut_teamcity_reporter for &&ut3_owner..ut_teamcity_reporter;
8097
create or replace synonym &ut3_user..ut_xunit_reporter for &&ut3_owner..ut_xunit_reporter;
8198
create or replace synonym &ut3_user..ut_junit_reporter for &&ut3_owner..ut_junit_reporter;
8299
create or replace synonym &ut3_user..ut_tfs_junit_reporter for &&ut3_owner..ut_tfs_junit_reporter;
83100
create or replace synonym &ut3_user..ut_documentation_reporter for &&ut3_owner..ut_documentation_reporter;
101+
create or replace synonym &ut3_user..ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
102+
create or replace synonym &ut3_user..ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;
103+
--reporters - coverage
84104
create or replace synonym &ut3_user..ut_coverage_html_reporter for &&ut3_owner..ut_coverage_html_reporter;
85105
create or replace synonym &ut3_user..ut_coverage_sonar_reporter for &&ut3_owner..ut_coverage_sonar_reporter;
86106
create or replace synonym &ut3_user..ut_coveralls_reporter for &&ut3_owner..ut_coveralls_reporter;
87107
create or replace synonym &ut3_user..ut_coverage_cobertura_reporter for &&ut3_owner..ut_coverage_cobertura_reporter;
108+
--reporters - debug
109+
create or replace synonym &ut3_user..ut_debug_reporter for &&ut3_owner..ut_debug_reporter;
110+
--reporters - base types
88111
create or replace synonym &ut3_user..ut_reporters for &&ut3_owner..ut_reporters;
89-
create or replace synonym &ut3_user..ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
90-
create or replace synonym &ut3_user..ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
91-
create or replace synonym &ut3_user..ut_integer_list for &&ut3_owner..ut_integer_list;
92112
create or replace synonym &ut3_user..ut_reporter_base for &&ut3_owner..ut_reporter_base;
93113
create or replace synonym &ut3_user..ut_output_reporter_base for &&ut3_owner..ut_output_reporter_base;
114+
115+
--other synonyms
94116
create or replace synonym &ut3_user..ut_output_data_row for &&ut3_owner..ut_output_data_row;
95117
create or replace synonym &ut3_user..ut_output_data_rows for &&ut3_owner..ut_output_data_rows;
96-
create or replace synonym &ut3_user..ut_coverage for &&ut3_owner..ut_coverage;
97-
create or replace synonym &ut3_user..ut_coverage_options for &&ut3_owner..ut_coverage_options;
98-
create or replace synonym &ut3_user..ut_coverage_helper for &&ut3_owner..ut_coverage_helper;
99118
create or replace synonym &ut3_user..ut_output_buffer_base for &&ut3_owner..ut_output_buffer_base;
100119
create or replace synonym &ut3_user..ut_output_table_buffer for &&ut3_owner..ut_output_table_buffer;
101120
create or replace synonym &ut3_user..ut_output_clob_table_buffer for &&ut3_owner..ut_output_clob_table_buffer;
102-
create or replace synonym &ut3_user..ut_file_mappings for &&ut3_owner..ut_file_mappings;
103-
create or replace synonym &ut3_user..ut_file_mapping for &&ut3_owner..ut_file_mapping;
104-
create or replace synonym &ut3_user..ut_file_mapper for &&ut3_owner..ut_file_mapper;
105-
create or replace synonym &ut3_user..ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
106-
create or replace synonym &ut3_user..ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
107-
create or replace synonym &ut3_user..ut_compound_data_tmp for &&ut3_owner..ut_cursor_data;
108-
create or replace synonym &ut3_user..ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
109-
create or replace synonym &ut3_user..ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;
121+
110122
create or replace synonym &ut3_user..dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks;
111123
create or replace synonym &ut3_user..dbmspcc_runs for &&ut3_owner..dbmspcc_runs;
112124
create or replace synonym &ut3_user..dbmspcc_units for &&ut3_owner..dbmspcc_units;

test/ut3_tester/core.pkb

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

33
procedure global_setup is
44
begin
5-
ut3.ut_coverage.set_develop_mode(true);
5+
ut3_tester_helper.coverage_helper.set_develop_mode();
66
--improve performance of test execution by disabling all compiler optimizations
77
ut3_tester_helper.main_helper.execute_autonomous('ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0');
88
end;

0 commit comments

Comments
 (0)