r9831: * db-aodbc/aodbc-sql.lisp: Fix storage location
[clsql.git] / tests / test-init.lisp
index 489b50b280ca53cfe79f2d9be30a8e81f4c5b709..5fc308d0b3128a4c1d51cd4fca11331e9df2c834 100644 (file)
@@ -18,8 +18,9 @@
 
 (defvar *report-stream* *standard-output* "Stream to send text report.")
 (defvar *sexp-report-stream* nil "Stream to send sexp report.")
-(defvar *rt-connection*)
+(defvar *rt-internal*)
 (defvar *rt-basic*)
+(defvar *rt-connection*)
 (defvar *rt-fddl*)
 (defvar *rt-fdml*)
 (defvar *rt-ooddl*)
@@ -47,7 +48,7 @@
 (def-view-class employee (person)
   ((emplid
     :db-kind :key
-    :db-constraints :not-null
+    :db-constraints (:not-null :unique)
     :type integer
     :initarg :emplid)
    (groupid
 (defun compute-tests-for-backend (db-type db-underlying-type)
   (let ((test-forms '())
        (skip-tests '()))
-    (dolist (test-form (append *rt-connection* *rt-basic* *rt-fddl* *rt-fdml*
+    (dolist (test-form (append *rt-internal* *rt-connection* *rt-basic* *rt-fddl* *rt-fdml*
                               *rt-ooddl* *rt-oodml* *rt-syntax*))
       (let ((test (second test-form)))
        (cond
                (clsql-sys:in test :fdml/query/6 :fdml/select/31))
           (push (cons test "union not supported") skip-tests))
          ((and (eq *test-database-type* :oracle)
-               (clsql-sys:in test :fdml/query/8 :fdml/select/21))
+               (clsql-sys:in test :fdml/query/8 :fdml/select/21 
+                              :fddl/table/6))
           (push (cons test "syntax not supported") skip-tests))
+          ((and (eq *test-database-type* :odbc)
+               (eq *test-database-underlying-type* :postgresql)
+               (clsql-sys:in test :fddl/owner/1))
+           (push (cons test "table ownership not supported by postgresql odbc driver") skip-tests))
+         ((and (not (member *test-database-underlying-type* 
+                             '(:postgresql :oracle)))
+               (clsql-sys:in test :fddl/owner/1))
+           (push (cons test "table ownership not supported") skip-tests))
          (t
           (push test-form test-forms)))))
       (values (nreverse test-forms) (nreverse skip-tests))))