Skip to content

Commit b1c266d

Browse files
committed
[dns] Add more record tests
1 parent 7af36b0 commit b1c266d

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tests/dns/models/record_tests.rb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,34 @@
77

88
Shindo.tests("Fog::DNS[:#{provider}] | record", [provider.to_s]) do
99

10-
record_attributes = {
11-
:name => 'www.' + domain_name,
10+
a_record_attributes = {
11+
:name => 'a.' + domain_name,
1212
:type => 'A',
1313
:value => '1.2.3.4'
1414
}.merge!(config[:record_attributes] || {})
1515

16+
aaaa_record_attributes = {
17+
:name => 'aaaa.' + domain_name,
18+
:type => 'AAAA',
19+
:value => '2001:0db8:0000:0000:0000:ff00:0042:8329'
20+
}.merge!(config[:record_attributes] || {})
21+
22+
cname_record_attributes = {
23+
:name => 'cname.' + domain_name,
24+
:type => 'CNAME',
25+
:value => 'real.' + domain_name
26+
}.merge!(config[:record_attributes] || {})
27+
1628
if !Fog.mocking? || config[:mocked]
1729
zone_attributes = {
1830
:domain => domain_name
1931
}.merge(config[:zone_attributes] || {})
2032

2133
@zone = Fog::DNS[provider].zones.create(zone_attributes)
2234

23-
model_tests(@zone.records, record_attributes, config[:mocked])
35+
model_tests(@zone.records, a_record_attributes, config[:mocked])
36+
model_tests(@zone.records, aaaa_record_attributes, config[:mocked])
37+
model_tests(@zone.records, cname_record_attributes, config[:mocked])
2438

2539
@zone.destroy
2640
end

0 commit comments

Comments
 (0)