[dreamhost|dns] Use the new fog-dream.com domain for testing
This commit is contained in:
parent
705cf8e2d8
commit
05371c5a6a
|
@ -1,5 +1,14 @@
|
||||||
Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
|
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
|
tests("success") do
|
||||||
|
|
||||||
test("list records") 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
|
test("list records from existing zone") do
|
||||||
pending if Fog.mocking?
|
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
|
end
|
||||||
|
|
||||||
test("list records from nonexistent zone") do
|
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
|
test("create an A resource record without comment") do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
|
|
||||||
name = "foo.testing.rbel.co"
|
name = "foo.testing.fog-dream.com"
|
||||||
type = "A"
|
type = "A"
|
||||||
value = "1.2.3.4"
|
value = "1.2.3.4"
|
||||||
response = Fog::DNS[:dreamhost].create_record(name, type, value)
|
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
|
test("create an A resource record with comment") do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
|
|
||||||
name = "foo2.testing.rbel.co"
|
name = "foo2.testing.fog-dream.com"
|
||||||
type = "A"
|
type = "A"
|
||||||
value = "1.2.3.4"
|
value = "1.2.3.4"
|
||||||
comment = "test"
|
comment = "test"
|
||||||
|
@ -58,7 +67,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
|
||||||
test("create TXT record") do
|
test("create TXT record") do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
|
|
||||||
name = "txt.testing.rbel.co"
|
name = "txt.testing.fog-dream.com"
|
||||||
type = "txt"
|
type = "txt"
|
||||||
value = "foobar"
|
value = "foobar"
|
||||||
comment = "test"
|
comment = "test"
|
||||||
|
@ -70,7 +79,7 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
|
||||||
test("TXT record found") do
|
test("TXT record found") do
|
||||||
pending if Fog.mocking?
|
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
|
rec != nil
|
||||||
end
|
end
|
||||||
|
@ -82,9 +91,9 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
|
||||||
|
|
||||||
success = true
|
success = true
|
||||||
r = %w(
|
r = %w(
|
||||||
foo.testing.rbel.co
|
foo.testing.fog-dream.com
|
||||||
foo2.testing.rbel.co
|
foo2.testing.fog-dream.com
|
||||||
txt.testing.rbel.co
|
txt.testing.fog-dream.com
|
||||||
)
|
)
|
||||||
r.each do |rec|
|
r.each do |rec|
|
||||||
name = rec
|
name = rec
|
||||||
|
@ -105,4 +114,9 @@ Shindo.tests('Fog::DNS[:dreamhost] | DNS requests', ['dreamhost', 'dns']) do
|
||||||
tests( 'failure') do
|
tests( 'failure') do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
## Cleanup
|
||||||
|
Fog::DNS[:dreamhost].records.each do |r|
|
||||||
|
r.destroy if r.name =~ /fog-dream.com/
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue