1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[dreamhost|dns] Use the new fog-dream.com domain for testing

This commit is contained in:
Sergio Rubio 2013-01-19 23:40:13 +01:00
parent 705cf8e2d8
commit 05371c5a6a

View file

@ -1,5 +1,14 @@
Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
# Create some domains for testing
%w{one two three}.each do |dom|
name = "#{dom}.fog-dream.com"
type = "A"
value = "1.2.3.4"
comment = "test"
response = Fog::DNS[:dreamhost].create_record(name, type, value, comment)
end
tests("success") do
test("list records") do
@ -23,7 +32,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
test("list records from existing zone") do
pending if Fog.mocking?
Fog::DNS[:dreamhost].records.all(:zone => 'rbel.co').size > 0
Fog::DNS[:dreamhost].records.all(:zone => 'fog-dream.com').size > 0
end
test("list records from nonexistent zone") do
@ -35,7 +44,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
test("create an A resource record without comment") do
pending if Fog.mocking?
name = "foo.testing.rbel.co"
name = "foo.testing.fog-dream.com"
type = "A"
value = "1.2.3.4"
response = Fog::DNS[:dreamhost].create_record(name, type, value)
@ -46,7 +55,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
test("create an A resource record with comment") do
pending if Fog.mocking?
name = "foo2.testing.rbel.co"
name = "foo2.testing.fog-dream.com"
type = "A"
value = "1.2.3.4"
comment = "test"
@ -58,7 +67,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
test("create TXT record") do
pending if Fog.mocking?
name = "txt.testing.rbel.co"
name = "txt.testing.fog-dream.com"
type = "txt"
value = "foobar"
comment = "test"
@ -70,7 +79,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
test("TXT record found") do
pending if Fog.mocking?
rec = Fog::DNS[:dreamhost].records.get 'txt.testing.rbel.co'
rec = Fog::DNS[:dreamhost].records.get 'txt.testing.fog-dream.com'
rec != nil
end
@ -82,9 +91,9 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
success = true
r = %w(
foo.testing.rbel.co
foo2.testing.rbel.co
txt.testing.rbel.co
foo.testing.fog-dream.com
foo2.testing.fog-dream.com
txt.testing.fog-dream.com
)
r.each do |rec|
name = rec
@ -105,4 +114,9 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
tests( 'failure') do
end
## Cleanup
Fog::DNS[:dreamhost].records.each do |r|
r.destroy if r.name =~ /fog-dream.com/
end
end