Update config and tests so deployment and testing use separate databases.
This commit is contained in:
parent
1cd9cc8721
commit
5a8b5ecc2d
9 changed files with 38 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
dsn => "dbi:SQLite:dbname=foodloop-test.db",
|
||||
dsn => "dbi:SQLite:dbname=foodloop.db",
|
||||
user => undef,
|
||||
pass => undef,
|
||||
key => "a",
|
||||
|
|
6
pear-local_loop.testing.conf
Normal file
6
pear-local_loop.testing.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
dsn => "dbi:SQLite:dbname=foodloop-test.db",
|
||||
user => undef,
|
||||
pass => undef,
|
||||
key => "a",
|
||||
};
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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/);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Reference in a new issue