mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
1) Fix so that getting a single record actually works. 2) zone.records currently returns all records in account, not just records for that zone. Add failing test (temporarily, assumes test account has existing zones for this to actually fail) + fix. 3) Add in data alias for record.value, just in case someone needs it, as Slicehost calls this data.
This commit is contained in:
parent
efeee6f904
commit
8c680f0d80
3 changed files with 12 additions and 3 deletions
|
@ -39,7 +39,7 @@ module Fog
|
|||
Fog::DNS::Slicehost::Records.new(
|
||||
:zone => self,
|
||||
:connection => connection
|
||||
)
|
||||
).reject {|record| record.zone_id != id}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
# * body<~Array>:
|
||||
# * 'name'<~String> - Record NAME field (e.g. "example.org." or "www")
|
||||
# * 'data'<~String> - Data contained by the record (e.g. an IP address, for A records)
|
||||
# * 'record-type'<~String> - Type of record (A, CNAME, TXT, etc)
|
||||
# * 'record_type'<~String> - Type of record (A, CNAME, TXT, etc)
|
||||
# * 'aux'<~String> - Aux data for the record, for those types which have it (e.g. TXT)
|
||||
# * 'zone-id'<~Integer> - zone ID to which this record belongs
|
||||
# * 'zone_id'<~Integer> - zone ID to which this record belongs
|
||||
# * 'active'<~String> - whether this record is active in the Slicehost DNS (Y for yes, N for no)
|
||||
# * 'ttl'<~Integer> - TTL in seconds
|
||||
def get_records
|
||||
|
|
|
@ -220,6 +220,15 @@ Shindo.tests('Fog::DNS[:slicehost] | DNS requests', ['slicehost', 'dns']) do
|
|||
|
||||
result
|
||||
end
|
||||
|
||||
test("newly created zone returns only records which we added to it, not other records already in account") do
|
||||
pending if Fog.mocking?
|
||||
|
||||
@new_zone = Fog::DNS[:slicehost].zones.get(@zone_id)
|
||||
|
||||
records = @new_zone.records
|
||||
records.length == @new_records.length
|
||||
end
|
||||
|
||||
test("delete #{@new_records.count} records created") do
|
||||
pending if Fog.mocking?
|
||||
|
|
Loading…
Add table
Reference in a new issue