Changeset: 334779988c7d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=334779988c7d
Added Files:
        sql/test/Tests/comment-dump-cleanup.sql
Modified Files:
        sql/test/Tests/All
        sql/test/Tests/comment-dump.SQL.py
        sql/test/Tests/comment-dump.sql
        sql/test/Tests/comment-on.sql
Branch: default
Log Message:

Properly clean up schema 'foo'


diffs (93 lines):

diff --git a/sql/test/Tests/All b/sql/test/Tests/All
--- a/sql/test/Tests/All
+++ b/sql/test/Tests/All
@@ -1,3 +1,9 @@
+
+# Run these first so comment-dump doesn't encounter
+# leftovers from other tests
+comment-dump
+comment-on
+comment-auth
 
 bincopycollist-prepare
 bincopycollist
@@ -101,9 +107,6 @@ median_stdev
 ifexists
 ifexists-views
 subqueries
-comment-on
-comment-dump
-comment-auth
 
 #HAVE_GEOM?trace
 
diff --git a/sql/test/Tests/comment-dump-cleanup.sql 
b/sql/test/Tests/comment-dump-cleanup.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/comment-dump-cleanup.sql
@@ -0,0 +1,14 @@
+DROP FUNCTION foo.f();
+DROP PROCEDURE foo.g();
+DROP FUNCTION foo.f(INT);
+DROP FUNCTION foo.f(INT, INT);
+DROP FUNCTION foo.f(INT, INT, INT);
+DROP FUNCTION foo.f(INT, INT, INT, INT);
+
+DROP SEQUENCE foo.counter;
+
+DROP VIEW foo.vivi;
+
+DROP TABLE foo.tab;
+
+DROP SCHEMA foo;
diff --git a/sql/test/Tests/comment-dump.SQL.py 
b/sql/test/Tests/comment-dump.SQL.py
--- a/sql/test/Tests/comment-dump.SQL.py
+++ b/sql/test/Tests/comment-dump.SQL.py
@@ -26,3 +26,12 @@ d2 = process.client('sqldump', args=['-f
 out, err = d2.communicate()
 sys.stdout.write(out)
 sys.stderr.write(err)
+
+p = process.client('sql',
+                   stdin = open(os.path.join(os.getenv('TSTSRCDIR'),
+                                             'comment-dump-cleanup.sql')),
+                   stdout = process.PIPE, stderr = process.PIPE,
+                   log = True)
+out, err = p.communicate()
+sys.stdout.write(out)
+sys.stderr.write(err)
diff --git a/sql/test/Tests/comment-dump.sql b/sql/test/Tests/comment-dump.sql
--- a/sql/test/Tests/comment-dump.sql
+++ b/sql/test/Tests/comment-dump.sql
@@ -1,5 +1,4 @@
 
-DROP SCHEMA IF EXISTS foo;
 CREATE SCHEMA foo;
 SET SCHEMA foo;
 
diff --git a/sql/test/Tests/comment-on.sql b/sql/test/Tests/comment-on.sql
--- a/sql/test/Tests/comment-on.sql
+++ b/sql/test/Tests/comment-on.sql
@@ -1,4 +1,3 @@
-DROP SCHEMA IF EXISTS foo;
 CREATE SCHEMA foo;
 SET SCHEMA foo;
 
@@ -134,3 +133,17 @@ COMMENT ON PROCEDURE g IS 'proc!';
 
 -- if there is ambiguity we can't
 COMMENT ON FUNCTION f IS 'ambiguous';
+
+DROP FUNCTION f();
+DROP FUNCTION f(INT);
+DROP FUNCTION f(INT,INT);
+DROP FUNCTION f(INT,INT,INT);
+DROP FUNCTION f(INT,INT,INT,INT);
+DROP PROCEDURE g();
+
+DROP SEQUENCE counter;
+DROP VIEW vivi;
+DROP TABLE tab;
+
+SET SCHEMA sys;
+DROP SCHEMA foo;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to