Test Script for Gateway Statement when csqlserver is not running
[csql/przemoc.git] / test / jdbc / Gateway / test051.ksh
blob8befcb8a49b9f1691b266242dd0b4017c65c8fe4
1 #!/bin/sh
2 # Connect with connectstring "jdbc:gateway"
3 # Create a table and index for that table. Then do (INSERT/UPDATE/DELETE/SELECT) with no params statement. when csqlserver is not runnig
4 # GwTest11.java
5 TESTFILE=${PWD}/jdbc/Gateway/ConnTest01.java
6 REL_PATH=.
7 if [ -s "$TESTFILE" ]
8 then
9 REL_PATH=`pwd`/jdbc/Gateway
11 export CLASSPATH=$CLASSPATH:${REL_PATH}
12 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
13 echo "create table T1 (f1 int,f2 char(10),primary key(f1));" >${REL_PATH}/t1create.sql
14 isql $DSN < ${REL_PATH}/t1create.sql >/dev/null 2>&1
15 if [ $? -ne 0 ]
16 then
17 rm -f ${REL_PATH}/t1create.sql
18 exit 1;
20 java GwTest11
21 if [ $? -ne 0 ]
22 then
23 exit 2;
26 echo "drop table T1;">${REL_PATH}/dp.sql
27 isql $DSN < ${REL_PATH}/dp.sql >/dev/null 2>&1
28 rm -f ${REL_PATH}/dp.sql
29 rm -f ${REL_PATH}/t1create.sql
31 exit 0;