diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-23 10:21:37 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-23 10:21:37 +0000 |
commit | bbbab8945443be58e78c6c93522ce21ab74d3504 (patch) | |
tree | a526244c5727d3e9e05c0de9330692012664fbc7 /test | |
parent | 6f89456e8be2b7f26998246f01aa5d776ef2d056 (diff) |
Tidided up postgres test teardown
Diffstat (limited to 'test')
-rw-r--r-- | test/tc_mauve_database_peculiarities.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/tc_mauve_database_peculiarities.rb b/test/tc_mauve_database_peculiarities.rb index b29bd95..58b73f3 100644 --- a/test/tc_mauve_database_peculiarities.rb +++ b/test/tc_mauve_database_peculiarities.rb @@ -63,7 +63,12 @@ end class TcMauveDatabasePostgresPeculiarities < TcMauveDatabasePeculiarities def setup super - system("createdb #{@temp_db} --encoding UTF8") || flunk("Failed to create #{@temp_db}") + system("createdb #{@temp_db} --encoding UTF8") + unless $?.success? + msg = "Skipping postgres tests, as DB creation (#{@temp_db}) failed." + @temp_db = nil + flunk(msg) + end # @pg_conn = PGconn.open(:dbname => @temp_db) @db_url = "postgres:///#{@temp_db}" end |