X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=classic-tests%2Ftests.lisp;h=d94ed475a314184c56cf26988806c13097598393;hp=94db68cb643e7d604fac803f8d2e1e397ad6e79f;hb=a89cc325beaf3045a767586e34251aadb09e6d66;hpb=67e6b9eaab9c9bcf8b57cbd476581437e4876b26 diff --git a/classic-tests/tests.lisp b/classic-tests/tests.lisp index 94db68c..d94ed47 100644 --- a/classic-tests/tests.lisp +++ b/classic-tests/tests.lisp @@ -81,6 +81,8 @@ (warn "CLSQL test config file ~S not found" path) nil))) +(defgeneric test-table (spec type)) + (defmethod test-table (spec type) (when spec (let ((db (clsql:connect spec :database-type type :if-exists :new))) @@ -139,9 +141,9 @@ ) (disconnect :database db))))) -(defmethod mysql-low-level ((test conn-specs)) +(defun mysql-low-level (specs) #-clisp - (let ((spec (mysql-spec test))) + (let ((spec (mysql-spec specs))) (when spec (let ((db (clsql-mysql::database-connect spec :mysql))) (clsql-mysql::database-execute-command "DROP TABLE IF EXISTS test_clsql" db) @@ -281,5 +283,7 @@ (let ((spec (db-type-spec db-type specs))) (when spec (db-type-ensure-system db-type) + (ignore-errors (destroy-database spec db-type)) + (ignore-errors (create-database spec db-type)) (test-table spec db-type)))))) t)