diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-07-29 18:30:45 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-07-29 22:32:02 +0100 |
commit | c9500b5dc75640e5b17a9a0fb99e0ed19b738e13 (patch) | |
tree | 34c03315fe094b4287d013cd8c622816f73e650a /t/app/controller/admin.t | |
parent | b7a28df2080b95a0fd457a5525505e3039f4e12b (diff) |
Some tweaks for Travis timeout errors.
Hopefully this will reduce the chance of a timeout:
* Wrap admin body tests in MapIt override.
* Use full hostname to save a redirect each time.
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r-- | t/app/controller/admin.t | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index e369968b4..bf7a9ed70 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -144,17 +144,18 @@ subtest 'check summary counts' => sub { }; FixMyStreet::App->model('DB::Problem')->search( { bodies_str => 1 } )->update( { bodies_str => 2489 } ); - ok $mech->host('fixmystreet.com'); + ok $mech->host('www.fixmystreet.com'); }; -my $body = $mech->create_body_ok(2650, 'Aberdeen City Council'); +# This override is wrapped around ALL the /admin/body tests FixMyStreet::override_config { MAPIT_URL => 'http://mapit.mysociety.org/', MAPIT_TYPES => [ 'UTA' ], BASE_URL => 'http://www.example.org', }, sub { - $mech->get_ok('/admin/body/2650'); -}; + +my $body = $mech->create_body_ok(2650, 'Aberdeen City Council'); +$mech->get_ok('/admin/body/2650'); $mech->content_contains('Aberdeen City Council'); $mech->content_like(qr{AB\d\d}); $mech->content_contains("http://www.example.org/around"); @@ -298,6 +299,10 @@ subtest 'check text output' => sub { $mech->content_contains('test category'); }; + +}; # END of override wrap + + my $log_entries = FixMyStreet::App->model('DB::AdminLog')->search( { object_type => 'problem', |