Sha256: 0fec691b1c7fdb0dc38fc69e3f2a15bad6e2e63de0264308e386853c80da4728

Contents?: true

Size: 1.02 KB

Versions: 33

Compression:

Stored size: 1.02 KB

Contents

Shindo.tests("AWS::EFS | mount targets", ["aws", "efs"]) do
  @file_system = Fog::AWS[:efs].file_systems.create(:creation_token => "fogtoken#{rand(999).to_s}")
  @file_system.wait_for { ready? }

  if Fog.mocking?
    vpc = Fog::Compute[:aws].vpcs.create(:cidr_block => "10.0.0.0/16")
    subnet = Fog::Compute[:aws].subnets.create(:vpc_id => vpc.id, :cidr_block => "10.0.1.0/24")
  else
    vpc = Fog::Compute[:aws].vpcs.first
    subnet = vpc.subnets.first
  end

  security_group = Fog::Compute[:aws].security_groups.create(
    :vpc_id      => vpc.id,
    :name        => "fog#{rand(999).to_s}",
    :description => "fog#{rand(999).to_s}"
  )

  mount_target_params = {
    :file_system_id  => @file_system.identity,
    :subnet_id       => subnet.identity,
    :security_groups => [security_group.group_id]
  }

  collection_tests(Fog::AWS[:efs].mount_targets(:file_system_id => @file_system.identity), mount_target_params, true)

  @file_system.wait_for { number_of_mount_targets == 0 }
  @file_system.destroy
  security_group.destroy
end

Version data entries

33 entries across 31 versions & 2 rubygems

Version Path
fog-aws-3.12.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.11.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.10.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.9.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.8.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.7.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.6.7 tests/models/efs/mount_targets_tests.rb
fog-aws-3.6.6 tests/models/efs/mount_targets_tests.rb
fog-aws-3.6.5 tests/models/efs/mount_targets_tests.rb
fog-aws-3.6.4 tests/models/efs/mount_targets_tests.rb
fog-aws-3.6.3 tests/models/efs/mount_targets_tests.rb
fog-aws-3.6.2 tests/models/efs/mount_targets_tests.rb
fog-aws-3.5.2 tests/models/efs/mount_targets_tests.rb
fog-aws-3.5.1 tests/models/efs/mount_targets_tests.rb
fog-aws-3.5.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.4.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.3.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.2.0 tests/models/efs/mount_targets_tests.rb
fog-aws-3.1.0 tests/models/efs/mount_targets_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/tests/models/efs/mount_targets_tests.rb