From bbbab8945443be58e78c6c93522ce21ab74d3504 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 23 Nov 2012 10:21:37 +0000 Subject: Tidided up postgres test teardown --- test/tc_mauve_database_peculiarities.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1