Sha256: 8e460bbb444d33877b7277a16393b7e747b36bfdcb3b4f2c690637188065f00b

Contents?: true

Size: 1.08 KB

Versions: 42

Compression:

Stored size: 1.08 KB

Contents

Shindo.tests('Fog::Compute[:aws] | account tests', ['aws']) do
  if Fog.mocking?
    tests('check for vpc') do
      tests('supports both vpc and ec2 in compatibility mode').succeeds do
        client = Fog::Compute[:aws]
        client.ec2_compatibility_mode(true)
        data = Fog::Compute[:aws].describe_account_attributes.body
        data['accountAttributeSet'].any? { |s| [*s["values"]].include?("VPC") && [*s["values"]].include?("EC2") }
      end
      tests('supports VPC in vpc mode').succeeds do
        client = Fog::Compute[:aws]
        client.ec2_compatibility_mode(true)
        data = Fog::Compute[:aws].describe_account_attributes.body
        data['accountAttributeSet'].any? { |s| [*s["values"]].include?("VPC") }
      end

      tests('does not support VPC and EC2 in vpc mode').succeeds do
        client = Fog::Compute[:aws]
        client.ec2_compatibility_mode(false)
        data = Fog::Compute[:aws].describe_account_attributes.body
        !data['accountAttributeSet'].any? { |s| [*s["values"]].include?("VPC") && [*s["values"]].include?("EC2") }
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

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