File tree Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -3,25 +3,25 @@ module KMS
3
3
module Formats
4
4
BASIC = {
5
5
'ResponseMetadata' => { 'RequestId' => String }
6
- }
6
+ } . freeze
7
7
8
8
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
17
17
}
18
- }
18
+ } . freeze
19
19
20
20
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
25
25
end
26
26
end
27
27
end
Original file line number Diff line number Diff line change 1
- Shindo . tests ( 'AWS::KMS | key requests' , [ ' aws' , ' kms' ] ) do
1
+ Shindo . tests ( 'AWS::KMS | key requests' , %w[ aws kms ] ) do
2
2
key_id = nil
3
3
4
4
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
6
6
result = Fog ::AWS [ :kms ] . create_key . body
7
- key_id = result [ " KeyMetadata" ] [ " KeyId" ]
7
+ key_id = result [ ' KeyMetadata' ] [ ' KeyId' ]
8
8
9
9
result
10
10
end
11
11
end
12
12
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
14
14
result = Fog ::AWS [ :kms ] . describe_key ( key_id ) . body
15
15
returns ( key_id ) { result [ 'KeyMetadata' ] [ 'KeyId' ] }
16
16
result
17
17
end
18
18
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
20
20
Fog ::AWS [ :kms ] . list_keys . body
21
21
end
22
-
23
22
end
You can’t perform that action at this time.
0 commit comments