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

27 lines
682 B
Ruby
Raw Normal View History

2010-12-29 20:23:40 -05:00
for provider, config in dns_providers
# FIXME: delay/timing breaks things :(
next if [:dnsmadeeasy].include?(provider)
Shindo.tests("Fog::DNS[:#{provider}] | record", [provider]) do
2010-12-29 20:23:40 -05:00
record_attributes = {
:name => 'www.fogrecordtests.com',
:type => 'A',
:value => '1.2.3.4'
2011-01-03 16:36:31 -05:00
}.merge!(config[:record_attributes] || {})
2010-12-29 20:23:40 -05:00
2011-01-03 14:48:55 -05:00
if !Fog.mocking? || config[:mocked]
zone_attributes = {
:domain => 'fogrecordtests.com'
}.merge(config[:zone_attributes] || {})
@zone = Fog::DNS[provider].zones.create(zone_attributes)
model_tests(@zone.records, record_attributes, config[:mocked])
@zone.destroy
end
2010-12-29 20:23:40 -05:00
end
end