Skip to content

Commit 73c15a2

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature/annotations_restructuring
# Conflicts: # examples/demo_of_expectations/demo_equal_matcher.sql
2 parents cd394c7 + 0bacde4 commit 73c15a2

File tree

6 files changed

+37
-131
lines changed

6 files changed

+37
-131
lines changed

development/releasing.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
The release process is automated in the following way:
2-
1) With every build, the build process on Travis updates files with an appropriate version number before deployment into the database.
3-
This is to confirm that the update of versions works properly.
4-
2) When a build is executed on a branch named `release/v1.2.3-something` then additional steps are taken:
5-
- the project version in files: `sonar-project.properties`, `VERSION` is updated from the version number derived from the release branch
6-
- changes to those two files are committed and pushed - this should happen only once, when the release branch is initially created on the main repo
7-
3) To create a release, just create a tag on the code to be released. The tag name must match the regex pattern: `^v[0-9]+\.[0-9]+\.[0-9]+.*$`
8-
- When a tag build is executed, the documentation is built and files are uploaded to the tag.
9-
- The version number is derived from the tag name.
10-
4) The release version does not provide access to unversioned source files (the default zip file from GitHub is empty).
11-
The sources for release are provided in separate zip files delivered from the Travis build process.
1+
The release process is semi-automated.
2+
3+
With every build, the build process on Travis updates files with an appropriate version number before deployment into the database.
4+
This step is performed, to confirm that the update of versions works properly.
5+
6+
To create a release:
7+
- create release branch and wait for release build to complete successfully
8+
- merge release branch to master and wait for master build to complete successfully
9+
- create a release from the master branch using github web page and populate release description using information found on the issues and pull requests for release
10+
11+
The following will happen:
12+
- build executed on branch `release/v1.2.3-[something]` updates files `sonar-project.properties`, `VERSION` with project version derived from the release branch name
13+
- changes to those two files are committed and pushed back to release branch by Travis
14+
- when a release is created, a new tag is added in on the repository and a tag build is executed
15+
- the documentation for new release is published on `utplsql.github.io` and installation archives are added to the tag.
16+
17+
Note:
18+
The released version does not provide access to un-versioned source files (the default zip file from GitHub is empty).
19+
The sources for release are provided in separate zip files delivered from the Travis build process.
20+
This is because we do not keep version in our source files in develop branch.

examples/demo_of_expectations/demo_equal_matcher.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ create or replace package demo_equal_matcher as
3636
-- %displayname(Gives success when comparing null actual to a null expected)
3737
procedure object_compare_null_both_ok;
3838

39+
-- %test
40+
-- %displayname(Gives failure when comparing null actual to a null expected, setting null equal to false)
41+
procedure object_compare_null_both_fail;
42+
3943
-- %test
4044
-- %displayname(Gives failure when comparing identical objects containing different data)
4145
procedure object_compare_different_data;
@@ -90,6 +94,14 @@ create or replace package body demo_equal_matcher as
9094
ut.expect(anydata.convertObject(l_actual)).to_equal(anydata.convertObject(l_expected));
9195
end;
9296

97+
procedure object_compare_null_both_fail is
98+
l_expected demo_department;
99+
l_actual demo_department;
100+
begin
101+
ut.expect(anydata.convertObject(l_actual)).to_equal(anydata.convertObject(l_expected),a_nulls_are_equal => false);
102+
end;
103+
104+
93105
procedure object_compare_different_data is
94106
l_expected demo_department;
95107
l_actual demo_department;

old_tests/ut_expectations/ut.expect.to_equal.cursor.SupportsSQLandPLSQLdatatypes.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ declare
9090
l_result_reporter ut_reporter_base := ut_documentation_reporter();
9191
l_status_reporter ut_reporter_base := utplsql_test_reporter();
9292
begin
93-
ut_runner.run(':org.utplsql.test', ut_reporters(l_result_reporter, l_status_reporter));
93+
ut_runner.run(ut_varchar2_list(':org.utplsql.test'), ut_reporters(l_result_reporter, l_status_reporter));
9494
select * into :test_result from table(ut_output_buffer.get_lines(l_status_reporter.reporter_id));
9595
if :test_result != ut_utils.tr_success then
9696
ut_output_buffer.lines_to_dbms_output(l_result_reporter.reporter_id);

source/api/ut.pkb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ create or replace package body ut is
102102
pragma autonomous_transaction;
103103
begin
104104
ut_runner.run(
105-
a_paths, a_reporter, ut_utils.int_to_boolean(a_color_console), a_coverage_schemes,
105+
a_paths, ut_reporters(coalesce(a_reporter,ut_documentation_reporter())),
106+
ut_utils.int_to_boolean(a_color_console), a_coverage_schemes,
106107
a_source_file_mappings, a_test_file_mappings, a_include_objects, a_exclude_objects
107108
);
108109
rollback;
@@ -116,7 +117,8 @@ create or replace package body ut is
116117
pragma autonomous_transaction;
117118
begin
118119
ut_runner.run(
119-
a_paths, a_reporter, ut_utils.int_to_boolean(a_color_console), a_coverage_schemes,
120+
a_paths, ut_reporters(coalesce(a_reporter,ut_documentation_reporter())),
121+
ut_utils.int_to_boolean(a_color_console), a_coverage_schemes,
120122
a_source_files, a_test_files, a_include_objects, a_exclude_objects
121123
);
122124
rollback;

source/api/ut_runner.pkb

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -119,84 +119,5 @@ create or replace package body ut_runner is
119119
);
120120
end;
121121

122-
procedure run(
123-
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console boolean := false,
124-
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
125-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
126-
) is
127-
begin
128-
run(
129-
a_paths, ut_reporters(coalesce(a_reporter,ut_documentation_reporter())),
130-
a_color_console, a_coverage_schemes, a_source_file_mappings, a_test_file_mappings,
131-
a_include_objects, a_exclude_objects, a_fail_on_errors
132-
);
133-
end;
134-
135-
procedure run(
136-
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console boolean := false,
137-
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
138-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
139-
) is
140-
begin
141-
run(
142-
a_paths, ut_reporters(coalesce(a_reporter,ut_documentation_reporter())),
143-
a_color_console, a_coverage_schemes, a_source_files, a_test_files,
144-
a_include_objects, a_exclude_objects, a_fail_on_errors
145-
);
146-
end;
147-
148-
149-
procedure run(
150-
a_path in varchar2, a_reporter ut_reporter_base := null, a_color_console boolean := false,
151-
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
152-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
153-
) is
154-
begin
155-
run(
156-
ut_varchar2_list(coalesce(a_path, sys_context('userenv', 'current_schema'))),
157-
a_reporter, a_color_console, a_coverage_schemes, a_source_file_mappings, a_test_file_mappings,
158-
a_include_objects, a_exclude_objects, a_fail_on_errors
159-
);
160-
end run;
161-
162-
procedure run(
163-
a_path in varchar2, a_reporter ut_reporter_base := null, a_color_console boolean := false,
164-
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
165-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
166-
) is
167-
begin
168-
run(
169-
ut_varchar2_list(coalesce(a_path, sys_context('userenv', 'current_schema'))),
170-
a_reporter, a_color_console, a_coverage_schemes, a_source_files, a_test_files,
171-
a_include_objects, a_exclude_objects, a_fail_on_errors
172-
);
173-
end run;
174-
175-
procedure run(
176-
a_path in varchar2, a_reporters in ut_reporters, a_color_console boolean := false,
177-
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
178-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
179-
) is
180-
begin
181-
run(
182-
ut_varchar2_list(coalesce(a_path, sys_context('userenv', 'current_schema'))),
183-
a_reporters, a_color_console, a_coverage_schemes, a_source_file_mappings, a_test_file_mappings,
184-
a_include_objects, a_exclude_objects, a_fail_on_errors
185-
);
186-
end run;
187-
188-
procedure run(
189-
a_path in varchar2, a_reporters in ut_reporters, a_color_console boolean := false,
190-
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
191-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
192-
) is
193-
begin
194-
run(
195-
ut_varchar2_list(coalesce(a_path, sys_context('userenv', 'current_schema'))),
196-
a_reporters, a_color_console, a_coverage_schemes, a_source_files, a_test_files,
197-
a_include_objects, a_exclude_objects, a_fail_on_errors
198-
);
199-
end run;
200-
201122
end ut_runner;
202123
/

source/api/ut_runner.pks

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,44 +46,6 @@ create or replace package ut_runner authid current_user is
4646
* parent setup/teardown procedures
4747
*/
4848

49-
procedure run(
50-
a_path varchar2 := null, a_reporter ut_reporter_base := null, a_color_console boolean := false,
51-
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
52-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
53-
);
54-
55-
procedure run(
56-
a_path varchar2 := null, a_reporter ut_reporter_base := null, a_color_console boolean := false,
57-
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
58-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
59-
);
60-
61-
procedure run(
62-
a_path varchar2, a_reporters ut_reporters, a_color_console boolean := false,
63-
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
64-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
65-
);
66-
67-
procedure run(
68-
a_path varchar2, a_reporters ut_reporters, a_color_console boolean := false,
69-
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
70-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
71-
);
72-
73-
-- TODO - implementation to be changed
74-
procedure run(
75-
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console boolean := false,
76-
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
77-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
78-
);
79-
80-
procedure run(
81-
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console boolean := false,
82-
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
83-
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
84-
);
85-
86-
-- TODO - implementation to be changed
8749
procedure run(
8850
a_paths ut_varchar2_list, a_reporters ut_reporters, a_color_console boolean := false,
8951
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,

0 commit comments

Comments
 (0)