You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have try many thing, but Dancer::Test stay glue to "development" environment.
So, my try :
use url;
use Dancer::Test;
route_exists [GET => '/'], 'a route handler is defined for /';
response_status_is ['GET' => '/'], 200, 'response status is 200 for /';
In my config.yml:
plugins:
Redis:
server: '127.0.0.1:6379'
debug: 0
and in my environments/testing.yml:
plugins:
Redis:
server: '127.0.0.1:16379'
debug: 0
I have shutdown redis server on the "development" port to be sure is the "testing" one which is use. In all my case, it try the first config and fail with port 6379.
So my first try :
DANCER_ENVIRONMENT=testing perl -Ilib t/002_index_route.t
failed.
I have try DANCER_ENVIRONMENT=testing perl bin/app.pl, success !
So I keep trying :
I change this, to this :
use url;
Dancer::Config::setting({environment => 'testing'});
Dancer::Config->load;
use Dancer::Test;
...
failed
I have try this :
BEGIN {
$ENV{DANCER_ENVIRONMENT} = "testing";
}
use url; #he load Dancer, so I don't do this again, if not, it has a warning ...
use Dancer::Test;
this failed too
I don't really know I to make it work. Otherwise, I can't test my apps ! snif ...
The text was updated successfully, but these errors were encountered:
I have looked into the issue, and Dancer::Test does in fact check for the environment. This has been tested using DANCER_ENVIRONMENT environment variable.
I config it's good. The issue is on Redis Plugin dancer, Asukrie tell me that they is mistake under the plugin module, I will try to test a fix and check again.
I have try many thing, but Dancer::Test stay glue to "development" environment.
So, my try :
use url;
use Dancer::Test;
route_exists [GET => '/'], 'a route handler is defined for /';
response_status_is ['GET' => '/'], 200, 'response status is 200 for /';
In my config.yml:
plugins:
Redis:
server: '127.0.0.1:6379'
debug: 0
and in my environments/testing.yml:
plugins:
Redis:
server: '127.0.0.1:16379'
debug: 0
I have shutdown redis server on the "development" port to be sure is the "testing" one which is use. In all my case, it try the first config and fail with port 6379.
So my first try :
DANCER_ENVIRONMENT=testing perl -Ilib t/002_index_route.t
failed.
I have try DANCER_ENVIRONMENT=testing perl bin/app.pl, success !
So I keep trying :
I change this, to this :
use url;
Dancer::Config::setting({environment => 'testing'});
Dancer::Config->load;
use Dancer::Test;
...
failed
I have try this :
BEGIN {
$ENV{DANCER_ENVIRONMENT} = "testing";
}
use url; #he load Dancer, so I don't do this again, if not, it has a warning ...
use Dancer::Test;
this failed too
I don't really know I to make it work. Otherwise, I can't test my apps ! snif ...
The text was updated successfully, but these errors were encountered: