2015-01-02 12:34:40 -05:00
|
|
|
Shindo.tests('AWS::STS | assume role', ['aws']) do
|
2014-12-30 17:25:09 -05:00
|
|
|
|
2015-01-20 09:42:23 -05:00
|
|
|
@policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]}
|
2014-12-30 17:25:09 -05:00
|
|
|
|
2015-01-20 09:42:23 -05:00
|
|
|
@response_format = {
|
|
|
|
'SessionToken' => String,
|
|
|
|
'SecretAccessKey' => String,
|
|
|
|
'Expiration' => String,
|
|
|
|
'AccessKeyId' => String,
|
|
|
|
'Arn' => String,
|
|
|
|
'RequestId' => String
|
|
|
|
}
|
2014-12-30 17:25:09 -05:00
|
|
|
|
2015-01-20 09:42:23 -05:00
|
|
|
tests("#assume_role('rolename', 'assumed_role_session', 'external_id', #{@policy.inspect}, 900)").formats(@response_format) do
|
|
|
|
pending if Fog.mocking?
|
|
|
|
Fog::AWS[:sts].assume_role("rolename","assumed_role_session","external_id", @policy, 900).body
|
|
|
|
end
|
2014-12-30 17:25:09 -05:00
|
|
|
|
|
|
|
end
|