From f2f0a176ac264e1d44c8d84cec627ca3851237bf Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Sun, 8 Sep 2024 11:07:33 -0700 Subject: [PATCH 1/2] fix(deps): upgrade to libnuke@0.19.0 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index dd2e2ffa..78448ebc 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 12a52ee4..9904b466 100644 --- a/go.sum +++ b/go.sum @@ -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= From 64126d2c1ca76e35b2ab7983baf2ebf2b1f5d15c Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Sun, 8 Sep 2024 11:08:01 -0700 Subject: [PATCH 2/2] test(kms-key): add test to check for tags being set --- resources/kms-key_mock_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/kms-key_mock_test.go b/resources/kms-key_mock_test.go index 04b11f3e..75df5472 100644 --- a/resources/kms-key_mock_test.go +++ b/resources/kms-key_mock_test.go @@ -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) {