2013-01-21 13:52:35 -05:00
|
|
|
def test_domain
|
|
|
|
'fog-dream.com'
|
|
|
|
end
|
|
|
|
|
2014-05-26 09:44:18 -04:00
|
|
|
def do_not_delete_record
|
2013-01-21 13:52:35 -05:00
|
|
|
"do-not-delete.#{test_domain}"
|
|
|
|
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
|
|
|
|
#
|
|
|
|
def cleanup_records
|
|
|
|
Fog::DNS[:dreamhost].records.each do |r|
|
|
|
|
# Do not delete the 'do-not-delete' record, we need it for the tests
|
|
|
|
r.destroy if r.name =~ /#{test_domain}/ and r.name != do_not_delete_record
|
|
|
|
end
|
|
|
|
end
|