From 9c041bc9d331236babfbe4851b4cfc99f44c1e8c Mon Sep 17 00:00:00 2001 From: Sergio Rubio Date: Mon, 21 Jan 2013 19:44:23 +0100 Subject: [PATCH] [dreamhost|dns] do not delete the do-not-delete record when testing --- tests/dreamhost/requests/dns/dns_tests.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/dreamhost/requests/dns/dns_tests.rb b/tests/dreamhost/requests/dns/dns_tests.rb index 930b16187..590e76734 100644 --- a/tests/dreamhost/requests/dns/dns_tests.rb +++ b/tests/dreamhost/requests/dns/dns_tests.rb @@ -115,8 +115,13 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do end ## Cleanup + # We need to have at least one record defined for the Dreamhost DNS api to work + # or you will get a no_such_zone runtime error + # The first record needs to be created using the Dreamhost Web panel AFAIK + # Fog::DNS[:dreamhost].records.each do |r| - r.destroy if r.name =~ /fog-dream.com/ + # Do not delete the 'do-not-delete' record, we need it for the tests + r.destroy if r.name =~ /fog-dream.com/ and r.name != 'do-not-delete.fog-dream.com' end end