Merge pull request #601 from brianhartsock/master

[dns] Made model tests use uniq domain names
This commit is contained in:
Wesley Beary 2011-11-11 07:57:25 -08:00
commit 2852a79144
4 changed files with 15 additions and 7 deletions

View File

@ -3,17 +3,19 @@ for provider, config in dns_providers
# FIXME: delay/timing breaks things :(
next if [:dnsmadeeasy].include?(provider)
domain_name = uniq_id + '.com'
Shindo.tests("Fog::DNS[:#{provider}] | record", [provider.to_s]) do
record_attributes = {
:name => 'www.fogrecordtests.com',
:name => 'www.' + domain_name,
:type => 'A',
:value => '1.2.3.4'
}.merge!(config[:record_attributes] || {})
if !Fog.mocking? || config[:mocked]
zone_attributes = {
:domain => 'fogrecordtests.com'
:domain => domain_name
}.merge(config[:zone_attributes] || {})
@zone = Fog::DNS[provider].zones.create(zone_attributes)

View File

@ -3,17 +3,19 @@ for provider, config in dns_providers
# FIXME: delay/timing breaks things :(
next if [:dnsmadeeasy].include?(provider)
domain_name = uniq_id + '.com'
Shindo.tests("Fog::DNS[:#{provider}] | records", [provider.to_s]) do
record_attributes = {
:name => 'www.fogrecordstests.com',
:name => 'www.' + domain_name,
:type => 'A',
:value => '1.2.3.4'
}.merge!(config[:record_attributes] || {})
if !Fog.mocking? || config[:mocked]
zone_attributes = {
:domain => 'fogrecordstests.com'
:domain => domain_name
}.merge(config[:zone_attributes] || {})
@zone = Fog::DNS[provider].zones.create(zone_attributes)

View File

@ -3,10 +3,12 @@ for provider, config in dns_providers
# FIXME: delay/timing breaks things :(
next if [:dnsmadeeasy].include?(provider)
domain_name = uniq_id + '.com'
Shindo.tests("Fog::DNS[:#{provider}] | zone", [provider.to_s]) do
zone_attributes = {
:domain => 'fogzonetests.com'
:domain => domain_name
}.merge!(config[:zone_attributes] || {})
model_tests(Fog::DNS[provider].zones, zone_attributes, config[:mocked])

View File

@ -3,14 +3,16 @@ for provider, config in dns_providers
# FIXME: delay/timing breaks things :(
next if [:dnsmadeeasy].include?(provider)
domain_name = uniq_id + '.com'
Shindo.tests("Fog::DNS[:#{provider}] | zones", [provider.to_s]) do
zone_attributes = {
:domain => 'fogzonestests.com'
:domain => domain_name
}.merge!(config[:zone_attributes] || {})
collection_tests(Fog::DNS[provider].zones, zone_attributes, config[:mocked])
end
end
end