Skip to content

Commit

Permalink
Merge pull request #281 from ekristen/issue-280
Browse files Browse the repository at this point in the history
fix: kms key tag missing
  • Loading branch information
ekristen authored Sep 8, 2024
2 parents 467d050 + 64126d2 commit 0d7b0a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.6

require (
github.com/aws/aws-sdk-go v1.54.20
github.com/ekristen/libnuke v0.18.0
github.com/ekristen/libnuke v0.19.0
github.com/fatih/color v1.17.0
github.com/golang/mock v1.6.0
github.com/google/uuid v1.6.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ekristen/libnuke v0.18.0 h1:sF533oSET50FjgIkYV72rvgNzCzUR/AH2tQeKVim31g=
github.com/ekristen/libnuke v0.18.0/go.mod h1:riI1tjCf6r+et/9oUBd1vQeFmn2Sn6UeFUR0nWkMeYw=
github.com/ekristen/libnuke v0.19.0 h1:pXVxPlbKfYbP1iSwsNu67MQ8HNvZPEZIeKiyw/k8FWg=
github.com/ekristen/libnuke v0.19.0/go.mod h1:riI1tjCf6r+et/9oUBd1vQeFmn2Sn6UeFUR0nWkMeYw=
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
Expand Down
4 changes: 4 additions & 0 deletions resources/kms-key_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,15 @@ func Test_Mock_KMSKey_Properties(t *testing.T) {
ID: ptr.String("test-key-id"),
State: ptr.String(kms.KeyStateEnabled),
Manager: ptr.String(kms.KeyManagerTypeCustomer),
Tags: []*kms.Tag{
{TagKey: aws.String("Environment"), TagValue: aws.String("Test")},
},
}

assert.Equal(t, "test-key-id", kmsKey.String())
assert.Equal(t, kms.KeyStateEnabled, kmsKey.Properties().Get("State"))
assert.Equal(t, kms.KeyManagerTypeCustomer, kmsKey.Properties().Get("Manager"))
assert.Equal(t, "Test", kmsKey.Properties().Get("tag:Environment"))
}

func Test_Mock_KMSKey_Remove(t *testing.T) {
Expand Down

0 comments on commit 0d7b0a6

Please sign in to comment.