1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/tests/requests/kms/key_tests.rb

24 lines
627 B
Ruby
Raw Normal View History

Shindo.tests('AWS::KMS | key requests', ['aws', 'kms']) do
key_id = nil
tests('success') do
tests("#create_key").data_matches_schema(AWS::KMS::Formats::DESCRIBE_KEY) do
result = Fog::AWS[:kms].create_key.body
key_id = result["KeyMetadata"]["KeyId"]
result
end
end
tests("#describe_key").data_matches_schema(AWS::KMS::Formats::DESCRIBE_KEY) do
result = Fog::AWS[:kms].describe_key(key_id).body
returns(key_id) { result['KeyMetadata']['KeyId'] }
result
end
tests("#list_keys").data_matches_schema(AWS::KMS::Formats::LIST_KEYS) do
Fog::AWS[:kms].list_keys.body
end
end