diff options
-rw-r--r-- | t/00-check-we-are-staging.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/00-check-we-are-staging.t b/t/00-check-we-are-staging.t new file mode 100644 index 000000000..a1da68798 --- /dev/null +++ b/t/00-check-we-are-staging.t @@ -0,0 +1,24 @@ +use strict; +use warnings; + +use Test::More; + +use FixMyStreet; + +# check that all the fields listed in general-example are also present in +# general - helps prevent later test failures due to un-noticed additions to the +# config file. + +# This code will bail_out to prevent the test suite proceeding to save time if +# issues are found. + +# load the config file and store the contents in a readonly hash + +mySociety::Config::set_file( FixMyStreet->path_to("conf/general") ); + +BAIL_OUT( "Test suite modifies databases so should not be run on live servers" ) + unless mySociety::Config::get('STAGING_SITE', undef); + +ok mySociety::Config::get('STAGING_SITE', undef), 'staging server'; + +done_testing(); |