Skip to content

Commit

Permalink
Add script for dropping the test schemas; add copyright and informati…
Browse files Browse the repository at this point in the history
…on on how

to execute to the SetupTest.sql script.
  • Loading branch information
anthony-tuininga committed Jun 16, 2017
1 parent b543850 commit d008553
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/DropTest.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*-----------------------------------------------------------------------------
* Copyright 2017, Oracle and/or its affiliates. All rights reserved.
*---------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------
* DropTest.sql
* Drops database objects used for testing.
*
* Run this like:
* sqlplus / as sysdba @DropTest
*---------------------------------------------------------------------------*/

begin
for r in
( select username
from dba_users
where username in ('CX_ORACLE', 'CX_ORACLE_PROXY')
) loop
execute immediate 'drop user ' || r.username || ' cascade';
end loop;
end;
/

exit

12 changes: 12 additions & 0 deletions test/SetupTest.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
/*-----------------------------------------------------------------------------
* Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*
* Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
*
* Portions Copyright 2001-2007, Computronix (Canada) Ltd., Edmonton, Alberta,
* Canada. All rights reserved.
*---------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------
* SetupTest.sql
* Creates a user named "CX_ORACLE" and populates its schema with the tables
* and packages necessary for performing the test suite. It also creates a user
* named "CX_ORACLE_PROXY" for testing proxying.
*
* Run this like:
* sqlplus / as sysdba @SetupTest
*---------------------------------------------------------------------------*/

whenever sqlerror exit failure
Expand Down

0 comments on commit d008553

Please sign in to comment.