2010-12-29 20:23:40 -05:00
|
|
|
for provider, config in dns_providers
|
|
|
|
|
2011-01-03 14:23:51 -05:00
|
|
|
Shindo.tests("#{provider}::DNS | records", [provider.to_s.downcase]) do
|
2010-12-29 20:23:40 -05:00
|
|
|
|
2011-01-03 18:39:38 -05:00
|
|
|
record_attributes = {
|
2011-01-03 14:23:51 -05:00
|
|
|
:ip => '1.2.3.4',
|
|
|
|
:name => 'www.fogrecordstests.com',
|
|
|
|
:type => 'A'
|
2011-01-03 18:39:38 -05:00
|
|
|
}.merge!(config[:record_attributes] || {})
|
2010-12-29 20:23:40 -05:00
|
|
|
|
2011-01-03 18:39:38 -05:00
|
|
|
if !Fog.mocking? || config[:mocked]
|
|
|
|
zone_attributes = {
|
2011-02-25 18:10:12 -05:00
|
|
|
:domain => 'fogrecordstests.com'
|
2011-01-03 18:39:38 -05:00
|
|
|
}.merge(config[:zone_attributes] || {})
|
2011-01-03 14:23:51 -05:00
|
|
|
|
2011-01-03 18:39:38 -05:00
|
|
|
@zone = provider[:dns].zones.create(zone_attributes)
|
|
|
|
|
|
|
|
collection_tests(@zone.records, record_attributes, config[:mocked])
|
2011-01-03 14:23:51 -05:00
|
|
|
|
|
|
|
@zone.destroy
|
|
|
|
end
|
2010-12-29 20:23:40 -05:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|