X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-init.lisp;h=d77505476aed0fd3fee86f4a5c97e3629b95f98a;hb=36509b8d390e94b2b0f8e681c09d5e89452978d8;hp=489b50b280ca53cfe79f2d9be30a8e81f4c5b709;hpb=7c7edf1d85706148f55a8507a261d024defa0c7c;p=clsql.git diff --git a/tests/test-init.lisp b/tests/test-init.lisp index 489b50b..d775054 100644 --- a/tests/test-init.lisp +++ b/tests/test-init.lisp @@ -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 @@ -163,6 +164,11 @@ :db-info (:join-class address :home-key aaddressid :foreign-key addressid + :retrieval :immediate)) + (employee :db-kind :join + :db-info (:join-class employee + :home-key aemplid + :foreign-key emplid :retrieval :immediate))) (:base-table "ea_join")) @@ -253,7 +259,7 @@ :height (1+ (random 1.00)) :bd-utime *test-start-utime* :birthday now-time - :first-name "Vladamir" + :first-name "Vladimir" :last-name "Lenin" :email "lenin@soviet.org" :companyid 1) @@ -360,7 +366,7 @@ :height (1+ (random 1.00)) :bd-utime *test-start-utime* :birthday now-time - :first-name "Vladamir" + :first-name "Vladimir" :last-name "Putin" :email "putin@soviet.org" :managerid 1 @@ -552,7 +558,7 @@ (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 @@ -578,6 +584,11 @@ :fdml/select/21 :fdml/select/32 :fdml/select/33)) (push (cons test "not supported by sqlite") skip-tests)) + ((and (eql *test-database-type* :sqlite3) + (clsql-sys:in test :fddl/view/4 :fdml/select/10 + :fdml/select/21 :fdml/select/32 + :fdml/select/33)) + (push (cons test "not supported by sqlite3") skip-tests)) ((and (not (clsql-sys:db-type-has-bigint? db-type)) (clsql-sys:in test :basic/bigint/1)) (push (cons test "bigint not supported") skip-tests)) @@ -592,8 +603,17 @@ (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))))