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/records_tests.rb
2011-11-10 20:56:32 -05:00

30 lines
716 B
Ruby

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.' + domain_name,
:type => 'A',
:value => '1.2.3.4'
}.merge!(config[:record_attributes] || {})
if !Fog.mocking? || config[:mocked]
zone_attributes = {
:domain => domain_name
}.merge(config[:zone_attributes] || {})
@zone = Fog::DNS[provider].zones.create(zone_attributes)
collection_tests(@zone.records, record_attributes, config[:mocked])
@zone.destroy
end
end
end