From 83c9159e4ab7c666355b034eb67bda6ec48571a5 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sat, 10 Jan 2009 11:17:23 -0500 Subject: [PATCH] Initial documentation on runnin the horde_db test suite --- framework/Db/doc/README.TESTING.txt | 32 ++++++++++++++++++++++++++++++++ framework/Db/doc/TODO.txt | 2 -- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 framework/Db/doc/README.TESTING.txt diff --git a/framework/Db/doc/README.TESTING.txt b/framework/Db/doc/README.TESTING.txt new file mode 100644 index 000000000..1a03a7407 --- /dev/null +++ b/framework/Db/doc/README.TESTING.txt @@ -0,0 +1,32 @@ +==================== + Horde/Db Test Suite +==================== + +:Last update: 2009-01-04 +:Authors: Chuck Hagenbuch +:Contact: dev@lists.horde.org + +.. contents:: Contents +.. section-numbering:: + +Defining adapters +================= + +As long as PHP has the PDO SQLite driver (which is enabled by default), the +SQLite tests will always be run. This is possible using the sqlite:memory +database; no file access or permissions are required. + +For the other adapters, the Horde_Db test suite looks for environment variables +named HORDE_DB_TEST_DSN_$driverName. For the MySQLi driver, that would be +HORDE_DB_TEST_DSN_MYSQLI. For the PDO PostgreSQL driver, that would be +Horde_DB_TEST_DSN_PDO_PGSQL, and so on. The value of the environment variable is +a JSON string with the configuration array for the adapter. Here is an example +for setting up a test DSN for the MySQL test database on localhost, connecting +as the user horde_db with no password: + +{"username":"horde_db","dbname":"test","host":"localhost"} + +When running the test suite, any adapter for which a DSN is not found, or for +which connecting to the defined DSN fails, a single instance of +Horde_Db_Adapter_MissingTest will be included in the test suite run, with +details on why the adapter was skipped. diff --git a/framework/Db/doc/TODO.txt b/framework/Db/doc/TODO.txt index 8d3d25d08..83d78193c 100644 --- a/framework/Db/doc/TODO.txt +++ b/framework/Db/doc/TODO.txt @@ -1,7 +1,5 @@ - port Rdo to run on Horde_Db -- document running the test suite - - port updates in schema_definitions.rb and schema_statements.rb - allow adding multiple indexes (and columns) at once, in an aggregate -- 2.11.0