From d96b5ff7b95b29c38e5abd60705529c5dc2f3937 Mon Sep 17 00:00:00 2001 From: Thom May Date: Wed, 16 Nov 2011 10:18:55 +0000 Subject: [PATCH] Split [AWS|STS] tests into separate files per #609 --- .../sts/get_federation_token_tests.rb | 21 +++++++++++++++++++ tests/aws/requests/sts/session_token_tests.rb | 18 ---------------- 2 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 tests/aws/requests/sts/get_federation_token_tests.rb diff --git a/tests/aws/requests/sts/get_federation_token_tests.rb b/tests/aws/requests/sts/get_federation_token_tests.rb new file mode 100644 index 000000000..758f2ab9e --- /dev/null +++ b/tests/aws/requests/sts/get_federation_token_tests.rb @@ -0,0 +1,21 @@ +Shindo.tests('AWS::STS | session tokens', ['aws']) do + + @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} + + @federation_format = { + 'SessionToken' => String, + 'SecretAccessKey' => String, + 'Expiration' => String, + 'AccessKeyId' => String, + 'Arn' => String, + 'FederatedUserId' => String, + 'PackedPolicySize' => String, + 'RequestId' => String + } + + tests("#get_federation_token('test@fog.io', #{@policy.inspect})").formats(@federation_format) do + pending if Fog.mocking? + Fog::AWS[:sts].get_federation_token("test@fog.io", @policy).body + end + +end diff --git a/tests/aws/requests/sts/session_token_tests.rb b/tests/aws/requests/sts/session_token_tests.rb index 01b5fec57..ff52b8bb3 100644 --- a/tests/aws/requests/sts/session_token_tests.rb +++ b/tests/aws/requests/sts/session_token_tests.rb @@ -13,22 +13,4 @@ Shindo.tests('AWS::STS | session tokens', ['aws']) do Fog::AWS[:sts].get_session_token.body end - @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} - - @federation_format = { - 'SessionToken' => String, - 'SecretAccessKey' => String, - 'Expiration' => String, - 'AccessKeyId' => String, - 'Arn' => String, - 'FederatedUserId' => String, - 'PackedPolicySize' => String, - 'RequestId' => String - } - - tests("#get_federation_token('test@fog.io', #{@policy.inspect})").formats(@federation_format) do - pending if Fog.mocking? - Fog::AWS[:sts].get_federation_token("test@fog.io", @policy).body - end - end