Sha256: fffef859554dda9aa661625f84a47267eaed612f11ff136e4116b6add77ce837

Contents?: true

Size: 1.37 KB

Versions: 78

Compression:

Stored size: 1.37 KB

Contents

Shindo.tests('Fog::Compute[:aws] | dhcp_options requests', ['aws']) do

  @dhcp_options_format = {
    'dhcpOptionsSet' => [{
      'dhcpOptionsId'            => String,
      'dhcpConfigurationSet'     => Hash,
      'tagSet'                   => Fog::Nullable::Hash,
    }],
    'requestId' => String
  }

  tests('success') do
    @vpc=Fog::Compute[:aws].vpcs.create('cidr_block' => '10.0.10.0/24')
    @vpc_id = @vpc.id


    tests('#create_dhcp_options').formats(@dhcp_options_format) do
      data = Fog::Compute[:aws].create_dhcp_options({'domain-name' => 'example.com', 'domain-name-servers' => '10.10.10.10'}).body
      @dopt_id = data['dhcpOptionsSet'].first['dhcpOptionsId']
      data
    end

    tests('#describe_dhcp_options').formats(@dhcp_options_format) do
      Fog::Compute[:aws].describe_dhcp_options.body
    end

    tests("#associate_dhcp_options('#{@dopt_id}, #{@vpc_id}')").formats(AWS::Compute::Formats::BASIC) do
      Fog::Compute[:aws].associate_dhcp_options(@dopt_id, @vpc_id).body
    end

    tests("#associate_default_dhcp_options('default', #{@vpc_id}')").formats(AWS::Compute::Formats::BASIC) do
      Fog::Compute[:aws].associate_dhcp_options('default', @vpc_id).body
    end

    tests("#delete_dhcp_options('#{@dopt_id}')").formats(AWS::Compute::Formats::BASIC) do
      Fog::Compute[:aws].delete_dhcp_options(@dopt_id).body
    end
    @vpc.destroy
  end
end

Version data entries

78 entries across 78 versions & 11 rubygems

Version Path
fog-1.22.0 tests/aws/requests/compute/dhcp_options_tests.rb
fog-1.21.0 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/aws/requests/compute/dhcp_options_tests.rb
fog-1.20.0 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/aws/requests/compute/dhcp_options_tests.rb
fog-1.19.0 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/aws/requests/compute/dhcp_options_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/aws/requests/compute/dhcp_options_tests.rb