Sha256: ff52159a5bbb5c2237903447cf97589f1694d9ff0822d81a8a0d9d9481d4e4db

Contents?: true

Size: 1.72 KB

Versions: 33

Compression:

Stored size: 1.72 KB

Contents

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

  @vpcs_format = {
    'vpcSet' => [{
      'vpcId'           => String,
      'state'           => String,
      'cidrBlock'       => String,
      'dhcpOptionsId'   => String,
      'tagSet'          => Hash,
      'instanceTenancy' => Fog::Nullable::String,
    }],
    'requestId' => String
  }

  tests('success') do

    @vpc_id = nil

    tests('#create_vpc').formats(@vpcs_format) do
      data = Fog::Compute[:aws].create_vpc('10.255.254.0/28').body
      @vpc_id = data['vpcSet'].first['vpcId']
      data
    end

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


    tests("#modify_vpc_attribute('#{@vpc_id}', {'EnableDnsSupport.Value' => true})").formats(AWS::Compute::Formats::BASIC) do
      Fog::Compute[:aws].modify_vpc_attribute(@vpc_id, {'EnableDnsSupport.Value' => true}).body
    end

    tests("#modify_vpc_attribute('#{@vpc_id}', {'EnableDnsHostnames.Value' => true})").formats(AWS::Compute::Formats::BASIC) do
      Fog::Compute[:aws].modify_vpc_attribute(@vpc_id, {'EnableDnsHostnames.Value' => true}).body
    end

    tests("#modify_vpc_attribute('#{@vpc_id}')").raises(Fog::Compute::AWS::Error) do
      Fog::Compute[:aws].modify_vpc_attribute(@vpc_id).body
    end

    tests("#modify_vpc_attribute('#{@vpc_id}', {'EnableDnsSupport.Value' => true, 'EnableDnsHostnames.Value' => true})").raises(Fog::Compute::AWS::Error) do
      Fog::Compute[:aws].modify_vpc_attribute(@vpc_id, {'EnableDnsSupport.Value' => true, 'EnableDnsHostnames.Value' => true}).body
    end

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

Version data entries

33 entries across 33 versions & 2 rubygems

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