Skip to content

Commit ca54752

Browse files
authored
Merge pull request #5 from viniciusam/develop
Fix travis build
2 parents 723babe + 02e7a70 commit ca54752

File tree

8 files changed

+21
-23
lines changed

8 files changed

+21
-23
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ 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+
- 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

2123
cache:
2224
directories:
2325
- $DOCKER_CFG
24-
- $HOME/.m2
26+
- $MAVEN_CFG
2527
- $MAVEN_HOME/lib/ext # Used to cache wagon-http lib.
2628

2729
install:

.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"

.travis/maven_cfg.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
set -ev
33
cd $(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
118
fi
129

@@ -21,8 +18,7 @@ curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.
2118
sudo 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

src/main/java/io/github/utplsql/api/types/CustomTypes.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package io.github.utplsql.api.types;
22

33
/**
4-
* Created by Vinicius on 13/04/2017.
5-
* DBHelper custom data types.
4+
* Database custom data types.
65
*/
76
public enum CustomTypes {
87
// Object names must be upper case.
98
UT_DOCUMENTATION_REPORTER("UT_DOCUMENTATION_REPORTER"),
109
UT_COVERAGE_HTML_REPORTER("UT_COVERAGE_HTML_REPORTER"),
11-
UT_VARCHAF2_LIST("UT_VARCHAR2_LIST");
10+
UT_VARCHAR2_LIST("UT_VARCHAR2_LIST");
1211

1312
private String typeName;
1413

src/test/java/io/github/utplsql/api/OutputBufferTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
public class OutputBufferTest {
2222

2323
@Rule
24-
public static final DatabaseRule db = new DatabaseRule();
24+
public final DatabaseRule db = new DatabaseRule();
2525

2626
public BaseReporter createReporter() throws SQLException {
2727
Connection conn = db.newConnection();

src/test/java/io/github/utplsql/api/TestRunnerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
public class TestRunnerTest {
1717

1818
@Rule
19-
public static final DatabaseRule db = new DatabaseRule();
19+
public final DatabaseRule db = new DatabaseRule();
2020

2121
@Test
2222
public void runWithDocumentationReporter() {

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)