Update config and tests so deployment and testing use separate databases.

This commit is contained in:
Paul Dill 2017-03-08 18:52:04 +00:00
parent 1cd9cc8721
commit 5a8b5ecc2d
9 changed files with 38 additions and 14 deletions

View file

@ -1,5 +1,5 @@
{
dsn => "dbi:SQLite:dbname=foodloop-test.db",
dsn => "dbi:SQLite:dbname=foodloop.db",
user => undef,
pass => undef,
key => "a",

View file

@ -0,0 +1,6 @@
{
dsn => "dbi:SQLite:dbname=foodloop-test.db",
user => undef,
pass => undef,
key => "a",
};

View file

@ -4,8 +4,10 @@ use Mojo::JSON;
use FindBin;
$ENV{MOJO_MODE} = 'development';
$ENV{MOJO_LOG_LEVEL} = 'debug';
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");

View file

@ -4,8 +4,10 @@ use Mojo::JSON;
use FindBin;
$ENV{MOJO_MODE} = 'development';
$ENV{MOJO_LOG_LEVEL} = 'debug';
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");
@ -29,7 +31,7 @@ foreach (@accountTokens){
}
#This depends on "register.t", "login.t" and "upload.t" working.
#This depends on "register.t", "login.t", "upload.t" and "admin-approve.t" working.
#Valid customer, this also tests that redirects are disabled for register.
print "test 1 - Create customer user account (Reno)\n";

View file

@ -2,6 +2,12 @@ use Test::More;
use Test::Mojo;
use FindBin;
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");
$t->get_ok('/login')->status_is(200)->content_like(qr/login page/);

View file

@ -5,8 +5,10 @@ use Time::Fake;
use FindBin;
$ENV{MOJO_MODE} = 'development';
$ENV{MOJO_LOG_LEVEL} = 'debug';
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");

View file

@ -4,8 +4,10 @@ use Mojo::JSON;
use FindBin;
$ENV{MOJO_MODE} = 'development';
$ENV{MOJO_LOG_LEVEL} = 'debug';
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");

View file

@ -6,8 +6,10 @@ use Text::ParseWords;
use FindBin;
$ENV{MOJO_MODE} = 'development';
$ENV{MOJO_LOG_LEVEL} = 'debug';
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");

View file

@ -4,8 +4,10 @@ use Mojo::JSON;
use FindBin;
$ENV{MOJO_MODE} = 'development';
$ENV{MOJO_LOG_LEVEL} = 'debug';
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_LOG_LEVEL} = 'debug';
}
my $t = Test::Mojo->new("Pear::LocalLoop");