File: record_tests.rb

package info (click to toggle)
ruby-fog-aws 3.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,140 kB
  • sloc: ruby: 73,328; javascript: 14; makefile: 9; sh: 4
file content (33 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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'] }

  model_tests(@zone.records, params) do

    # 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.
    tests("#ready? - may take a minute to complete...").succeeds do
      @instance.wait_for { ready? }
    end

    tests("#modify") do
      new_value = ['5.5.5.5']
      returns(true) { @instance.modify(:value => new_value) }
      returns(new_value) { @instance.value }
    end

  end

  tests("zones#destroy").succeeds do
    @zone.destroy
  end

end