2012-02-25 11:35:16 -05:00
|
|
|
Shindo.tests("Fog::Dns[:aws] | record", ['aws', 'dns']) do
|
|
|
|
|
|
|
|
tests("zones#create").succeeds do
|
|
|
|
@zone = Fog::DNS[:aws].zones.create(:domain => generate_unique_domain)
|
|
|
|
end
|
|
|
|
|
|
|
|
params = { :name => @zone.domain, :type => 'A', :ttl => 3600, :value => ['1.2.3.4'] }
|
2012-02-25 11:44:46 -05:00
|
|
|
|
2013-11-12 12:48:59 -05:00
|
|
|
model_tests(@zone.records, params) do
|
2012-03-26 15:23:42 -04:00
|
|
|
|
|
|
|
# Newly created records should have a change id
|
|
|
|
tests("#change_id") do
|
|
|
|
returns(true) { @instance.change_id != nil }
|
|
|
|
end
|
|
|
|
|
|
|
|
# Waits for changes to sync to all Route 53 DNS servers. Usually takes ~30 seconds to complete.
|
2012-03-26 16:40:19 -04:00
|
|
|
tests("#ready? - may take a minute to complete...").succeeds do
|
|
|
|
@instance.wait_for { ready? }
|
2012-03-26 15:23:42 -04:00
|
|
|
end
|
|
|
|
|
2012-02-25 11:44:46 -05:00
|
|
|
tests("#modify") do
|
|
|
|
new_value = ['5.5.5.5']
|
|
|
|
returns(true) { @instance.modify(:value => new_value) }
|
|
|
|
returns(new_value) { @instance.value }
|
|
|
|
end
|
2012-03-26 15:23:42 -04:00
|
|
|
|
2012-02-25 11:44:46 -05:00
|
|
|
end
|
2012-02-25 11:35:16 -05:00
|
|
|
|
|
|
|
tests("zones#destroy").succeeds do
|
|
|
|
@zone.destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|