File tree Expand file tree Collapse file tree 5 files changed +17
-18
lines changed
src/test/java/io/github/utplsql/api/rules Expand file tree Collapse file tree 5 files changed +17
-18
lines changed Original file line number Diff line number Diff line change 1313 - DOCKER_CFG=$HOME/.docker
1414 - DOCKER_REPO="viniciusam/oracledb"
1515 - MAVEN_HOME=/usr/local/maven
16- - DB_USER=app
17- - DB_PASS=app
16+ - MAVEN_CFG=$HOME/.m2
17+ - API_DB_URL="127.0.0.1:1521:XE"
18+ - API_DB_USER=api
19+ - API_DB_PASS=api
1820 matrix :
1921 - ORACLE_VERSION="11g-xe-r2" CONNECTION_STR="127.0.0.1:1521/XE" DOCKER_OPTIONS="--shm-size=1g"
2022
2123cache :
2224 directories :
2325 - $DOCKER_CFG
24- - $HOME/.m2
26+ - $MAVEN_CFG
2527 - $MAVEN_HOME/lib/ext # Used to cache wagon-http lib.
2628
2729install :
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -ev
33
4- sqlplus -S -L sys/oracle@// $CONNECTION_STR AS SYSDBA << EOF
4+ sqlplus -S -L / AS SYSDBA << EOF
55create user $DB_USER identified by $DB_PASS
66quota unlimited on USERS
77default tablespace USERS;
Original file line number Diff line number Diff line change 2323# docker cp ./$UTPLSQL_FILE.tar.gz $ORACLE_VERSION:/$UTPLSQL_FILE.tar.gz
2424docker cp ./$UTPLSQL_FILE $ORACLE_VERSION :/$UTPLSQL_FILE
2525docker cp ./install.sh.tmp $ORACLE_VERSION :/install.sh
26+ docker cp ./create_api_user.sh $ORACLE_VERSION :/create_api_user.sh
2627
2728# Remove temporary files.
2829# rm $UTPLSQL_FILE.tar.gz
2930rm install.sh.tmp
3031
3132# Execute the utPLSQL installation inside the container.
32- docker exec $ORACLE_VERSION bash install.sh
33+ docker exec $ORACLE_VERSION bash -c " install.sh && create_api_user.sh "
Original file line number Diff line number Diff line change 22set -ev
33cd $( dirname $( readlink -f $0 ) )
44
5- mavenSettings=$HOME /.m2/settings.xml
6- mavenCached=$HOME /.m2/.cached
7-
8- if [ -f $mavenCached ]; then
9- echo " Using cached maven user config..."
5+ if [ -f $MAVEN_CFG /repository ]; then
6+ echo " Using cached maven dependencies..."
107 exit 0
118fi
129
@@ -21,8 +18,7 @@ curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.
2118sudo mv wagon-http-2.8-shaded.jar $MAVEN_HOME /lib/ext/
2219
2320# Create the settings file with oracle server config.
24- cp settings.tmpl.xml $mavenSettings
25- sed -i -e " s|###USERNAME###|$ORACLE_OTN_USER |g" $mavenSettings
26- sed -i -e " s|###PASSWORD###|$ORACLE_OTN_PASSWORD |g" $mavenSettings
27-
28- touch $mavenCached
21+ cp settings.xml $MAVEN_CFG /settings.xml
22+ # cp settings.tmpl.xml $MAVEN_CFG/settings.xml
23+ # sed -i -e "s|###USERNAME###|$ORACLE_OTN_USER|g" $MAVEN_CFG/settings.xml
24+ # sed -i -e "s|###PASSWORD###|$ORACLE_OTN_PASSWORD|g" $MAVEN_CFG/settings.xml
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ public class DatabaseRule extends ExternalResource {
1818 private static String sPass ;
1919
2020 static {
21- sUrl = System .getenv ("DB_URL " ) != null ? System .getenv ("DB_URL " ) : "127.0.0.1:1521:XE" ;
22- sUser = System .getenv ("DB_USER " ) != null ? System .getenv ("DB_USER " ) : "app" ;
23- sPass = System .getenv ("DB_PASS " ) != null ? System .getenv ("DB_PASS " ) : "app" ;
21+ sUrl = System .getenv ("API_DB_URL " ) != null ? System .getenv ("API_DB_URL " ) : "127.0.0.1:1521:XE" ;
22+ sUser = System .getenv ("API_DB_USER " ) != null ? System .getenv ("API_DB_USER " ) : "app" ;
23+ sPass = System .getenv ("API_DB_PASS " ) != null ? System .getenv ("API_DB_PASS " ) : "app" ;
2424 }
2525
2626 private List <Connection > connectionList ;
You can’t perform that action at this time.
0 commit comments