diff --git a/basis/db/postgresql/postgresql-tests.factor b/basis/db/postgresql/postgresql-tests.factor index ddfae56f87..04348f44cb 100644 --- a/basis/db/postgresql/postgresql-tests.factor +++ b/basis/db/postgresql/postgresql-tests.factor @@ -1,6 +1,6 @@ -USING: kernel db.postgresql alien continuations io classes -prettyprint sequences math namespaces tools.test db db.private -db.tuples db.types unicode.case accessors system db.tester ; +USING: accessors alien continuations db db.queries db.postgresql db.private +db.tester db.tuples db.types io classes kernel math namespaces prettyprint +sequences system tools.test unicode.case ; IN: db.postgresql.tests : nonexistant-db ( -- db ) @@ -15,7 +15,7 @@ IN: db.postgresql.tests 2000 [ [ nonexistant-db [ ] with-db ] ignore-errors ] times ] unit-test -! Ensure the table exists +! Ensure the test database exists [ ] [ postgresql-test-db [ ] with-db ] unit-test [ ] [ diff --git a/basis/db/tester/tester.factor b/basis/db/tester/tester.factor index 4471ae4979..e778168cff 100644 --- a/basis/db/tester/tester.factor +++ b/basis/db/tester/tester.factor @@ -11,18 +11,10 @@ IN: db.tester H{ { CHAR: - CHAR: _ } { CHAR: . CHAR: _ } } substitute ; : postgresql-test-db ( -- postgresql-db ) - - "localhost" >>host - "postgres" >>username - "thepasswordistrust" >>password - postgresql-test-db-name >>database ; + \ postgresql-db get-global postgresql-test-db-name >>database ; : postgresql-template1-db ( -- postgresql-db ) - - "localhost" >>host - "postgres" >>username - "thepasswordistrust" >>password - "template1" >>database ; + \ postgresql-db get-global ; : sqlite-test-db ( -- sqlite-db ) cpu name>> "tuples-test." ".db" surround