CC-5651: Unit Test the Scheduler
* Continued refactoring of the database creation. * Database now persists after running tests but most of the tables are cleared. * The unit tests run WAY faster now. :-)
This commit is contained in:
parent
aa2e084a09
commit
162a873f9d
8 changed files with 109 additions and 18 deletions
|
@ -211,13 +211,14 @@ class AirtimeInstall
|
|||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
echo " * Creating Airtime database".PHP_EOL;
|
||||
|
||||
$database = $CC_CONFIG['dsn']['database'];
|
||||
$username = $CC_CONFIG['dsn']['username'];
|
||||
#$command = "echo \"CREATE DATABASE $database OWNER $username\" | su postgres -c psql 2>/dev/null";
|
||||
|
||||
echo $database . PHP_EOL;
|
||||
|
||||
echo " * Creating Airtime database: " . $database . PHP_EOL;
|
||||
|
||||
putenv("LC_ALL=en_CA.UTF-8"); //Squash warnings when running unit tests
|
||||
$command = "su postgres -c \"psql -l | cut -f2 -d' ' | grep -w '{$database}'\";";
|
||||
exec($command, $output, $rv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue