Skip to content

Commit 22dd715

Browse files
committed
Fix build
1 parent 525cd1c commit 22dd715

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ env:
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+
- API_DB_URL="127.0.0.1:1521:XE"
17+
- API_DB_USER=api
18+
- API_DB_PASS=api
1819
matrix:
1920
- ORACLE_VERSION="11g-xe-r2" CONNECTION_STR="127.0.0.1:1521/XE" DOCKER_OPTIONS="--shm-size=1g"
2021

.travis/create_app_user.sh renamed to .travis/create_api_user.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -ev
33

4-
sqlplus -S -L sys/oracle@//$CONNECTION_STR AS SYSDBA <<EOF
4+
sqlplus -S -L / AS SYSDBA <<EOF
55
create user $DB_USER identified by $DB_PASS
66
quota unlimited on USERS
77
default tablespace USERS;

.travis/install_utplsql.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ EOF
2323
# docker cp ./$UTPLSQL_FILE.tar.gz $ORACLE_VERSION:/$UTPLSQL_FILE.tar.gz
2424
docker cp ./$UTPLSQL_FILE $ORACLE_VERSION:/$UTPLSQL_FILE
2525
docker 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
2930
rm 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"

src/test/java/io/github/utplsql/api/rules/DatabaseRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)