Sha256: 94bf0d218e689da7df05640dbdee2554a4a1b45aa905c66b0bf52431c0a63465

Contents?: true

Size: 1.5 KB

Versions: 118

Compression:

Stored size: 1.5 KB

Contents

Shindo.tests('AWS::IAM | group policy requests', ['aws']) do

  Fog::AWS[:iam].create_group('fog_group_policy_tests')

  tests('success') do

    @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]}

    tests("#put_group_policy('fog_group_policy_tests', 'fog_policy', #{@policy.inspect})").formats(AWS::IAM::Formats::BASIC) do
      Fog::AWS[:iam].put_group_policy('fog_group_policy_tests', 'fog_policy', @policy).body
    end

    @group_policies_format = {
      'IsTruncated' => Fog::Boolean,
      'PolicyNames' => [String],
      'RequestId'   => String
    }

    tests("list_group_policies('fog_group_policy_tests')").formats(@group_policies_format) do
      pending if Fog.mocking?
      Fog::AWS[:iam].list_group_policies('fog_group_policy_tests').body
    end

    @group_policy_format = {
      'GroupName' => String,
      'PolicyName' => String,
      'PolicyDocument' => Hash,
    }

    tests("#get_group_policy('fog_group_policy_tests', 'fog_policy'").formats(@group_policy_format) do
      Fog::AWS[:iam].get_group_policy('fog_policy', 'fog_group_policy_tests').body['Policy']
    end

    tests("#delete_group_policy('fog_group_policy_tests', 'fog_policy')").formats(AWS::IAM::Formats::BASIC) do
      pending if Fog.mocking?
      Fog::AWS[:iam].delete_group_policy('fog_group_policy_tests', 'fog_policy').body
    end
  end

  tests('failure') do
    test('failing conditions')
  end

  unless Fog.mocking?
    Fog::AWS[:iam].delete_group('fog_group_policy_tests')
  end

end

Version data entries

118 entries across 116 versions & 7 rubygems

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