From c9500b5dc75640e5b17a9a0fb99e0ed19b738e13 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 29 Jul 2014 18:30:45 +0100 Subject: 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. --- t/app/controller/admin.t | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 't/app/controller/admin.t') 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', -- cgit v1.2.3