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

Skip to content

Commit ce9f520

Browse files
committed
Removed duplicated old tests. Moved functionality from old tests to ut3.
Refactored parts of functionality of `ut`/`ut_runner`. Removed unused code. Added missing tests.
1 parent 01e1000 commit ce9f520

116 files changed

Lines changed: 942 additions & 2562 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ install:
8686
before_script:
8787
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install.sh; fi
8888
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install_utplsql_release.sh; fi
89-
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/create_additional_grants_for_old_tests.sh; fi
9089
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_examples.sh; fi
9190
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_old_tests.sh; fi
9291

.travis/create_additional_grants_for_old_tests.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

.travis/install.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,30 @@ revoke execute on dbms_crypto from $UT3_TESTER;
6969
grant create job to $UT3_TESTER;
7070
exit
7171
SQL
72+
73+
#additional privileges to run tests
74+
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
75+
set feedback on
76+
--needed for Mystats script to work
77+
grant select any dictionary to $UT3_OWNER;
78+
--Needed for testing a coverage outside ut3_owner.
79+
grant create any procedure, drop any procedure, execute any procedure to $UT3_OWNER;
80+
81+
exit
82+
SQL
83+
84+
#Create additional users
85+
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
86+
set feedback off
87+
@create_utplsql_owner.sql $UT3_USER $UT3_USER_PASSWORD $UT3_TABLESPACE
88+
89+
exit
90+
SQL
91+
92+
#Grant UT3 framework to UT3$USER#
93+
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
94+
set feedback off
95+
@create_user_grants.sql $UT3_OWNER $UT3_USER
96+
97+
exit
98+
SQL

development/install.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,3 @@ if ! .travis/install_utplsql_release.sh; then
1818
echo -e ${header}"\nFailed to install utPLSQL from branch ${SELFTESTING_BRANCH} into ${UT3_RELEASE_VERSION_SCHEMA}\n"${header}
1919
exit 1
2020
fi
21-
if ! .travis/create_additional_grants_for_old_tests.sh; then
22-
echo -e ${header}"Failed to add grants needed old_tests\n"${header}
23-
exit 1
24-
fi

docs/userguide/coverage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ C:
230230
\hr.test_betwnstr.pks
231231
```
232232

233-
By default, utPLSQL will convert file paths into database objects using the following regular expression `/((\w+)\.)?(\w+)\.(\w{3})$`
233+
By default, utPLSQL will convert file paths into database objects using the following regular expression `/(((\w|[$#])+)\.)?((\w|[$#])+)\.(\w{3})$`
234234
- object owner (if it is present) is identified by the expression in the second set of brackets
235-
- object name is identified by the expression in the third set of brackets
236-
- object type is identified by the expression in the fourth set of brackets
235+
- object name is identified by the expression in the fourth set of brackets
236+
- object type is identified by the expression in the sixth set of brackets
237237

238238

239239
**Note**

old_tests/RunAll.sql

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -37,94 +37,19 @@ create table ut$test_table (val varchar2(1));
3737
exec ut_coverage.coverage_start();
3838
exec ut_coverage.set_develop_mode(true);
3939

40-
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTrace.sql
41-
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTraceWith0x.sql
42-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsNotBoolean.sql
43-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsNull.sql
44-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsTrue.sql
45-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesSuccessWhenExpessionIsFalse.sql
46-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_like.FailsForUnsupportedDatatype.sql
47-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_null.anydata.GivesSuccessWhenAnydataIsNull.sql
48-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_null.anydata.GivesSuccessWhenCollectionPassedIsNull.sql
49-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_null.anydata.GivesSuccessWhenObjectPassedIsNull.sql
50-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_true.GivesFailureWhenExpessionIsFalse.sql
51-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_true.GivesFailureWhenExpessionIsNotBoolean.sql
52-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_true.GivesFailureWhenExpessionIsNull.sql
53-
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_true.GivesSuccessWhenExpessionIsTrue.sql
54-
@@ut_expectations/ut.expect.not_to_equal.GivesFailureForEqualValues.sql
55-
@@ut_expectations/ut.expect.not_to_equal.GivesSuccessForDifferentValues.sql
56-
@@lib/RunTest.sql ut_expectations/ut.expect.to_match.FailsForUnsupportedDatatype.sql
57-
@@lib/RunTest.sql ut_expectations/ut_data_value_object.compare.Gives0WhenComparingIdenticalObjects.sql
5840
@@lib/RunTest.sql ut_expectations/ut_expectation_processor.nulls_are_equal.raisesExceptionWhenTryingToSetNullValue.sql
5941
@@lib/RunTest.sql ut_expectations/ut_expectation_processor.stackOnFailedTest.sql
6042
@@lib/RunTest.sql ut_expectations/ut_expectation_processor.stackOnUtFail.sql
6143

62-
@@ut_matchers/be_between.sql
63-
@@ut_matchers/be_like.sql
64-
@@ut_matchers/match.sql
65-
66-
@@lib/RunTest.sql ut_matchers/timestamp_between.sql
67-
@@lib/RunTest.sql ut_matchers/timestamp_ltz_between.sql
68-
@@lib/RunTest.sql ut_matchers/timestamp_ltz_not_between.sql
69-
@@lib/RunTest.sql ut_matchers/timestamp_not_between.sql
70-
@@lib/RunTest.sql ut_matchers/timestamp_tz_between.sql
71-
@@lib/RunTest.sql ut_matchers/timestamp_tz_not_between.sql
72-
7344
@@lib/RunTest.sql ut_metadata/ut_metadata.form_name.TrimStandaloneProgramName.sql
7445

75-
@@lib/RunTest.sql ut_output_buffer/get_lines.RecievesALineFromBufferTableAndDeletes.sql
76-
@@lib/RunTest.sql ut_output_buffer/get_lines.WaitsForMoreDataToAppearForSpecifiedTime.sql
77-
@@lib/RunTest.sql ut_output_buffer/get_lines.WaitsForTheDataToAppearForSpecifiedTime.sql
78-
@@lib/RunTest.sql ut_output_buffer/send_line.DoesNotSendLineIfNullTextGiven.sql
79-
@@lib/RunTest.sql ut_output_buffer/send_line.SendsALineIntoBufferTable.sql
80-
8146
@@lib/RunTest.sql ut_reporters/ut_documentation_reporter.providesCorrectLineFromStacktrace.sql
8247
@@lib/RunTest.sql ut_reporters/ut_documentation_reporter.reportMultipleWarnings.sql
8348
@@lib/RunTest.sql ut_reporters/ut_documentation_reporter.reportTestTiming.sql
8449
@@lib/RunTest.sql ut_reporters/ut_html_reporter.DefaultSchemaCoverage.sql
8550
@@lib/RunTest.sql ut_reporters/ut_html_reporter.UserOverrideSchemaCoverage.sql
86-
@@lib/RunTest.sql ut_reporters/ut_teamcity_reporter.ProducesExpectedOutputs.sql
87-
88-
@@lib/RunTest.sql ut/ut.run.AcceptsCoverageFileList.sql
89-
@@lib/RunTest.sql ut/ut.run.AcceptsCoverageFileListWithSutePaths.sql
90-
@@lib/RunTest.sql ut/ut.run.AcceptsSutePaths.sql
91-
@@lib/RunTest.sql ut/ut.run.ExecutesSuccesfullyAnEmptySuite.sql
92-
@@lib/RunTest.sql ut/ut.run.FailsToExecuteAnInvalidPackageBody.sql
93-
@@lib/RunTest.sql ut/ut.run.function.AcceptsCoverageFileList.sql
94-
@@lib/RunTest.sql ut/ut.run.function.AcceptsCoverageFileListWithSutePaths.sql
95-
@@lib/RunTest.sql ut/ut.run.function.AcceptsSutePaths.sql
96-
@@lib/RunTest.sql ut/ut.run.function.WithGivenReporter.ExectutesAllInCurrentSchemaUsingReporter.sql
97-
@@lib/RunTest.sql ut/ut.run.function.WithNoParams.ExecutesAllFromCurrentSchema.sql
98-
@@lib/RunTest.sql ut/ut.run.function.WithPackageName.ExecutesAllFromGivenPackage.sql
99-
--@@lib/RunTest.sql ut.run/ut.run.function.WithPackageName.ExecutesAllFromGivenPackageOnly.sql --TODO this one doesn't work at the moment
100-
@@lib/RunTest.sql ut/ut.run.function.WithSchemaName.ExecutesAllFromGivenSchema.sql
101-
@@lib/RunTest.sql ut/ut.run.function.WithSuitePath.ExecutesAllFromGivenPath.sql
102-
@@lib/RunTest.sql ut/ut.run.WithGivenReporter.ExectutesAllInCurrentSchemaUsingReporter.sql
103-
@@lib/RunTest.sql ut/ut.run.WithNoParams.ExecutesAllFromCurrentSchema.sql
104-
@@lib/RunTest.sql ut/ut.run.WithPackageName.ExecutesAllFromGivenPackage.sql
105-
--@@lib/RunTest.sql ut.run/ut.run.WithPackageName.ExecutesAllFromGivenPackageOnly.sql --TODO this one doesn't work at the moment
106-
@@lib/RunTest.sql ut/ut.run.WithSchemaName.ExecutesAllFromGivenSchema.sql
107-
@@lib/RunTest.sql ut/ut.run.WithSuitePath.ExecutesAllFromGivenPath.sql
108-
@@lib/RunTest.sql ut/ut.version.sql
10951

11052
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.AllowsDescriptionsWithComma.sql
111-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheSchema.sql
112-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageByPath.sql
113-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageByPathCurUser.sql
114-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTop2PackageByPath.sql
115-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTop2PackageByPathCurUser.sql
116-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageWithoutSubsuitesByPath.sql
117-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageWithoutSubsuitesByPathCurUser.sql
118-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageByName.sql
119-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageByNameCurUser.sql
120-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTop2PackageByName.sql
121-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTop2PackageByNameCurUser.sql
122-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageWithoutSubsuitesByName.sql
123-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageWithoutSubsuitesByNameCurUser.sql
124-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageProcedureByPath.sql
125-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTopPackageProcedureByPathCurUser.sql
126-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTop2PackageProcedureByPath.sql
127-
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.configure_execution_by_path.PrepareRunnerForTheTop2PackageProcedureByPathCurUser.sql
12853
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.emptySuitePath.sql
12954
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.get_schema_ut_packages.IncludesPackagesWithSutePath.sql
13055
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.IncludesInvalidPackageBodiesInTheRun.sql

old_tests/ut/ut.run.AcceptsCoverageFileList.sql

Lines changed: 0 additions & 30 deletions
This file was deleted.

old_tests/ut/ut.run.AcceptsCoverageFileListWithSutePaths.sql

Lines changed: 0 additions & 30 deletions
This file was deleted.

old_tests/ut/ut.run.AcceptsSutePaths.sql

Lines changed: 0 additions & 27 deletions
This file was deleted.

old_tests/ut/ut.run.ExecutesSuccesfullyAnEmptySuite.sql

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)