Skip to content

Commit

Permalink
Removed public grants for:
Browse files Browse the repository at this point in the history
- `ut_coverage`
- `ut_coverage_options`
- `ut_coverage_helper`
  • Loading branch information
jgebal committed Jun 23, 2019
1 parent c7b802f commit a62a6f1
Show file tree
Hide file tree
Showing 15 changed files with 191 additions and 193 deletions.
85 changes: 47 additions & 38 deletions source/create_synonyms_and_grants_for_public.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ grant execute on &&ut3_owner..ut_runner to public;
grant execute on &&ut3_owner..ut_file_mappings to public;
grant execute on &&ut3_owner..ut_file_mapping to public;
grant execute on &&ut3_owner..ut_file_mapper to public;
grant execute on &&ut3_owner..ut_key_value_pairs to public;
grant execute on &&ut3_owner..ut_key_value_pair to public;
grant execute on &&ut3_owner..ut_suite_items_info to public;
grant execute on &&ut3_owner..ut_suite_item_info to public;

--generic types
grant execute on &&ut3_owner..ut_varchar2_list to public;
grant execute on &&ut3_owner..ut_varchar2_rows to public;
grant execute on &&ut3_owner..ut_integer_list to public;
grant execute on &&ut3_owner..ut_key_value_pairs to public;
grant execute on &&ut3_owner..ut_key_value_pair to public;

--expectations
grant execute on &&ut3_owner..ut_expectation to public;
grant execute on &&ut3_owner..ut_expectation_compound to public;
Expand All @@ -63,37 +68,30 @@ grant execute on &&ut3_owner..ut_equal to public;
grant execute on &&ut3_owner..ut_have_count to public;
grant execute on &&ut3_owner..ut_match to public;

--generic types
grant execute on &&ut3_owner..ut_varchar2_list to public;
grant execute on &&ut3_owner..ut_varchar2_rows to public;
grant execute on &&ut3_owner..ut_integer_list to public;

--reporters
grant execute on &&ut3_owner..ut_debug_reporter to public;
--reporters - test results
grant execute on &&ut3_owner..ut_teamcity_reporter to public;
grant execute on &&ut3_owner..ut_xunit_reporter to public;
grant execute on &&ut3_owner..ut_junit_reporter to public;
grant execute on &&ut3_owner..ut_tfs_junit_reporter to public;
grant execute on &&ut3_owner..ut_documentation_reporter to public;
grant execute on &&ut3_owner..ut_sonar_test_reporter to public;
grant execute on &&ut3_owner..ut_realtime_reporter to public;
--reporters - coverage
grant execute on &&ut3_owner..ut_coverage_html_reporter to public;
grant execute on &&ut3_owner..ut_coverage_sonar_reporter to public;
grant execute on &&ut3_owner..ut_coveralls_reporter to public;
grant execute on &&ut3_owner..ut_coverage_cobertura_reporter to public;
grant execute on &&ut3_owner..ut_realtime_reporter to public;
grant execute on &&ut3_owner..ut_sonar_test_reporter to public;
--reporters - debug
grant execute on &&ut3_owner..ut_debug_reporter to public;

--reporters base
--reporters - base types
grant execute on &&ut3_owner..ut_reporters to public;
grant execute on &&ut3_owner..ut_reporter_base to public;
grant execute on &&ut3_owner..ut_output_reporter_base to public;
grant execute on &&ut3_owner..ut_coverage_reporter_base to public;
grant execute on &&ut3_owner..ut_console_reporter_base to public;

--coverage
grant execute on &&ut3_owner..ut_coverage to public;
grant execute on &&ut3_owner..ut_coverage_options to public;
grant execute on &&ut3_owner..ut_coverage_helper to public;

--outputs
grant execute on &&ut3_owner..ut_output_data_row to public;
grant execute on &&ut3_owner..ut_output_data_rows to public;
Expand All @@ -105,17 +103,17 @@ grant execute on &&ut3_owner..ut_output_clob_table_buffer to public;
grant select, insert, update, delete on &&ut3_owner..ut_compound_data_tmp to public;
grant select, insert, update, delete on &&ut3_owner..ut_compound_data_diff_tmp to public;

--needed for selecting from annotation objects
grant execute on &&ut3_owner..ut_annotation_objs_cache_info to public;
grant execute on &&ut3_owner..ut_annotation_obj_cache_info to public;

--other grants
grant execute on &&ut3_owner..ut_executables to public;
grant execute on &&ut3_owner..ut_executable_test to public;
grant select on &&ut3_owner..ut_suite_cache to public;
grant select on &&ut3_owner..ut_suite_cache_package to public;
grant select on &&ut3_owner..ut_suite_cache_schema to public;

--needed for selecting from annotation objects
grant execute on &&ut3_owner..ut_annotation_objs_cache_info to public;
grant execute on &&ut3_owner..ut_annotation_obj_cache_info to public;

grant select, insert, delete, update on &&ut3_owner..dbmspcc_blocks to public;
grant select, insert, delete, update on &&ut3_owner..dbmspcc_runs to public;
grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to public;
Expand All @@ -126,10 +124,28 @@ grant execute on &&ut3_owner..ut_run_info to public;

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

--public API
create public synonym ut for &&ut3_owner..ut;
create public synonym ut_runner for &&ut3_owner..ut_runner;
create public synonym ut_file_mappings for &&ut3_owner..ut_file_mappings;
create public synonym ut_file_mapping for &&ut3_owner..ut_file_mapping;
create public synonym ut_file_mapper for &&ut3_owner..ut_file_mapper;
create public synonym ut_suite_items_info for &&ut3_owner..ut_suite_items_info;
create public synonym ut_suite_item_info for &&ut3_owner..ut_suite_item_info;

--generic types
create public synonym ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
create public synonym ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
create public synonym ut_integer_list for &&ut3_owner..ut_integer_list;
create public synonym ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
create public synonym ut_key_value_pair for &&ut3_owner..ut_key_value_pair;

--expectations
create public synonym ut_expectation for &&ut3_owner..ut_expectation;
create public synonym ut_expectation_compound for &&ut3_owner..ut_expectation_compound;
create public synonym ut_expectation_json for &&ut3_owner..ut_expectation_json;

--matchers
create public synonym be_between for &&ut3_owner..be_between;
create public synonym be_empty for &&ut3_owner..be_empty;
create public synonym be_false for &&ut3_owner..be_false;
Expand All @@ -146,41 +162,34 @@ create public synonym equal for &&ut3_owner..equal;
create public synonym have_count for &&ut3_owner..have_count;
create public synonym match for &&ut3_owner..match;

create public synonym ut for &&ut3_owner..ut;
create public synonym ut_runner for &&ut3_owner..ut_runner;
create public synonym ut_debug_reporter for &&ut3_owner..ut_debug_reporter;
--reporters - test results
create public synonym ut_teamcity_reporter for &&ut3_owner..ut_teamcity_reporter;
create public synonym ut_xunit_reporter for &&ut3_owner..ut_xunit_reporter;
create public synonym ut_junit_reporter for &&ut3_owner..ut_junit_reporter;
create public synonym ut_tfs_junit_reporter for &&ut3_owner..ut_tfs_junit_reporter;
create public synonym ut_documentation_reporter for &&ut3_owner..ut_documentation_reporter;
create public synonym ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
create public synonym ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;
--reporters - coverage
create public synonym ut_coverage_html_reporter for &&ut3_owner..ut_coverage_html_reporter;
create public synonym ut_coverage_sonar_reporter for &&ut3_owner..ut_coverage_sonar_reporter;
create public synonym ut_coveralls_reporter for &&ut3_owner..ut_coveralls_reporter;
create public synonym ut_coverage_cobertura_reporter for &&ut3_owner..ut_coverage_cobertura_reporter;
--reporters - debug
create public synonym ut_debug_reporter for &&ut3_owner..ut_debug_reporter;

--reporters - base types
create public synonym ut_reporters for &&ut3_owner..ut_reporters;
create public synonym ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
create public synonym ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
create public synonym ut_integer_list for &&ut3_owner..ut_integer_list;
create public synonym ut_reporter_base for &&ut3_owner..ut_reporter_base;
create public synonym ut_output_reporter_base for &&ut3_owner..ut_output_reporter_base;

--other synonyms
create public synonym ut_output_data_row for &&ut3_owner..ut_output_data_row;
create public synonym ut_output_data_rows for &&ut3_owner..ut_output_data_rows;
create public synonym ut_coverage for &&ut3_owner..ut_coverage;
create public synonym ut_coverage_options for &&ut3_owner..ut_coverage_options;
create public synonym ut_coverage_helper for &&ut3_owner..ut_coverage_helper;
create public synonym ut_output_buffer_base for &&ut3_owner..ut_output_buffer_base;
create public synonym ut_output_table_buffer for &&ut3_owner..ut_output_table_buffer;
create public synonym ut_output_clob_table_buffer for &&ut3_owner..ut_output_clob_table_buffer;
create public synonym ut_file_mappings for &&ut3_owner..ut_file_mappings;
create public synonym ut_file_mapping for &&ut3_owner..ut_file_mapping;
create public synonym ut_file_mapper for &&ut3_owner..ut_file_mapper;
create public synonym ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
create public synonym ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
create public synonym ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
create public synonym ut_suite_items_info for &&ut3_owner..ut_suite_items_info;
create public synonym ut_suite_item_info for &&ut3_owner..ut_suite_item_info;
create public synonym ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;

create public synonym dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks;
create public synonym dbmspcc_runs for &&ut3_owner..dbmspcc_runs;
create public synonym dbmspcc_units for &&ut3_owner..dbmspcc_units;
Expand Down
31 changes: 14 additions & 17 deletions source/create_user_grants.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,16 @@ grant execute on &&ut3_owner..ut_runner to &ut3_user;
grant execute on &&ut3_owner..ut_file_mappings to &ut3_user;
grant execute on &&ut3_owner..ut_file_mapping to &ut3_user;
grant execute on &&ut3_owner..ut_file_mapper to &ut3_user;
grant execute on &&ut3_owner..ut_key_value_pairs to &ut3_user;
grant execute on &&ut3_owner..ut_key_value_pair to &ut3_user;
grant execute on &&ut3_owner..ut_suite_items_info to &ut3_user;
grant execute on &&ut3_owner..ut_suite_item_info to &ut3_user;

--generic types
grant execute on &&ut3_owner..ut_varchar2_list to &ut3_user;
grant execute on &&ut3_owner..ut_varchar2_rows to &ut3_user;
grant execute on &&ut3_owner..ut_integer_list to &ut3_user;
grant execute on &&ut3_owner..ut_key_value_pairs to &ut3_user;
grant execute on &&ut3_owner..ut_key_value_pair to &ut3_user;

--expectations
grant execute on &&ut3_owner..ut_expectation to &ut3_user;
grant execute on &&ut3_owner..ut_expectation_compound to &ut3_user;
Expand All @@ -83,37 +88,29 @@ grant execute on &&ut3_owner..ut_equal to &ut3_user;
grant execute on &&ut3_owner..ut_have_count to &ut3_user;
grant execute on &&ut3_owner..ut_match to &ut3_user;

--generic types
grant execute on &&ut3_owner..ut_varchar2_list to &ut3_user;
grant execute on &&ut3_owner..ut_varchar2_rows to &ut3_user;
grant execute on &&ut3_owner..ut_integer_list to &ut3_user;

--reporters
grant execute on &&ut3_owner..ut_debug_reporter to &ut3_user;
--reporters - tests
grant execute on &&ut3_owner..ut_teamcity_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_xunit_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_junit_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_tfs_junit_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_documentation_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_realtime_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_sonar_test_reporter to &ut3_user;
--reporters - coverage
grant execute on &&ut3_owner..ut_coverage_html_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_coverage_sonar_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_coveralls_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_coverage_cobertura_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_realtime_reporter to &ut3_user;
grant execute on &&ut3_owner..ut_sonar_test_reporter to &ut3_user;
--reporters - debug
grant execute on &&ut3_owner..ut_debug_reporter to &ut3_user;

--reporters base
--reporters - base types
grant execute on &&ut3_owner..ut_reporters to &ut3_user;
grant execute on &&ut3_owner..ut_reporter_base to &ut3_user;
grant execute on &&ut3_owner..ut_output_reporter_base to &ut3_user;
grant execute on &&ut3_owner..ut_coverage_reporter_base to &ut3_user;
grant execute on &&ut3_owner..ut_console_reporter_base to &ut3_user;

--coverage
grant execute on &&ut3_owner..ut_coverage to &ut3_user;
grant execute on &&ut3_owner..ut_coverage_options to &ut3_user;
grant execute on &&ut3_owner..ut_coverage_helper to &ut3_user;

--outputs
grant execute on &&ut3_owner..ut_output_buffer_base to &ut3_user;
grant execute on &&ut3_owner..ut_output_data_row to &ut3_user;
Expand Down
46 changes: 29 additions & 17 deletions source/create_user_synonyms.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,28 @@ alter session set current_schema = &&ut3_owner;

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

--public API
create or replace synonym &ut3_user..ut for &&ut3_owner..ut;
create or replace synonym &ut3_user..ut_runner for &&ut3_owner..ut_runner;
create or replace synonym &ut3_user..ut_file_mappings for &&ut3_owner..ut_file_mappings;
create or replace synonym &ut3_user..ut_file_mapping for &&ut3_owner..ut_file_mapping;
create or replace synonym &ut3_user..ut_file_mapper for &&ut3_owner..ut_file_mapper;
create or replace synonym &ut3_user..ut_suite_items_info for &&ut3_owner..ut_suite_items_info;
create or replace synonym &ut3_user..ut_suite_item_info for &&ut3_owner..ut_suite_item_info;

--generic types
create or replace synonym &ut3_user..ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
create or replace synonym &ut3_user..ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
create or replace synonym &ut3_user..ut_integer_list for &&ut3_owner..ut_integer_list;
create or replace synonym &ut3_user..ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
create or replace synonym &ut3_user..ut_key_value_pair for &&ut3_owner..ut_key_value_pair;

--expectations
create or replace synonym &ut3_user..ut_expectation for &&ut3_owner..ut_expectation;
create or replace synonym &ut3_user..ut_expectation_compound for &&ut3_owner..ut_expectation_compound;
create or replace synonym &ut3_user..ut_expectation_json for &&ut3_owner..ut_expectation_json;

--matchers
create or replace synonym &ut3_user..be_between for &&ut3_owner..be_between;
create or replace synonym &ut3_user..be_empty for &&ut3_owner..be_empty;
create or replace synonym &ut3_user..be_false for &&ut3_owner..be_false;
Expand All @@ -73,40 +91,34 @@ create or replace synonym &ut3_user..equal for &&ut3_owner..equal;
create or replace synonym &ut3_user..have_count for &&ut3_owner..have_count;
create or replace synonym &ut3_user..match for &&ut3_owner..match;

create or replace synonym &ut3_user..ut for &&ut3_owner..ut;
create or replace synonym &ut3_user..ut_runner for &&ut3_owner..ut_runner;
create or replace synonym &ut3_user..ut_debug_reporter for &&ut3_owner..ut_debug_reporter;

--reporters - test results
create or replace synonym &ut3_user..ut_teamcity_reporter for &&ut3_owner..ut_teamcity_reporter;
create or replace synonym &ut3_user..ut_xunit_reporter for &&ut3_owner..ut_xunit_reporter;
create or replace synonym &ut3_user..ut_junit_reporter for &&ut3_owner..ut_junit_reporter;
create or replace synonym &ut3_user..ut_tfs_junit_reporter for &&ut3_owner..ut_tfs_junit_reporter;
create or replace synonym &ut3_user..ut_documentation_reporter for &&ut3_owner..ut_documentation_reporter;
create or replace synonym &ut3_user..ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
create or replace synonym &ut3_user..ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;
--reporters - coverage
create or replace synonym &ut3_user..ut_coverage_html_reporter for &&ut3_owner..ut_coverage_html_reporter;
create or replace synonym &ut3_user..ut_coverage_sonar_reporter for &&ut3_owner..ut_coverage_sonar_reporter;
create or replace synonym &ut3_user..ut_coveralls_reporter for &&ut3_owner..ut_coveralls_reporter;
create or replace synonym &ut3_user..ut_coverage_cobertura_reporter for &&ut3_owner..ut_coverage_cobertura_reporter;
--reporters - debug
create or replace synonym &ut3_user..ut_debug_reporter for &&ut3_owner..ut_debug_reporter;
--reporters - base types
create or replace synonym &ut3_user..ut_reporters for &&ut3_owner..ut_reporters;
create or replace synonym &ut3_user..ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
create or replace synonym &ut3_user..ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
create or replace synonym &ut3_user..ut_integer_list for &&ut3_owner..ut_integer_list;
create or replace synonym &ut3_user..ut_reporter_base for &&ut3_owner..ut_reporter_base;
create or replace synonym &ut3_user..ut_output_reporter_base for &&ut3_owner..ut_output_reporter_base;

--other synonyms
create or replace synonym &ut3_user..ut_output_data_row for &&ut3_owner..ut_output_data_row;
create or replace synonym &ut3_user..ut_output_data_rows for &&ut3_owner..ut_output_data_rows;
create or replace synonym &ut3_user..ut_coverage for &&ut3_owner..ut_coverage;
create or replace synonym &ut3_user..ut_coverage_options for &&ut3_owner..ut_coverage_options;
create or replace synonym &ut3_user..ut_coverage_helper for &&ut3_owner..ut_coverage_helper;
create or replace synonym &ut3_user..ut_output_buffer_base for &&ut3_owner..ut_output_buffer_base;
create or replace synonym &ut3_user..ut_output_table_buffer for &&ut3_owner..ut_output_table_buffer;
create or replace synonym &ut3_user..ut_output_clob_table_buffer for &&ut3_owner..ut_output_clob_table_buffer;
create or replace synonym &ut3_user..ut_file_mappings for &&ut3_owner..ut_file_mappings;
create or replace synonym &ut3_user..ut_file_mapping for &&ut3_owner..ut_file_mapping;
create or replace synonym &ut3_user..ut_file_mapper for &&ut3_owner..ut_file_mapper;
create or replace synonym &ut3_user..ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
create or replace synonym &ut3_user..ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
create or replace synonym &ut3_user..ut_compound_data_tmp for &&ut3_owner..ut_cursor_data;
create or replace synonym &ut3_user..ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;
create or replace synonym &ut3_user..ut_realtime_reporter for &&ut3_owner..ut_realtime_reporter;

create or replace synonym &ut3_user..dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks;
create or replace synonym &ut3_user..dbmspcc_runs for &&ut3_owner..dbmspcc_runs;
create or replace synonym &ut3_user..dbmspcc_units for &&ut3_owner..dbmspcc_units;
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester/core.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ create or replace package body core is

procedure global_setup is
begin
ut3.ut_coverage.set_develop_mode(true);
ut3_tester_helper.coverage_helper.set_develop_mode();
--improve performance of test execution by disabling all compiler optimizations
ut3_tester_helper.main_helper.execute_autonomous('ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0');
end;
Expand Down
Loading

0 comments on commit a62a6f1

Please sign in to comment.