Skip to content

Commit 059d648

Browse files
committed
add kms test lint fixes
1 parent 2c7892b commit 059d648

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

tests/requests/kms/helper.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ module KMS
33
module Formats
44
BASIC = {
55
'ResponseMetadata' => { 'RequestId' => String }
6-
}
6+
}.freeze
77

88
DESCRIBE_KEY = {
9-
"KeyMetadata" => {
10-
"KeyUsage" => String,
11-
"AWSAccountId" => String,
12-
"KeyId" => String,
13-
"Description" => Fog::Nullable::String,
14-
"CreationDate" => Time,
15-
"Arn" => String,
16-
"Enabled" => Fog::Boolean
9+
'KeyMetadata' => {
10+
'KeyUsage' => String,
11+
'AWSAccountId' => String,
12+
'KeyId' => String,
13+
'Description' => Fog::Nullable::String,
14+
'CreationDate' => Time,
15+
'Arn' => String,
16+
'Enabled' => Fog::Boolean
1717
}
18-
}
18+
}.freeze
1919

2020
LIST_KEYS = {
21-
"Keys" => [{ "KeyId" => String, "KeyArn" => String }],
22-
"Truncated" => Fog::Boolean,
23-
"Marker" => Fog::Nullable::String
24-
}
21+
'Keys' => [{ 'KeyId' => String, 'KeyArn' => String }],
22+
'Truncated' => Fog::Boolean,
23+
'Marker' => Fog::Nullable::String
24+
}.freeze
2525
end
2626
end
2727
end

tests/requests/kms/key_tests.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
Shindo.tests('AWS::KMS | key requests', ['aws', 'kms']) do
1+
Shindo.tests('AWS::KMS | key requests', %w[aws kms]) do
22
key_id = nil
33

44
tests('success') do
5-
tests("#create_key").data_matches_schema(AWS::KMS::Formats::DESCRIBE_KEY) do
5+
tests('#create_key').data_matches_schema(AWS::KMS::Formats::DESCRIBE_KEY) do
66
result = Fog::AWS[:kms].create_key.body
7-
key_id = result["KeyMetadata"]["KeyId"]
7+
key_id = result['KeyMetadata']['KeyId']
88

99
result
1010
end
1111
end
1212

13-
tests("#describe_key").data_matches_schema(AWS::KMS::Formats::DESCRIBE_KEY) do
13+
tests('#describe_key').data_matches_schema(AWS::KMS::Formats::DESCRIBE_KEY) do
1414
result = Fog::AWS[:kms].describe_key(key_id).body
1515
returns(key_id) { result['KeyMetadata']['KeyId'] }
1616
result
1717
end
1818

19-
tests("#list_keys").data_matches_schema(AWS::KMS::Formats::LIST_KEYS) do
19+
tests('#list_keys').data_matches_schema(AWS::KMS::Formats::LIST_KEYS) do
2020
Fog::AWS[:kms].list_keys.body
2121
end
22-
2322
end

0 commit comments

Comments
 (0)