Skip to content
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

Feature/introduce testing with accurate grants #893

Merged
merged 36 commits into from Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
133ecae
Adding new API user.
lwasylow Mar 22, 2019
9db8f4b
Separating tests.
lwasylow Mar 23, 2019
13f772a
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Mar 24, 2019
c56943e
Update properties
lwasylow Mar 24, 2019
5afba10
Change user that executes tests as helper that is super user.
lwasylow Mar 24, 2019
7cd92e7
Adding next set of tests migrated.
lwasylow Mar 24, 2019
e2561bc
Adding next set of tests migrated.
lwasylow Mar 25, 2019
887e46a
Fixing test package
lwasylow Mar 25, 2019
28dbd1e
Added set of tests:
lwasylow Mar 25, 2019
d7eb125
Adding set of tests :
lwasylow Mar 25, 2019
99e1099
Adding schema prefix to failing tests from 12.1
lwasylow Mar 25, 2019
04cd36c
Fixing development scripts
lwasylow Mar 25, 2019
3e98723
Fixed bug for deployments with uninstall included.
jgebal Mar 25, 2019
ba83f8f
Merge branch 'feature/introduce_testing_with_accurate_grants' of gith…
lwasylow Mar 26, 2019
0bf1d9e
FIX : removal of non existing types from uninstall script
lwasylow Mar 26, 2019
e914d96
INSTALL:Is it too many monkeys ?:)
lwasylow Mar 26, 2019
174dcbc
Adding set of tests:
lwasylow Mar 26, 2019
0c05daf
Adding set of tests:
lwasylow Mar 26, 2019
80783c3
Adding set of tests:
lwasylow Mar 28, 2019
c4b08af
Adding set of tests:
lwasylow Mar 28, 2019
0618616
Adding set of tests:
lwasylow Mar 28, 2019
29295b7
Adding set of tests:
lwasylow Mar 29, 2019
30b0cfe
Adding set of tests:
lwasylow Mar 29, 2019
3cc34ea
Adding tests
lwasylow Mar 29, 2019
a6a848d
Adding tests:
lwasylow Mar 30, 2019
858372c
Adding set of tests:
lwasylow Mar 31, 2019
620fd61
Adding extra tests:
lwasylow Mar 31, 2019
e6b0673
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Mar 31, 2019
c508e79
Adding tests:
lwasylow Apr 1, 2019
858a675
Fixing broken test.
lwasylow Apr 1, 2019
1642f47
Adding test:
lwasylow Apr 1, 2019
30d27fe
Adding global setup
lwasylow Apr 1, 2019
3b07c6a
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Apr 2, 2019
a8dfa14
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/int…
lwasylow Apr 2, 2019
5d3b18c
Update cleanup script after branching from random order branch
lwasylow Apr 2, 2019
b56d27a
Fixed invalid suitepath in `core` package.
jgebal Apr 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -25,6 +25,8 @@ env:
- UT3_USER_PASSWORD=ut3
- UT3_TESTER=ut3_tester
- UT3_TESTER_PASSWORD=ut3
- UT3_TESTER_HELPER=ut3_tester_helper
- UT3_TESTER_HELPER_PASSWORD=ut3
- UT3_TABLESPACE=users
# Environment for building a release
- CURRENT_BRANCH=${TRAVIS_BRANCH}
Expand Down
30 changes: 18 additions & 12 deletions .travis/install.sh
Expand Up @@ -47,6 +47,7 @@ SQL

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

fi
Expand All @@ -60,27 +61,32 @@ grant select any dictionary to $UT3_OWNER;
grant create any procedure, drop any procedure, execute any procedure to $UT3_OWNER;
SQL

#Create user that will own the tests
#Create user that will own the tests that are relevant to internal framework
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback off
@create_utplsql_owner.sql $UT3_TESTER $UT3_TESTER_PASSWORD $UT3_TABLESPACE

--needed for testing distributed transactions
grant create public database link to $UT3_TESTER;
grant drop public database link to $UT3_TESTER;
set feedback on
--Needed for testing coverage outside of main UT3 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 to $UT3_TESTER;
revoke execute on dbms_crypto from $UT3_TESTER;
grant create job to $UT3_TESTER;
exit
SQL

#Create additional UT3$USER# to test for special characters
#Create additional UT3$USER# to test for special characters and front end API testing
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback off
@create_utplsql_owner.sql $UT3_USER $UT3_USER_PASSWORD $UT3_TABLESPACE
--Grant UT3 framework to UT3$USER#
--Grant UT3 framework to min user
@create_user_grants.sql $UT3_OWNER $UT3_USER
exit
SQL

#Create additional UT3_TESTER_HELPER that will provide a functions to allow min grant test user setup test
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback off
@create_utplsql_owner.sql $UT3_TESTER_HELPER $UT3_TESTER_HELPER_PASSWORD $UT3_TABLESPACE
--needed for testing distributed transactions
grant create public database link to $UT3_TESTER_HELPER;
grant drop public database link to $UT3_TESTER_HELPER;
set feedback on
--Needed for testing coverage outside of main UT3 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 to $UT3_TESTER_HELPER;
grant create job to $UT3_TESTER_HELPER;
exit
SQL
6 changes: 3 additions & 3 deletions development/cleanup.sh
Expand Up @@ -7,7 +7,6 @@ git rev-parse && cd "$(git rev-parse --show-cdup)"

"${SQLCLI}" sys/${ORACLE_PWD}@//${CONNECTION_STR} AS SYSDBA <<-SQL
set echo on
set serveroutput on
begin
for x in (
select * from dba_objects
Expand All @@ -22,16 +21,17 @@ end;
drop user ${UT3_OWNER} cascade;
drop user ${UT3_RELEASE_VERSION_SCHEMA} cascade;
drop user ${UT3_TESTER} cascade;
drop user ${UT3_TESTER_HELPER} cascade;
drop user ${UT3_USER} cascade;

begin
for i in (
select decode(owner,'PUBLIC','drop public synonym "','drop synonym "'||owner||'"."')|| synonym_name ||'"' drop_orphaned_synonym, owner||'.'||synonym_name syn from dba_synonyms a
lwasylow marked this conversation as resolved.
Show resolved Hide resolved
select decode(owner,'PUBLIC','drop public synonym "','drop synonym "'||owner||'"."')|| synonym_name ||'"' drop_orphaned_synonym from dba_synonyms a
where not exists (select 1 from dba_objects b where (a.table_name=b.object_name and a.table_owner=b.owner or b.owner='SYS' and a.table_owner=b.object_name) )
and a.table_owner not in ('SYS','SYSTEM')
) loop
dbms_output.put_line(i.drop_orphaned_synonym);
execute immediate i.drop_orphaned_synonym;
dbms_output.put_line('synonym '||i.syn||' dropped');
end loop;
end;
/
Expand Down
5 changes: 4 additions & 1 deletion development/template.env.sh
Expand Up @@ -13,7 +13,10 @@ export UT3_OWNER_PASSWORD=ut3
export UT3_RELEASE_VERSION_SCHEMA=ut3_latest_release
export UT3_TESTER=ut3_tester
export UT3_TESTER_PASSWORD=ut3
export UT3_TESTER_HELPER=ut3_tester_helper
export UT3_TESTER_HELPER_PASSWORD=ut3
export UT3_TABLESPACE=users
export UT3_USER="UT3\$USER#"
export UT3_USER_PASSWORD=ut3

export UT3_TESTER_HELPER=ut3_tester_helper
lwasylow marked this conversation as resolved.
Show resolved Hide resolved
export UT3_TESTER_HELPER_PASSWORD=ut3
4 changes: 0 additions & 4 deletions source/uninstall_objects.sql
Expand Up @@ -137,10 +137,6 @@ drop type ut_data_value_boolean force;

drop type ut_data_value_blob force;

drop type ut_data_value_object force;
jgebal marked this conversation as resolved.
Show resolved Hide resolved

drop type ut_data_value_collection force;

drop type ut_data_value_anydata force;

drop type ut_data_value_xmltype force;
Expand Down