From: Kees Monshouwer Date: Wed, 8 Jan 2014 08:25:18 +0000 (+0100) Subject: use new goracle-drop-schema.sql in regression tests X-Git-Tag: rec-3.6.0-rc1~255^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1201%2Fhead;p=thirdparty%2Fpdns.git use new goracle-drop-schema.sql in regression tests --- diff --git a/modules/goraclebackend/goracle-drop-schema.sql b/modules/goraclebackend/goracle-drop-schema.sql new file mode 100644 index 0000000000..cf23c81f5b --- /dev/null +++ b/modules/goraclebackend/goracle-drop-schema.sql @@ -0,0 +1,16 @@ +DROP TABLE records; +DROP SEQUENCE records_id_sequence; + +DROP TABLE domains; +DROP SEQUENCE domains_id_sequence; + +DROP TABLE supermasters; + +DROP TABLE domainmetadata; +DROP SEQUENCE domainmetadata_id_sequence; + +DROP TABLE cryptokeys; +DROP SEQUENCE cryptokeys_id_sequence; + +DROP TABLE tsigkeys; +DROP SEQUENCE tsigkeys_id_sequence; diff --git a/regression-tests/.gitignore b/regression-tests/.gitignore index 41ef4df72b..892e1b69f0 100644 --- a/regression-tests/.gitignore +++ b/regression-tests/.gitignore @@ -38,5 +38,7 @@ real_result /dsset-* /bind.conf /bind-slave.conf +/goracle.log +/goracle2.log /oracle.log /oracle2.log diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index a98da1e04a..670ab58b78 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -811,11 +811,9 @@ __EOF__ [ -z "$GORACLEUSER" ] && GORACLEUSER=pdns [ -z "$GORACLEPASSWD" ] && GORACLEPASSWD=pdns - echo "DROP USER $GORACLEUSER CASCADE;" | sqlplus -S powerdns/powerdns > oracle.log || true - echo "CREATE USER $GORACLEUSER IDENTIFIED BY $GORACLEPASSWD;" | sqlplus -S powerdns/powerdns >> oracle.log - echo "GRANT CONNECT, RESOURCE TO $GORACLEUSER;" | sqlplus -S powerdns/powerdns >> oracle.log - sqlplus -S $GORACLEUSER/$GORACLEPASSWD@xe < ../modules/goraclebackend/goracle-schema.sql >> oracle.log - tosql goracle | sqlplus -S $GORACLEUSER/$GORACLEPASSWD@xe >> oracle.log + echo "START ../modules/goraclebackend/goracle-drop-schema;" | sqlplus -S $GORACLEUSER/$GORACLEPASSWD@xe > goracle.log + echo "START ../modules/goraclebackend/goracle-schema;" | sqlplus -S $GORACLEUSER/$GORACLEPASSWD@xe >> goracle.log + tosql goracle | sqlplus -S $GORACLEUSER/$GORACLEPASSWD@xe >> goracle.log cat > pdns-goracle.conf << __EOF__ launch=goracle @@ -1140,10 +1138,8 @@ startslave () [ -z "$GORACLE2USER" ] && GORACLE2USER=pdns2 [ -z "$GORACLE2PASSWD" ] && GORACLE2PASSWD=pdns - echo "DROP USER $GORACLE2USER CASCADE;" | sqlplus -S powerdns/powerdns > oracle2.log || true - echo "CREATE USER $GORACLE2USER IDENTIFIED BY $GORACLE2PASSWD;" | sqlplus -S powerdns/powerdns >> oracle2.log - echo "GRANT CONNECT, RESOURCE TO $GORACLE2USER;" | sqlplus -S powerdns/powerdns >> oracle2.log - sqlplus -S $GORACLE2USER/$GORACLE2PASSWD@xe < ../modules/goraclebackend/goracle-schema.sql >> oracle2.log + echo "START ../modules/goraclebackend/goracle-drop-schema;" | sqlplus -S $GORACLE2USER/$GORACLE2PASSWD@xe > goracle2.log + echo "START ../modules/goraclebackend/goracle-schema;" | sqlplus -S $GORACLE2USER/$GORACLE2PASSWD@xe >> goracle2.log cat > pdns-goracle2.conf << __EOF__ launch=goracle @@ -1159,7 +1155,7 @@ __EOF__ for zone in $(grep zone named.conf | cut -f2 -d\" | tac) do - echo "INSERT INTO domains (id, name, type, master) VALUES(domains_id_sequence.nextval, '$zone', 'SLAVE', '127.0.0.1:$port');" | sqlplus -S $GORACLE2USER/$GORACLE2PASSWD@xe >> oracle2.log + echo "INSERT INTO domains (id, name, type, master) VALUES(domains_id_sequence.nextval, '$zone', 'SLAVE', '127.0.0.1:$port');" | sqlplus -S $GORACLE2USER/$GORACLE2PASSWD@xe >> goracle2.log done set +e