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

Skip to content

Release/v3.1.11 #1165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 114 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
e623664
Merge remote-tracking branch 'origin/master' into develop
jgebal Feb 23, 2020
532073b
Updated version to 3.1.11
jgebal Feb 23, 2020
1b00d27
Updated project version after build [skip ci]
Feb 23, 2020
63f17a2
Improved the way utPLSQL checks if user has the `execute any procedur…
jgebal Mar 12, 2020
4979cf9
Added check for sys grants added via role when installing utPLSQL fra…
jgebal Mar 12, 2020
5532191
Merge pull request #1056 from utPLSQL/feature/improve_ut3_user_support
jgebal Mar 14, 2020
4d865ae
Fixed flay tests that can fail on occasion when a second flips during…
jgebal Mar 14, 2020
d9fc007
Merge pull request #1058 from utPLSQL/feature/fixing_flaky_tests
jgebal Mar 14, 2020
8d37591
Updated project version after build [skip ci]
Mar 14, 2020
725d367
Refactored and fixed code to use be fully schema-independent.
jgebal Mar 15, 2020
2c0b2d0
Refactored tests to comply with new schema layout
jgebal Mar 15, 2020
0d9eddc
Fixing examples run
jgebal Mar 15, 2020
179586a
Enabled echo and feedback for examples
jgebal Mar 15, 2020
0793607
Enabled echo and feedback for examples
jgebal Mar 15, 2020
eb5dad6
Changed the way session context is created.
jgebal Mar 15, 2020
22f0ec7
Fixed failing tests - wrong context name
jgebal Mar 16, 2020
09b79bf
Removed copy of ojdbc jar files - no longed valid and no longer needed.
jgebal Mar 17, 2020
6e2a4b4
Updated documentation. No need to download OJDBC drivers anymore.
jgebal Mar 17, 2020
6b1dad8
Merge pull request #1059 from utPLSQL/feature/swap_develop_schema
jgebal Mar 17, 2020
ea4c9fb
Updated project version after build [skip ci]
Mar 17, 2020
b8c0287
Resolves issue #1060 with suites not properly built with GERMAN (non-…
jgebal Mar 25, 2020
2689052
Merge pull request #1061 from utPLSQL/bugfix/suitepath_with_nlssort
jgebal Mar 25, 2020
fa4c6b7
Restructuring utPSLQL install guide.
jgebal Mar 25, 2020
62ef235
Fixed some typos
jgebal Mar 26, 2020
4be8465
Merge pull request #1063 from utPLSQL/feature/install_doc_update
jgebal Mar 27, 2020
72a6809
Updated project version after build [skip ci]
Mar 27, 2020
83ee513
Added explicit requirements
jgebal Mar 29, 2020
c5d53fb
Added explicit 11g release 2 requirement
jgebal Mar 29, 2020
41328a5
Merge pull request #1065 from utPLSQL/feature/add_explicit_requirements
jgebal Mar 31, 2020
789ad61
Updated project version after build [skip ci]
Apr 1, 2020
0dd978f
grant privileges to debug via UT3_USER
PhilippSalvisberg Jun 4, 2020
9ea6ab4
add test case to reproduce bug #1073
PhilippSalvisberg Jun 4, 2020
bfe94cd
handle nested CDATA sections to fix bug #1073
PhilippSalvisberg Jun 4, 2020
6631930
support Oracle DB 11.2, add ace only on 12c and higher
PhilippSalvisberg Jun 4, 2020
d9a0457
Merge pull request #1075 from utPLSQL/bugfix/issue-1073-nested-cdata
PhilippSalvisberg Jun 4, 2020
c465151
Updated project version after build [skip ci]
Jun 4, 2020
a3b3a20
Changed `dbms_plssqlcode` tables to be permanent.
jgebal Jun 10, 2020
199ce0b
Merge pull request #1078 from utPLSQL/feature/change_coverage_to_perm…
jgebal Jun 10, 2020
93fd222
Reworked coverage to allow for gathering coverage without calling utP…
jgebal Jun 10, 2020
a23f7be
Updated project version after build [skip ci]
Jun 10, 2020
641d87c
Removed mocking API for coverage,
jgebal Jun 13, 2020
52e1db9
Workaround for 12.2 issue with conditional compilation in package spec.
jgebal Jun 14, 2020
a17c3af
cleanup of unneeded safety code
jgebal Jun 14, 2020
09ab226
Refactoring tests
jgebal Jun 14, 2020
631d6da
Renamed master to main
jgebal Jun 14, 2020
d5cca04
Merge pull request #1080 from utPLSQL/feature/rename_from_master_to_main
jgebal Jun 15, 2020
4e7631b
Updated project version after build [skip ci]
Jun 15, 2020
e9e4b9e
Reorganized and cleaned up tests to have only one package used for co…
jgebal Jun 21, 2020
a4ae4cf
Removed dead code.
jgebal Jun 21, 2020
0e72abc
Added support for client_character_set as report parameter.
jgebal Jun 21, 2020
955de5c
Made coverage_run_id mandatory in `ut_coverage_options`
jgebal Jun 21, 2020
cd7d738
Fixed CDATA tagging in JUnit reporter
jgebal Jun 28, 2020
20bf6dd
Merge pull request #1085 from utPLSQL/feature/fix_cdata_tagging
jgebal Jul 18, 2020
2956d07
Updated project version after build [skip ci]
Jul 18, 2020
ad39737
Merge pull request #1079 from utPLSQL/feature/standalone_coverage
jgebal Jul 18, 2020
89d546a
Extended UK on ut_coverage_sources_tmp table.
jgebal Jul 18, 2020
461bc01
Updated project version after build [skip ci]
Jul 19, 2020
e96b978
Added object type to name in coverage reports.
jgebal Jul 20, 2020
09e495e
Merge pull request #1091 from utPLSQL/feature/fix_coverage_uk_violati…
jgebal Jul 20, 2020
507c176
Updated project version after build [skip ci]
Jul 20, 2020
959c1c9
Added example of a reporter that reports out all expectation outputs,…
jgebal Aug 3, 2020
81d4194
Fixes to annotation parsing.
jgebal Aug 3, 2020
86e335e
Fixed issue by removing owner from beginning of source code.
jgebal Aug 3, 2020
74b77b5
Merge pull request #1093 from utPLSQL/feature/fix_ddl_trigger_parsing
jgebal Aug 9, 2020
7eeae39
Updated project version after build [skip ci]
Aug 9, 2020
eced7a5
add executable flag (required on macOS and Linux)
PhilippSalvisberg Dec 9, 2020
7812a8a
resolves #1111 - use dbms_crypto instead of dbms_obfuscation_toolkit
PhilippSalvisberg Dec 9, 2020
abfa190
Merge pull request #1112 from utPLSQL/feature/issue-1111-oracle-21c
jgebal Dec 9, 2020
04b5f52
Updated project version after build [skip ci]
Dec 9, 2020
ae50802
Added missing <classes> tag
OsBlaineOra May 20, 2021
bbc8e9a
Merge pull request #1137 from OsBlaineOra/bugfix/partial_fix_1107_Mis…
jgebal May 20, 2021
ed87327
Merge pull request #1092 from utPLSQL/feature/sample_reporters
jgebal May 20, 2021
12f9bdf
Updated unit tests after coverage format fix
jgebal May 20, 2021
f671acf
Merge pull request #1138 from utPLSQL/feature/test_fixes_after_covera…
jgebal May 20, 2021
75037c8
Updated project version after build [skip ci]
May 20, 2021
7498530
Replaced hard coded 0 in total test coverage
OsBlaineOra Jun 1, 2021
70ccc22
Update readme.md
jgebal Aug 17, 2021
3b7687b
Update readme.md
jgebal Aug 17, 2021
cbfac19
Updated project version after build [skip ci]
Aug 17, 2021
4acb559
Adjusting build to work with new travis server.
jgebal Aug 17, 2021
59f630c
Merge pull request #1152 from utPLSQL/feature/move_to_travis-ci.com
jgebal Aug 18, 2021
ff11584
Updated project version after build [skip ci]
Aug 18, 2021
b0031ab
Update annotations documentation
jgebal Sep 3, 2021
b33d395
Updated project version after build [skip ci]
Sep 4, 2021
4e2b9f5
Fixed a divide by zero error.
OsBlaineOra Sep 7, 2021
9cbcaa1
Update of slack invite link
jgebal Oct 29, 2021
56ee7c9
Update link for slack
jgebal Oct 29, 2021
2967725
Adjusting tests for Oracle21cXE
jgebal Nov 3, 2021
a36d796
Adding ORacle 21c XE to the build process
jgebal Nov 3, 2021
ee7d9e2
Adding Oracle 21c XE to the build process
jgebal Nov 3, 2021
e48508f
Updated project version after build [skip ci]
Nov 4, 2021
14eca7f
Adding noparallel hint to elements causing issues on parallel-enabled…
jgebal Aug 17, 2021
f35694e
Added no_parallel hints to all SQLs to assure stable performance on p…
jgebal Nov 7, 2021
b7fbfeb
Merge pull request #1158 from utPLSQL/feature/add_21cXE_to_pipeline
jgebal Nov 7, 2021
c930ba6
Updated project version after build [skip ci]
Nov 7, 2021
45d1d5b
Improved build speed by ~1.5 minute
jgebal Nov 8, 2021
8080604
Testing build on images from Gerald Venzl
jgebal Nov 9, 2021
23d8651
Testing build on images from Gerald Venzl
jgebal Nov 10, 2021
2c1624e
Disabled 11g build from Gerald as utPLSQL fails on that build.
jgebal Nov 11, 2021
78ae58d
Increasing wait time before proceeding with background job run for tests
jgebal Nov 11, 2021
938a06f
Merge pull request #1160 from utPLSQL/feature/fix_cache_when_parallel…
jgebal Nov 11, 2021
9388cb3
Updated project version after build [skip ci]
Nov 11, 2021
e4c67a9
Merge pull request #1162 from utPLSQL/feature/build_process_improvements
jgebal Nov 11, 2021
1e19520
Updated project version after build [skip ci]
Nov 11, 2021
38c53b6
Update copyright dates in license
jgebal Nov 15, 2021
000aeab
Updated project version after build [skip ci]
Nov 15, 2021
581991b
Fixed failing tests and improved coverage reporting
jgebal Nov 15, 2021
b4c7db8
Merge pull request #1140 from OsBlaineOra/bugfix/missing_total_lines_…
jgebal Nov 15, 2021
ad5faa8
Updated project version after build [skip ci]
Nov 15, 2021
fae53a4
Removed duplicate profiler table installation.
jgebal Nov 16, 2021
159f4be
Merge pull request #1164 from utPLSQL/bugfix/duplicated_profiler_tabl…
jgebal Nov 16, 2021
f841ecf
Updated project version after build [skip ci]
Nov 16, 2021
36279f9
Merge branch 'develop' into release/v3.1.11
jgebal Nov 16, 2021
5eaefd3
Updated project version after build [skip ci]
Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Add any other context or screenshots about the feature request here.
> Please do not create issues for generic SQL or PL/SQL questions. There are other forums and communities to help you with those. See [ASKTom](https://asktom.oracle.com) for example.

**Want to discuss**
If you want to discuss your issue, join [our SLACK chat](http://utplsql-slack-invite.herokuapp.com/).
If you want to discuss your issue, join [our SLACK chat](https://join.slack.com/t/utplsql/shared_invite/zt-d6zor80g-WWqAhbLWioJZUtLYeXetzA).
74 changes: 46 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
sudo: required
language: python
os: linux

jdk: openjdk10

addons:
apt:
packages:
- unzip
# Java9+ Required for Sonar and SQLCL
- openjdk-9-jre-headless
sonarcloud:
organization: utplsql
token: ${SONAR_TOKEN}
Expand All @@ -16,16 +14,26 @@ services:

env:
global:
- UT3_OWNER=ut3
- UT3_OWNER_PASSWORD=ut3
- UT3_RELEASE_VERSION_SCHEMA=UT3_LATEST_RELEASE
- UT3_DEVELOP_SCHEMA=UT3_DEVELOP
- UT3_DEVELOP_SCHEMA_PASSWORD=ut3
- UT3_RELEASE_VERSION_SCHEMA=UT3
- UT3_RELEASE_VERSION_SCHEMA_PASSWORD=ut3
- UT3_USER="UT3\$USER#"
- UT3_USER_PASSWORD=ut3
- UT3_TESTER=ut3_tester
- UT3_TESTER=UT3_TESTER
- UT3_TESTER_PASSWORD=ut3
- UT3_TESTER_HELPER=ut3_tester_helper
- UT3_TESTER_HELPER=UT3_TESTER_HELPER
- UT3_TESTER_HELPER_PASSWORD=ut3
- UT3_TABLESPACE=users
- BUILD_DIR=${TRAVIS_BUILD_DIR}
- JOB_ID=${TRAVIS_JOB_ID}
- JOB_NUMBER=${TRAVIS_JOB_NUMBER}
- PULL_REQUEST_NAME=${TRAVIS_PULL_REQUEST}
- PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
- TAG_NAME=${TRAVIS_TAG}
- REPO_SLUG=${TRAVIS_REPO_SLUG}
- PR_SLUG=${TRAVIS_PULL_REQUEST_SLUG}
- BRANCH_NAME=${TRAVIS_BRANCH}
# Environment for building a release
- CURRENT_BRANCH=${TRAVIS_BRANCH}
- UTPLSQL_REPO="utPLSQL/utPLSQL"
Expand All @@ -36,24 +44,28 @@ env:
- UTPLSQL_BUILD_USER_NAME="Travis CI"
- CACHE_DIR=$HOME/.cache
# Database Env
- SQLCLI="$HOME/sqlcl/bin/sql"
- OJDBC_HOME="$HOME/sqlcl/lib"
- SQLCLI="${BUILD_DIR}/sqlcl/bin/sql"
- OJDBC_HOME="${BUILD_DIR}/ojdbc"
- ORACLE_PWD="oracle"
- UT3_DOCKER_REPO="utplsqlv3/oracledb"
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
- DOCKHER_HUB_REPO="utplsqlv3/oracledb"
- DOCKER_VOLUME="/home/oracle/host"
- DOCKER_ENV="-e SQLCLI=sqlplus -e UT3_DEVELOP_SCHEMA -e UT3_DEVELOP_SCHEMA_PASSWORD -e UT3_RELEASE_VERSION_SCHEMA -e UT3_RELEASE_VERSION_SCHEMA_PASSWORD -e UT3_USER -e UT3_USER_PASSWORD -e UT3_TESTER -e UT3_TESTER_PASSWORD -e UT3_TESTER_HELPER -e UT3_TESTER_HELPER_PASSWORD -e UT3_TABLESPACE -e ORACLE_PWD -e CONNECTION_STR -e UTPLSQL_DIR"
#utPLSQL released version directory
- UTPLSQL_DIR="utPLSQL_latest_release"
- SELFTESTING_BRANCH=${TRAVIS_BRANCH}
- UTPLSQL_CLI_VERSION="3.1.8"
# Maven
- MAVEN_HOME=/usr/local/maven
- MAVEN_CFG=$HOME/.m2
matrix:
- ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
- ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_18:-18c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_19:-19c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
jobs:
- ORACLE_VERSION="11g-r2-xe" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_VOLUME="/mnt/host" DOCKER_OPTIONS='--shm-size=1g'
# - ORACLE_VERSION="11-full" CONNECTION_STR='127.0.0.1:1521/XE' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle --shm-size=1g' DOCKER_VOLUME="/mnt/host"
- ORACLE_VERSION="12c-r1-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="12c-r2-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="18-slim" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle'
- ORACLE_VERSION="18c-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="19c-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="21-full" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle'

cache:
pip: true
Expand All @@ -64,6 +76,7 @@ cache:
- $MAVEN_CFG

before_install:

#cache to be used between stages. Based on https://github.com/travis-ci/docs-travis-ci-com/issues/1329
#delete all files in cache that are older than 5 days
- mkdir -p $CACHE_DIR/stages_cache; find $CACHE_DIR/stages_cache/ -mtime +5 -exec rm {} \;
Expand All @@ -72,24 +85,29 @@ before_install:
#Allow for sonar to blame issues
- git fetch --unshallow
# download latest utPLSQL release
#- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-main} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
# download latest utPLSQL-cli release
- curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/download/v${UTPLSQL_CLI_VERSION}/utPLSQL-cli.zip

install:
#- unzip utPLSQL.zip
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
- bash .travis/install_sqlcl.sh
# - curl -Lk -o sqlcl-latest.zip https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip
# - unzip -q sqlcl-latest.zip -d $HOME
- mkdir -p ${OJDBC_HOME} #get JDBC driver and orai18n
- curl -Lk -o ${OJDBC_HOME}/ojdbc8.jar https://download.oracle.com/otn-pub/otn_software/jdbc/213/ojdbc8.jar
- curl -Lk -o ${OJDBC_HOME}/orai18n.jar https://download.oracle.com/otn-pub/otn_software/jdbc/213/orai18n.jar
# Chmod is needed to allow for write access within from docker container volume
- chmod -R go+w ./{source,test,examples,${UTPLSQL_DIR}/source}
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/start_db.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/install.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/install_utplsql_release.sh; fi

before_script:
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install_utplsql_release.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_examples.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/run_examples.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/test/install_tests.sh; fi

script:
- if [[ ! $TRAVIS_TAG ]]; then bash test/install_and_run_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash test/run_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/validate_report_files.sh; fi
- if [[ ! $TRAVIS_TAG ]] && [[ ("${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" && "${TRAVIS_PULL_REQUEST}" == false) || ("${TRAVIS_PULL_REQUEST_SLUG}" = "${UTPLSQL_REPO}") ]]; then bash .travis/run_sonar_scanner.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/coveralls_uploader.sh; fi
Expand Down
2 changes: 1 addition & 1 deletion .travis/coveralls_uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fs.readFile('../coverage.json',function (err,data) {
return console.log(err);
}
req = JSON.parse(data);
req.service_job_id = process.env.TRAVIS_JOB_ID;
req.service_job_id = process.env.JOB_ID;
req.service_name = 'travis-ci';
if (process.env.COVERALLS_REPO_TOKEN) {
req.repo_token = process.env.COVERALLS_REPO_TOKEN;
Expand Down
65 changes: 45 additions & 20 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

cd source
set -ev
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd ${SCRIPT_DIR}/../source

INSTALL_FILE="install_headless_with_trigger.sql"
if [[ ! -f "${INSTALL_FILE}" ]]; then
INSTALL_FILE="install_headless.sql"
fi

#install core of utplsql
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
Expand All @@ -11,33 +17,33 @@ set verify off

--alter session set plsql_warnings = 'ENABLE:ALL', 'DISABLE:(5004,5018,6000,6001,6003,6009,6010,7206)';
alter session set plsql_optimize_level=0;
@install_headless_with_trigger.sql $UT3_OWNER $UT3_OWNER_PASSWORD
@${INSTALL_FILE} $UT3_DEVELOP_SCHEMA $UT3_DEVELOP_SCHEMA_PASSWORD
SQL

#Run this step only on second child job (12.1 - at it's fastest)
if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
if [[ "${JOB_NUMBER}" =~ \.2$ ]]; then

#check code-style for errors
time "$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql
time "$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql

#test install/uninstall process
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback off
set verify off
whenever sqlerror exit failure rollback

@uninstall_all.sql $UT3_OWNER
@uninstall_all.sql $UT3_DEVELOP_SCHEMA
whenever sqlerror exit failure rollback
declare
v_leftover_objects_count integer;
begin
select sum(cnt)
into v_leftover_objects_count
from (
select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
select count(1) cnt from dba_objects where owner = '$UT3_DEVELOP_SCHEMA'
where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
union all
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
select count(1) cnt from dba_synonyms where table_owner = '$UT3_DEVELOP_SCHEMA'
where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
);
if v_leftover_objects_count > 0 then
Expand All @@ -52,9 +58,9 @@ SQL
set verify off

alter session set plsql_optimize_level=0;
@install.sql $UT3_OWNER
@install_ddl_trigger.sql $UT3_OWNER
@create_synonyms_and_grants_for_public.sql $UT3_OWNER
@install.sql $UT3_DEVELOP_SCHEMA
@install_ddl_trigger.sql $UT3_DEVELOP_SCHEMA
@create_synonyms_and_grants_for_public.sql $UT3_DEVELOP_SCHEMA
SQL

fi
Expand All @@ -65,8 +71,8 @@ set feedback off
whenever sqlerror exit failure rollback

--------------------------------------------------------------------------------
PROMPT Adding back create-trigger privilege to $UT3_OWNER for testing
grant administer database trigger to $UT3_OWNER;
PROMPT Adding back create-trigger privilege to $UT3_DEVELOP_SCHEMA for testing
grant administer database trigger to $UT3_DEVELOP_SCHEMA;

--------------------------------------------------------------------------------
PROMPT Creating $UT3_TESTER - Power-user for testing internal framework code
Expand All @@ -76,27 +82,27 @@ grant create session, create procedure, create type, create table to $UT3_TESTER

grant execute on dbms_lock to $UT3_TESTER;

PROMPT Granting $UT3_OWNER code to $UT3_TESTER
PROMPT Granting $UT3_DEVELOP_SCHEMA code to $UT3_TESTER

begin
for i in (
select object_name from all_objects t
where t.object_type in ('PACKAGE','TYPE')
and owner = 'UT3'
and owner = '$UT3_DEVELOP_SCHEMA'
and generated = 'N'
and object_name not like 'SYS%')
loop
execute immediate 'grant execute on ut3."'||i.object_name||'" to UT3_TESTER';
execute immediate 'grant execute on $UT3_DEVELOP_SCHEMA."'||i.object_name||'" to $UT3_TESTER';
end loop;
end;
/

PROMPT Granting $UT3_OWNER tables to $UT3_TESTER
PROMPT Granting $UT3_DEVELOP_SCHEMA tables to $UT3_TESTER

begin
for i in ( select table_name from all_tables t where owner = 'UT3' and nested = 'NO' and iot_name is null)
for i in ( select table_name from all_tables t where owner = '$UT3_DEVELOP_SCHEMA' and nested = 'NO' and iot_name is null)
loop
execute immediate 'grant select on UT3.'||i.table_name||' to UT3_TESTER';
execute immediate 'grant select on $UT3_DEVELOP_SCHEMA.'||i.table_name||' to $UT3_TESTER';
end loop;
end;
/
Expand All @@ -108,6 +114,25 @@ PROMPT Creating $UT3_USER - minimal privileges user for API testing
create user $UT3_USER identified by "$UT3_USER_PASSWORD" default tablespace $UT3_TABLESPACE quota unlimited on $UT3_TABLESPACE;
grant create session, create procedure, create type, create table to $UT3_USER;

PROMPT Grants for starting a debugging session from $UT3_USER
grant debug connect session to $UT3_USER;
grant debug any procedure to $UT3_USER;
begin
\$if dbms_db_version.version <= 11 \$then
null; -- no addition action necessary
\$else
-- necessary on 12c or higher
dbms_network_acl_admin.append_host_ace (
host =>'*',
ace => sys.xs\$ace_type(
privilege_list => sys.xs\$name_list('JDWP') ,
principal_name => '$UT3_USER',
principal_type => sys.xs_acl.ptype_db
)
);
\$end
end;
/

--------------------------------------------------------------------------------
PROMPT Creating $UT3_TESTER_HELPER - provides functions to allow min grant test user setup tests.
Expand All @@ -119,11 +144,11 @@ PROMPT Grants for testing distributed transactions
grant create public database link to $UT3_TESTER_HELPER;
grant drop public database link to $UT3_TESTER_HELPER;

PROMPT Grants for testing coverage outside of main UT3 schema.
PROMPT Grants for testing coverage outside of main $UT3_DEVELOP_SCHEMA schema.
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type,
select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table,
select any dictionary, create any synonym, drop any synonym,
grant any object privilege, grant any privilege
grant any object privilege, grant any privilege, create public synonym, drop public synonym, create any trigger
to $UT3_TESTER_HELPER;

grant create job to $UT3_TESTER_HELPER;
Expand Down
20 changes: 0 additions & 20 deletions .travis/install_sqlcl.sh

This file was deleted.

12 changes: 6 additions & 6 deletions .travis/install_utplsql_release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

set -ev

cd $UTPLSQL_DIR/source
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd ${SCRIPT_DIR}/../${UTPLSQL_DIR}/source

"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<SQL
set serveroutput on
Expand All @@ -11,15 +11,15 @@ set trimspool on
declare
i integer := 0;
begin
dbms_output.put_line('Dropping synonyms pointing to schema '||upper('${UT3_OWNER}'));
dbms_output.put_line('Dropping synonyms pointing to schema '||upper('${UT3_DEVELOP_SCHEMA}'));
for syn in (
select
case when owner = 'PUBLIC'
then 'public synonym '
else 'synonym ' || owner || '.' end || synonym_name as syn_name,
table_owner||'.'||table_name as for_object
from all_synonyms s
where table_owner = upper('${UT3_OWNER}') and table_owner != owner
where table_owner = upper('${UT3_DEVELOP_SCHEMA}') and table_owner != owner
)
loop
i := i + 1;
Expand All @@ -28,7 +28,7 @@ begin
dbms_output.put_line('Dropped '||syn.syn_name||' for object '||syn.for_object);
exception
when others then
dbms_output.put_line('FAILED to drop '||syn.syn_name||' for object '||syn.for_object);
dbms_output.put_line('FAILED to drop '||syn.syn_name||' for object '||syn.for_object||' with error '||sqlerrm);
end;
end loop;
dbms_output.put_line(i||' synonyms dropped');
Expand All @@ -45,7 +45,7 @@ fi
alter session set plsql_optimize_level=0;
alter session set plsql_ccflags = 'SELF_TESTING_INSTALL:TRUE';

@${INSTALL_FILE} ${UT3_RELEASE_VERSION_SCHEMA}
@${INSTALL_FILE} ${UT3_RELEASE_VERSION_SCHEMA} ${UT3_RELEASE_VERSION_SCHEMA_PASSWORD}
exit
SQL

Expand Down
Loading