-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70cd9d6
commit 6fb113e
Showing
10 changed files
with
254 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Maven settings file needed to configure wagon that will allow pulling jdbc driver to docker host --> | ||
<settings> | ||
<servers> | ||
<server> | ||
<id>maven.oracle.com</id> | ||
<username>${OTN_USERNAME}</username> | ||
<password>${OTN_PASSWORD}</password> | ||
<configuration> | ||
<basicAuthScope> | ||
<host>ANY</host> | ||
<port>ANY</port> | ||
<realm>OAM 11g</realm> | ||
</basicAuthScope> | ||
<httpConfiguration> | ||
<all> | ||
<params> | ||
<property> | ||
<name>http.protocol.allow-circular-redirects</name> | ||
<value>%b,true</value> | ||
</property> | ||
</params> | ||
</all> | ||
</httpConfiguration> | ||
</configuration> | ||
</server> | ||
</servers> | ||
<profiles> | ||
<profile> | ||
<id>main</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<repositories> | ||
<repository> | ||
<id>maven.oracle.com</id> | ||
<url>https://maven.oracle.com</url> | ||
<layout>default</layout> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
</profiles> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
alter session set "_ORACLE_SCRIPT"=true; | ||
CREATE USER quill_test IDENTIFIED BY "QuillRocks!" QUOTA 50M ON system; | ||
GRANT DBA TO quill_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "Setting up Oracle" | ||
|
||
until sqlplus 'sys/Oradoc_db1@ORCLCDB as sysdba' < /home/oracle/setup/external_match_script.sql | grep "match_this_test_to_pass"; do | ||
echo "Trying Again" | ||
sleep 5; | ||
done | ||
|
||
until sqlplus 'sys/Oradoc_db1@ORCLCDB as sysdba' < /home/oracle/setup/external_match_script.sql | ||
|
||
echo "Succeeded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
select 'match_this_test_to_pass' from DUAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
echo "Running Global Oracle Init" | ||
|
||
# Start the oracle database | ||
nohup ./dockerInit.sh & | ||
|
||
# Save the pid which we need to wait for (otherwise container will exit) | ||
pid=$! | ||
|
||
echo "Waiting for Oracle Setup to Complete" | ||
|
||
until source /home/oracle/.bashrc; sqlplus 'sys/Oradoc_db1@ORCLCDB as sysdba' < /oracle_setup/external_match_script.sql | grep "match_this_test_to_pass"; do | ||
echo "Trying Again" | ||
sleep 5; | ||
done | ||
|
||
echo "Sourcing In Main Body" | ||
source /home/oracle/.bashrc | ||
env | ||
|
||
echo "Now Running Test script" | ||
sqlplus 'sys/Oradoc_db1@ORCLCDB as sysdba' < /oracle_setup/create_quill_test.sql | ||
|
||
#echo "Now Running Schema Setup" | ||
#sqlplus 'quill_test/QuillRocks!@ORCLCDB as sysdba' < /quill_setup/oracle-schema.sql | ||
|
||
echo "Oracle Setup Complete" | ||
|
||
# Wait until oracle DB externally closed | ||
wait $pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
CREATE TABLE Person( | ||
name VARCHAR(255), | ||
age int | ||
); | ||
|
||
CREATE TABLE Couple( | ||
her VARCHAR(255), | ||
him VARCHAR(255) | ||
); | ||
|
||
CREATE TABLE Department( | ||
dpt VARCHAR(255) | ||
); | ||
|
||
CREATE TABLE Employee( | ||
emp VARCHAR(255), | ||
dpt VARCHAR(255), | ||
salary int | ||
); | ||
|
||
CREATE TABLE Task( | ||
emp VARCHAR(255), | ||
tsk VARCHAR(255) | ||
); | ||
|
||
CREATE TABLE EncodingTestEntity( | ||
v1 VARCHAR(255), | ||
v2 DECIMAL(5,2), | ||
v3 SMALLINT, | ||
v4 SMALLINT, | ||
v5 SMALLINT, | ||
v6 INTEGER, | ||
v7 NUMBER, | ||
v8 FLOAT, | ||
v9 DOUBLE PRECISION, | ||
v10 BLOB, | ||
v11 TIMESTAMP, | ||
v12 VARCHAR(255), | ||
v13 DATE, | ||
v14 VARCHAR(36), | ||
o1 VARCHAR(255), | ||
o2 DECIMAL(5,2), | ||
o3 SMALLINT, | ||
o4 SMALLINT, | ||
o5 SMALLINT, | ||
o6 INTEGER, | ||
o7 NUMBER, | ||
o8 FLOAT, | ||
o9 DOUBLE PRECISION, | ||
o10 BLOB, | ||
o11 TIMESTAMP, | ||
o12 VARCHAR(255), | ||
o13 DATE, | ||
o14 VARCHAR(36) | ||
); | ||
|
||
|
||
CREATE TABLE TestEntity( | ||
s VARCHAR(255), | ||
i INTEGER primary key, | ||
l NUMBER, | ||
o INTEGER | ||
); | ||
|
||
CREATE TABLE TestEntity2( | ||
s VARCHAR(255), | ||
i INTEGER, | ||
l NUMBER | ||
); | ||
|
||
CREATE TABLE TestEntity3( | ||
s VARCHAR(255), | ||
i INTEGER, | ||
l NUMBER | ||
); | ||
|
||
CREATE TABLE TestEntity4( | ||
i INTEGER PRIMARY KEY | ||
); | ||
|
||
CREATE TABLE Product( | ||
description VARCHAR(255), | ||
id INTEGER PRIMARY KEY, | ||
sku NUMBER | ||
); | ||
|
||
CREATE TABLE DateEncodingTestEntity ( | ||
v1 DATE, | ||
v2 TIMESTAMP, | ||
v3 TIMESTAMP WITH TIME ZONE | ||
); | ||
|
||
CREATE TABLE Contact( | ||
firstName VARCHAR(255), | ||
lastName VARCHAR(255), | ||
age int, | ||
addressFk int, | ||
extraInfo VARCHAR(255) | ||
); | ||
|
||
CREATE TABLE Address( | ||
id int, | ||
street VARCHAR(255), | ||
zip int, | ||
otherExtraInfo VARCHAR(255) | ||
); |