-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathinstall_ut3_user_tests.sql
More file actions
138 lines (126 loc) · 5.2 KB
/
install_ut3_user_tests.sql
File metadata and controls
138 lines (126 loc) · 5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
set define off
whenever sqlerror exit failure rollback
whenever oserror exit failure rollback
alter session set plsql_optimize_level=0;
@@common_helper/utplsql.pks
@@common_helper/utplsql.pkb
prompt Install user tests
@@ut3_user/helpers/some_item.tps
@@ut3_user/helpers/some_items.tps
@@ut3_user/helpers/some_object.tps
@@ut3_user/test_user.pks
@@ut3_user/expectations.pks
@@ut3_user/expectations.pkb
@@ut3_user/expectations/unary/test_expect_not_to_be_null.pks
@@ut3_user/expectations/unary/test_expect_to_be_null.pks
@@ut3_user/expectations/unary/test_expect_to_be_empty.pks
@@ut3_user/expectations/unary/test_expect_to_have_count.pks
@@ut3_user/expectations/unary/test_expect_to_be_true_false.pks
@@ut3_user/expectations/unary/test_expect_to_be_not_null.pks
@@ut3_user/expectations/binary/test_equal.pks
@@ut3_user/expectations/binary/test_expect_to_be_less_than.pks
@@ut3_user/expectations/binary/test_be_less_or_equal.pks
@@ut3_user/expectations/binary/test_be_greater_or_equal.pks
@@ut3_user/expectations/binary/test_be_greater_than.pks
@@ut3_user/expectations/binary/test_to_be_within.pks
@@ut3_user/expectations/binary/test_to_be_within_pct.pks
@@ut3_user/expectations/test_matchers.pks
@@ut3_user/expectations/test_expectation_anydata.pks
@@ut3_user/expectations/test_expectations_cursor.pks
set define on
@@install_above_12_1.sql 'ut3_user/expectations/test_expectations_json.pks'
set define off
@@ut3_user/api/test_ut_runner.pks
@@ut3_user/api/test_ut_run.pks
@@ut3_user/reporters.pks
@@ut3_user/reporters/test_tfs_junit_reporter.pks
@@ut3_user/reporters/test_teamcity_reporter.pks
@@ut3_user/reporters/test_sonar_test_reporter.pks
@@ut3_user/reporters/test_junit_reporter.pks
@@ut3_user/reporters/test_documentation_reporter.pks
@@ut3_user/reporters/test_debug_reporter.pks
@@ut3_user/reporters/test_realtime_reporter.pks
@@ut3_user/reporters/test_tap_reporter.pks
@@ut3_user/reporters/test_coverage.pks
@@ut3_user/reporters/test_coverage/test_coverage_standalone.pks
set define on
@@ut3_user/reporters/test_coverage/test_extended_coverage.pks
@@ut3_user/reporters/test_coverage/test_html_coverage_reporter.pks
set define off
@@ut3_user/reporters/test_coverage/test_coveralls_reporter.pks
@@ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pks
@@ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pks
set define on
@@ut3_user/reporters/test_coverage/test_proftab_coverage.pks
set define off
@@ut3_user/test_user.pkb
@@ut3_user/expectations/unary/test_expect_not_to_be_null.pkb
@@ut3_user/expectations/unary/test_expect_to_be_null.pkb
@@ut3_user/expectations/unary/test_expect_to_be_empty.pkb
@@ut3_user/expectations/unary/test_expect_to_have_count.pkb
@@ut3_user/expectations/unary/test_expect_to_be_true_false.pkb
@@ut3_user/expectations/unary/test_expect_to_be_not_null.pkb
@@ut3_user/expectations/binary/test_equal.pkb
@@ut3_user/expectations/binary/test_expect_to_be_less_than.pkb
@@ut3_user/expectations/binary/test_be_less_or_equal.pkb
@@ut3_user/expectations/binary/test_be_greater_or_equal.pkb
@@ut3_user/expectations/binary/test_be_greater_than.pkb
@@ut3_user/expectations/binary/test_to_be_within.pkb
@@ut3_user/expectations/binary/test_to_be_within_pct.pkb
@@ut3_user/expectations/test_matchers.pkb
@@ut3_user/expectations/test_expectation_anydata.pkb
@@ut3_user/expectations/test_expectations_cursor.pkb
set define on
@@install_above_12_1.sql 'ut3_user/expectations/test_expectations_json.pkb'
set define off
@@ut3_user/api/test_ut_runner.pkb
@@ut3_user/api/test_ut_run.pkb
@@ut3_user/reporters.pkb
@@ut3_user/reporters/test_tfs_junit_reporter.pkb
@@ut3_user/reporters/test_teamcity_reporter.pkb
@@ut3_user/reporters/test_sonar_test_reporter.pkb
@@ut3_user/reporters/test_junit_reporter.pkb
@@ut3_user/reporters/test_documentation_reporter.pkb
@@ut3_user/reporters/test_debug_reporter.pkb
@@ut3_user/reporters/test_realtime_reporter.pkb
@@ut3_user/reporters/test_tap_reporter.pkb
@@ut3_user/reporters/test_coverage/test_coverage_standalone.pkb
set define on
@@ut3_user/reporters/test_coverage/test_extended_coverage.pkb
@@ut3_user/reporters/test_coverage/test_html_coverage_reporter.pkb
set define off
@@ut3_user/reporters/test_coverage/test_coveralls_reporter.pkb
@@ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pkb
@@ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pkb
set define on
@@ut3_user/reporters/test_coverage/test_proftab_coverage.pkb
set define off
set linesize 200
set define on
set verify off
column text format a100
column error_count noprint new_value error_count
prompt Validating installation
set heading on
select type, name, sequence, line, position, text, count(1) over() error_count
from all_errors
where owner = USER
and name not like 'BIN$%' --not recycled
and name != 'UT_WITH_INVALID_BODY'
-- errors only. ignore warnings
and attribute = 'ERROR'
order by name, type, sequence
/
begin
if to_number('&&error_count') > 0 then
raise_application_error(-20000, 'Not all sources were successfully installed.');
else
dbms_output.put_line('Installation completed successfully');
end if;
for i in ( select object_name from user_objects t where t.object_type = 'PACKAGE')
loop
execute immediate 'grant execute on '||i.object_name||' to UT3_TESTER';
end loop;
end;
/
exit;