Ticket #183 (new defect)

Opened 9 months ago

Last modified 3 months ago

Unit tests don't work with SQLite

Reported by: michaeltwofish Owned by:
Priority: minor Milestone: 0.6
Component: Habari Core Software Version: SVN
Keywords: testing, SQLite, has_patch Cc:

Description

The connection string for SQLite in config.php specifies a relative path to the database. This works when Habari is launched from it's main directory, but the unit test framework requires that Habari is launched from the tests directory, and therefore the database is not found. A manual workaround is to change the connection string to an absolute path, but a better fix needs to be implemented.

Attachments

sqlite_unittest.diff (0.6 kB) - added by rickc 4 months ago.

Change History

Changed 9 months ago by michaeltwofish

  • keywords testing, SQLite added
  • component changed from -none- to Habari Core Software
  • milestone changed from 0.5 to Undetermined

Changed 7 months ago by michaeltwofish

An alternative workaround is to specify a full path when installing through the install form.

Is that enough and we close this ticket? Or should we store the full path to the SQLite DB in config.php?

Changed 4 months ago by rickc

The attached patch will get the unit tests to work with SQLite without having to change your config.php file. I've tested it with absolute paths, just the name of the database file, and paths relative to the Habari base installation in the connection string. All seem to work okay.

Changed 4 months ago by rickc

Changed 4 months ago by rickc

  • keywords SQLite, has_patch added; SQLite removed

Changed 4 months ago by miklb

  • milestone changed from Undetermined to 0.5

Changed 3 months ago by chrismeller

  • milestone changed from 0.5 to 0.6

Changed 3 months ago by chrismeller

Can we get an update on this? I was under the impression it had been fixed.

Note: See TracTickets for help on using tickets.