File tree Expand file tree Collapse file tree 8 files changed +21
-23
lines changed
main/java/io/github/utplsql/api/types
test/java/io/github/utplsql/api Expand file tree Collapse file tree 8 files changed +21
-23
lines changed Original file line number Diff line number Diff line change 13
13
- DOCKER_CFG=$HOME/.docker
14
14
- DOCKER_REPO="viniciusam/oracledb"
15
15
- 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
18
20
matrix :
19
21
- ORACLE_VERSION="11g-xe-r2" CONNECTION_STR="127.0.0.1:1521/XE" DOCKER_OPTIONS="--shm-size=1g"
20
22
21
23
cache :
22
24
directories :
23
25
- $DOCKER_CFG
24
- - $HOME/.m2
26
+ - $MAVEN_CFG
25
27
- $MAVEN_HOME/lib/ext # Used to cache wagon-http lib.
26
28
27
29
install :
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -ev
3
3
4
- sqlplus -S -L sys/oracle@// $CONNECTION_STR AS SYSDBA << EOF
4
+ sqlplus -S -L / AS SYSDBA << EOF
5
5
create user $DB_USER identified by $DB_PASS
6
6
quota unlimited on USERS
7
7
default tablespace USERS;
Original file line number Diff line number Diff line change 23
23
# docker cp ./$UTPLSQL_FILE.tar.gz $ORACLE_VERSION:/$UTPLSQL_FILE.tar.gz
24
24
docker cp ./$UTPLSQL_FILE $ORACLE_VERSION :/$UTPLSQL_FILE
25
25
docker cp ./install.sh.tmp $ORACLE_VERSION :/install.sh
26
+ docker cp ./create_api_user.sh $ORACLE_VERSION :/create_api_user.sh
26
27
27
28
# Remove temporary files.
28
29
# rm $UTPLSQL_FILE.tar.gz
29
30
rm install.sh.tmp
30
31
31
32
# 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 2
2
set -ev
3
3
cd $( dirname $( readlink -f $0 ) )
4
4
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..."
10
7
exit 0
11
8
fi
12
9
@@ -21,8 +18,7 @@ curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.
21
18
sudo mv wagon-http-2.8-shaded.jar $MAVEN_HOME /lib/ext/
22
19
23
20
# 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 1
1
package io .github .utplsql .api .types ;
2
2
3
3
/**
4
- * Created by Vinicius on 13/04/2017.
5
- * DBHelper custom data types.
4
+ * Database custom data types.
6
5
*/
7
6
public enum CustomTypes {
8
7
// Object names must be upper case.
9
8
UT_DOCUMENTATION_REPORTER ("UT_DOCUMENTATION_REPORTER" ),
10
9
UT_COVERAGE_HTML_REPORTER ("UT_COVERAGE_HTML_REPORTER" ),
11
- UT_VARCHAF2_LIST ("UT_VARCHAR2_LIST" );
10
+ UT_VARCHAR2_LIST ("UT_VARCHAR2_LIST" );
12
11
13
12
private String typeName ;
14
13
Original file line number Diff line number Diff line change 21
21
public class OutputBufferTest {
22
22
23
23
@ Rule
24
- public static final DatabaseRule db = new DatabaseRule ();
24
+ public final DatabaseRule db = new DatabaseRule ();
25
25
26
26
public BaseReporter createReporter () throws SQLException {
27
27
Connection conn = db .newConnection ();
Original file line number Diff line number Diff line change 16
16
public class TestRunnerTest {
17
17
18
18
@ Rule
19
- public static final DatabaseRule db = new DatabaseRule ();
19
+ public final DatabaseRule db = new DatabaseRule ();
20
20
21
21
@ Test
22
22
public void runWithDocumentationReporter () {
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ public class DatabaseRule extends ExternalResource {
18
18
private static String sPass ;
19
19
20
20
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" ;
24
24
}
25
25
26
26
private List <Connection > connectionList ;
You can’t perform that action at this time.
0 commit comments