Skip to content

Commit f3f1ca5

Browse files
committed
Add demo project with failing tests example
1 parent c5fc626 commit f3f1ca5

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ install:
3131
- bash .travis/maven_cfg.sh
3232
- bash .travis/start_db.sh
3333
- bash .travis/install_utplsql.sh
34+
- bash .travis/install_demo_project.sh
3435

3536
script:
3637
- mvn test -B

.travis/install_demo_project.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
set -ev
3+
cd $(dirname $(readlink -f $0))
4+
5+
PROJECT_FILE="utPLSQL-demo-project"
6+
git clone -b develop --single-branch https://github.com/utPLSQL/utPLSQL-demo-project.git
7+
8+
cat > demo_project.sh.tmp <<EOF
9+
sqlplus -S -L sys/oracle@//127.0.0.1:1521/xe AS SYSDBA <<SQL
10+
create user ${DB_USER} identified by ${DB_PASS} quota unlimited on USERS default tablespace USERS;
11+
grant create session, create procedure, create type, create table, create sequence, create view to ${DB_USER};
12+
grant select any dictionary to ${DB_USER};
13+
exit
14+
SQL
15+
16+
cd ${PROJECT_FILE}
17+
sqlplus -S -L ${DB_USER}/${DB_PASS}@//127.0.0.1:1521/xe <<SQL
18+
whenever sqlerror exit failure rollback
19+
whenever oserror exit failure rollback
20+
21+
@source/award_bonus/employees_test.sql
22+
@source/award_bonus/award_bonus.prc
23+
24+
@source/between_string/betwnstr.fnc
25+
26+
@source/remove_rooms_by_name/rooms.sql
27+
@source/remove_rooms_by_name/remove_rooms_by_name.prc
28+
29+
@test/award_bonus/test_award_bonus.pks
30+
@test/award_bonus/test_award_bonus.pkb
31+
32+
@test/between_string/test_betwnstr.pks
33+
@test/between_string/test_betwnstr.pkb
34+
35+
@test/remove_rooms_by_name/test_remove_rooms_by_name.pks
36+
@test/remove_rooms_by_name/test_remove_rooms_by_name.pkb
37+
38+
exit
39+
SQL
40+
EOF
41+
42+
docker cp ./$PROJECT_FILE $ORACLE_VERSION:/$PROJECT_FILE
43+
docker cp ./demo_project.sh.tmp $ORACLE_VERSION:/demo_project.sh
44+
docker exec $ORACLE_VERSION bash demo_project.sh

.travis/install_utplsql.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ git clone -b develop --single-branch https://github.com/utPLSQL/utPLSQL.git
1515

1616
# Create a temporary install script.
1717
cat > install.sh.tmp <<EOF
18-
# tar -xzf $UTPLSQL_FILE.tar.gz && rm $UTPLSQL_FILE.tar.gz
19-
cd /$UTPLSQL_FILE/source
18+
# tar -xzf ${UTPLSQL_FILE}.tar.gz && rm ${UTPLSQL_FILE}.tar.gz
19+
cd ${UTPLSQL_FILE}/source
2020
sqlplus -S -L sys/oracle@//127.0.0.1:1521/xe AS SYSDBA @install_headless.sql ut3 ut3 users
2121
EOF
2222

0 commit comments

Comments
 (0)