From f30fbdc6afa270d5462176d71d7f9e4ebde834f5 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:27 -0400 Subject: [PATCH 001/180] ci: Prefer constant for test string literals --- .ci/.semgrep-test-constants.yml | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.ci/.semgrep-test-constants.yml b/.ci/.semgrep-test-constants.yml index e57f6f7b9ca..ae6dd51bac0 100644 --- a/.ci/.semgrep-test-constants.yml +++ b/.ci/.semgrep-test-constants.yml @@ -1,5 +1,35 @@ # Generated by internal/generate/acctestconsts/main.go; DO NOT EDIT. rules: + - id: literal-FalseCaps-string-test-constant + languages: [go] + message: Use the constant `acctest.CtFalseCaps` for the string literal "FALSE" + paths: + include: + - "internal/service/**/*_test.go" + patterns: + - pattern: '"FALSE"' + severity: ERROR + fix: "acctest.CtFalseCaps" + - id: literal-Key1-string-test-constant + languages: [go] + message: Use the constant `acctest.CtKey1` for the string literal "key1" + paths: + include: + - "internal/service/**/*_test.go" + patterns: + - pattern: '"key1"' + severity: ERROR + fix: "acctest.CtKey1" + - id: literal-Key2-string-test-constant + languages: [go] + message: Use the constant `acctest.CtKey2` for the string literal "key2" + paths: + include: + - "internal/service/**/*_test.go" + patterns: + - pattern: '"key2"' + severity: ERROR + fix: "acctest.CtKey2" - id: literal-One-string-test-constant languages: [go] message: Use the constant `acctest.CtOne` for the string literal "1" @@ -20,6 +50,16 @@ rules: - pattern: '"tags.%"' severity: ERROR fix: "acctest.CtTagsPercent" + - id: literal-TrueCaps-string-test-constant + languages: [go] + message: Use the constant `acctest.CtTrueCaps` for the string literal "TRUE" + paths: + include: + - "internal/service/**/*_test.go" + patterns: + - pattern: '"TRUE"' + severity: ERROR + fix: "acctest.CtTrueCaps" - id: literal-Two-string-test-constant languages: [go] message: Use the constant `acctest.CtTwo` for the string literal "2" @@ -30,6 +70,26 @@ rules: - pattern: '"2"' severity: ERROR fix: "acctest.CtTwo" + - id: literal-Value1-string-test-constant + languages: [go] + message: Use the constant `acctest.CtValue1` for the string literal "value1" + paths: + include: + - "internal/service/**/*_test.go" + patterns: + - pattern: '"value1"' + severity: ERROR + fix: "acctest.CtValue1" + - id: literal-Value2-string-test-constant + languages: [go] + message: Use the constant `acctest.CtValue2` for the string literal "value2" + paths: + include: + - "internal/service/**/*_test.go" + patterns: + - pattern: '"value2"' + severity: ERROR + fix: "acctest.CtValue2" - id: literal-Zero-string-test-constant languages: [go] message: Use the constant `acctest.CtZero` for the string literal "0" From 783ecff8b82622cf8d0907376232abe2dc664c87 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:27 -0400 Subject: [PATCH 002/180] acctest: Add constant for test string literals --- internal/acctest/consts.csv | 6 ++++++ internal/acctest/consts_gen.go | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/internal/acctest/consts.csv b/internal/acctest/consts.csv index ef769845c5f..7d8e25455be 100644 --- a/internal/acctest/consts.csv +++ b/internal/acctest/consts.csv @@ -1,4 +1,10 @@ 0,Zero 1,One 2,Two +FALSE,FalseCaps +TRUE,TrueCaps +key1,Key1 +key2,Key2 tags.%,TagsPercent +value1,Value1 +value2,Value2 diff --git a/internal/acctest/consts_gen.go b/internal/acctest/consts_gen.go index 74fad99558b..cf03912cfc8 100644 --- a/internal/acctest/consts_gen.go +++ b/internal/acctest/consts_gen.go @@ -9,9 +9,15 @@ import ( ) const ( + CtFalseCaps = "FALSE" + CtKey1 = "key1" + CtKey2 = "key2" CtOne = "1" CtTagsPercent = "tags.%" + CtTrueCaps = "TRUE" CtTwo = "2" + CtValue1 = "value1" + CtValue2 = "value2" CtZero = "0" ) @@ -20,9 +26,15 @@ const ( // generated code and templates. func ConstOrQuote(constant string) string { allConstants := map[string]string{ + "FALSE": "CtFalseCaps", + "key1": "CtKey1", + "key2": "CtKey2", "1": "CtOne", "tags.%": "CtTagsPercent", + "TRUE": "CtTrueCaps", "2": "CtTwo", + "value1": "CtValue1", + "value2": "CtValue2", "0": "CtZero", } From 02594a5baf22fa50a47287f8c0f79f6b0d77e460 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:27 -0400 Subject: [PATCH 003/180] tagstests: Use constants for test strings --- internal/generate/tagstests/test.go.gtpl | 150 +++++++++++------------ 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/internal/generate/tagstests/test.go.gtpl b/internal/generate/tagstests/test.go.gtpl index c3fd1f83777..115ce982001 100644 --- a/internal/generate/tagstests/test.go.gtpl +++ b/internal/generate/tagstests/test.go.gtpl @@ -97,13 +97,13 @@ func {{ template "testname" . }}_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -111,7 +111,7 @@ func {{ template "testname" . }}_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -121,15 +121,15 @@ func {{ template "testname" . }}_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -137,8 +137,8 @@ func {{ template "testname" . }}_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -148,13 +148,13 @@ func {{ template "testname" . }}_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), {{ if .NoRemoveTags -}} SkipFunc: testAcc{{ .ProviderNameUpper }}{{ .Name }}_removingTagNotSupported(t), @@ -165,7 +165,7 @@ func {{ template "testname" . }}_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -216,7 +216,7 @@ func {{ template "testname" . }}_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -229,7 +229,7 @@ func {{ template "testname" . }}_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -269,13 +269,13 @@ func {{ template "testname" . }}_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -283,7 +283,7 @@ func {{ template "testname" . }}_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -306,7 +306,7 @@ func {{ template "testname" . }}_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -320,7 +320,7 @@ func {{ template "testname" . }}_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -362,13 +362,13 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -376,14 +376,14 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -392,8 +392,8 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -403,13 +403,13 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -417,7 +417,7 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -440,13 +440,13 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -454,7 +454,7 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -468,7 +468,7 @@ func {{ template "testname" . }}_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -489,7 +489,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -497,7 +497,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -506,7 +506,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -518,8 +518,8 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -528,7 +528,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -537,8 +537,8 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -550,7 +550,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -558,7 +558,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), {{ if .NoRemoveTags -}} SkipFunc: testAcc{{ .ProviderNameUpper }}{{ .Name }}_removingTagNotSupported(t), @@ -570,7 +570,7 @@ func {{ template "testname" . }}_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -853,15 +853,15 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToProviderOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -870,7 +870,7 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToProviderOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -878,7 +878,7 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToProviderOnly(t *testin {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -887,7 +887,7 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToProviderOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToResourceOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -917,7 +917,7 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToResourceOnly(t *testin {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -926,15 +926,15 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToResourceOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -943,7 +943,7 @@ func {{ template "testname" . }}_tags_DefaultTags_updateToResourceOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -967,10 +967,10 @@ func {{ template "testname" . }}_tags_DefaultTags_emptyResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -987,10 +987,10 @@ func {{ template "testname" . }}_tags_DefaultTags_emptyResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -1014,10 +1014,10 @@ func {{ template "testname" . }}_tags_DefaultTags_nullOverlappingResourceTag(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func {{ template "testname" . }}_tags_DefaultTags_nullOverlappingResourceTag(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, {{- template "ImportBody" .ImportIgnore -}} @@ -1147,13 +1147,13 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1162,13 +1162,13 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1190,8 +1190,8 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, {{- template "ImportBody" .ImportIgnore -}} }, @@ -1211,13 +1211,13 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1225,7 +1225,7 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigDirectory: config.StaticDirectory("testdata/{{ .Name }}/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( {{- template "ExistsCheck" . -}} @@ -1235,7 +1235,7 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), - plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags){{ if eq .Implementation "framework" }}.AtMapKey("key1"){{ end}}), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags){{ if eq .Implementation "framework" }}.AtMapKey(acctest.CtKey1){{ end}}), }, PostApplyPreRefresh: []plancheck.PlanCheck{ plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), @@ -1250,7 +1250,7 @@ func {{ template "testname" . }}_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigDirectory: config.StaticDirectory("testdata/{{ .Name }}/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, {{- template "ImportBody" .ImportIgnore -}} }, From 1cf96dd4c4ed0144c8dd8128386622e683edf4a2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:28 -0400 Subject: [PATCH 004/180] accessanalyzer: Use constants for test strings --- .../accessanalyzer/analyzer_tags_gen_test.go | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/internal/service/accessanalyzer/analyzer_tags_gen_test.go b/internal/service/accessanalyzer/analyzer_tags_gen_test.go index 31148c8e75e..908024733e3 100644 --- a/internal/service/accessanalyzer/analyzer_tags_gen_test.go +++ b/internal/service/accessanalyzer/analyzer_tags_gen_test.go @@ -54,13 +54,13 @@ func testAccAccessAnalyzerAnalyzer_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -68,7 +68,7 @@ func testAccAccessAnalyzerAnalyzer_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -80,15 +80,15 @@ func testAccAccessAnalyzerAnalyzer_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -96,8 +96,8 @@ func testAccAccessAnalyzerAnalyzer_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -109,13 +109,13 @@ func testAccAccessAnalyzerAnalyzer_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -123,7 +123,7 @@ func testAccAccessAnalyzerAnalyzer_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -172,7 +172,7 @@ func testAccAccessAnalyzerAnalyzer_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -185,7 +185,7 @@ func testAccAccessAnalyzerAnalyzer_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -233,13 +233,13 @@ func testAccAccessAnalyzerAnalyzer_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -247,7 +247,7 @@ func testAccAccessAnalyzerAnalyzer_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -275,7 +275,7 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -289,7 +289,7 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -338,13 +338,13 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -352,14 +352,14 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -368,8 +368,8 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -381,13 +381,13 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -395,7 +395,7 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -423,13 +423,13 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -437,7 +437,7 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -451,7 +451,7 @@ func testAccAccessAnalyzerAnalyzer_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -479,7 +479,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -487,7 +487,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -496,7 +496,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -510,8 +510,8 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -520,7 +520,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -529,8 +529,8 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -544,7 +544,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -552,7 +552,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -561,7 +561,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -860,15 +860,15 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToProviderOnly(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -877,7 +877,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToProviderOnly(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -885,7 +885,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToProviderOnly(t *test testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -894,7 +894,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToProviderOnly(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -923,7 +923,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToResourceOnly(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -931,7 +931,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToResourceOnly(t *test testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -940,15 +940,15 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToResourceOnly(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -957,7 +957,7 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_updateToResourceOnly(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -985,10 +985,10 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_emptyResourceTag(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1005,10 +1005,10 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_emptyResourceTag(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1036,10 +1036,10 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_nullOverlappingResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1055,10 +1055,10 @@ func testAccAccessAnalyzerAnalyzer_tags_DefaultTags_nullOverlappingResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1187,13 +1187,13 @@ func testAccAccessAnalyzerAnalyzer_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1202,13 +1202,13 @@ func testAccAccessAnalyzerAnalyzer_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1230,8 +1230,8 @@ func testAccAccessAnalyzerAnalyzer_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1258,13 +1258,13 @@ func testAccAccessAnalyzerAnalyzer_tags_ComputedTag_OnUpdate_Replace(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1272,7 +1272,7 @@ func testAccAccessAnalyzerAnalyzer_tags_ComputedTag_OnUpdate_Replace(t *testing. ConfigDirectory: config.StaticDirectory("testdata/Analyzer/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnalyzerExists(ctx, resourceName, &v), @@ -1297,7 +1297,7 @@ func testAccAccessAnalyzerAnalyzer_tags_ComputedTag_OnUpdate_Replace(t *testing. ConfigDirectory: config.StaticDirectory("testdata/Analyzer/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, From 97cdda5970472c957d948c16bd91e6e7eac01f5e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:28 -0400 Subject: [PATCH 005/180] acm: Use constants for test strings --- internal/service/acm/certificate_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/service/acm/certificate_test.go b/internal/service/acm/certificate_test.go index 887a3c58225..d0d3999aaf6 100644 --- a/internal/service/acm/certificate_test.go +++ b/internal/service/acm/certificate_test.go @@ -1644,11 +1644,11 @@ func TestAccACMCertificate_PrivateKey_tags(t *testing.T) { CheckDestroy: testAccCheckCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCertificateConfig_tags1(certificate1, key1, "key1", "value1"), + Config: testAccCertificateConfig_tags1(certificate1, key1, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1658,25 +1658,25 @@ func TestAccACMCertificate_PrivateKey_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPrivateKey, "certificate_body"}, }, { - Config: testAccCertificateConfig_tags2(certificate1, key1, "key1", "value1updated", "key2", "value2"), + Config: testAccCertificateConfig_tags2(certificate1, key1, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCertificateConfig_tags1(certificate1, key1, "key2", "value2"), + Config: testAccCertificateConfig_tags1(certificate1, key1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCertificateConfig_tags1(certificate2, key2, "key1", "value1"), + Config: testAccCertificateConfig_tags1(certificate2, key2, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, From c14da50fcd0e31769683351097b4de2e975b46ba Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:28 -0400 Subject: [PATCH 006/180] acmpca: Use constants for test strings --- .../certificate_authority_tags_gen_test.go | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/internal/service/acmpca/certificate_authority_tags_gen_test.go b/internal/service/acmpca/certificate_authority_tags_gen_test.go index 1d0177b66fc..6e927fb4aad 100644 --- a/internal/service/acmpca/certificate_authority_tags_gen_test.go +++ b/internal/service/acmpca/certificate_authority_tags_gen_test.go @@ -31,13 +31,13 @@ func TestAccACMPCACertificateAuthority_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -45,7 +45,7 @@ func TestAccACMPCACertificateAuthority_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -60,15 +60,15 @@ func TestAccACMPCACertificateAuthority_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -76,8 +76,8 @@ func TestAccACMPCACertificateAuthority_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -92,13 +92,13 @@ func TestAccACMPCACertificateAuthority_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -106,7 +106,7 @@ func TestAccACMPCACertificateAuthority_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -161,7 +161,7 @@ func TestAccACMPCACertificateAuthority_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -174,7 +174,7 @@ func TestAccACMPCACertificateAuthority_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -225,13 +225,13 @@ func TestAccACMPCACertificateAuthority_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -239,7 +239,7 @@ func TestAccACMPCACertificateAuthority_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -270,7 +270,7 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -284,7 +284,7 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -339,13 +339,13 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -353,14 +353,14 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -369,8 +369,8 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -385,13 +385,13 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -399,7 +399,7 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -430,13 +430,13 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Replace(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -444,7 +444,7 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Replace(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -458,7 +458,7 @@ func TestAccACMPCACertificateAuthority_tags_EmptyTag_OnUpdate_Replace(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -489,7 +489,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -497,7 +497,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -506,7 +506,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -523,8 +523,8 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -533,7 +533,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -542,8 +542,8 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -560,7 +560,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -568,7 +568,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -577,7 +577,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_providerOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -900,15 +900,15 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToProviderOnly(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -917,7 +917,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToProviderOnly(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -925,7 +925,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToProviderOnly(t * testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -934,7 +934,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToProviderOnly(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -966,7 +966,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToResourceOnly(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -974,7 +974,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToResourceOnly(t * testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -983,15 +983,15 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToResourceOnly(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1000,7 +1000,7 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_updateToResourceOnly(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -1031,10 +1031,10 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_emptyResourceTag(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1051,10 +1051,10 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_emptyResourceTag(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1085,10 +1085,10 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_nullOverlappingResourceT ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1104,10 +1104,10 @@ func TestAccACMPCACertificateAuthority_tags_DefaultTags_nullOverlappingResourceT ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1245,13 +1245,13 @@ func TestAccACMPCACertificateAuthority_tags_ComputedTag_OnUpdate_Add(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1260,13 +1260,13 @@ func TestAccACMPCACertificateAuthority_tags_ComputedTag_OnUpdate_Add(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1288,8 +1288,8 @@ func TestAccACMPCACertificateAuthority_tags_ComputedTag_OnUpdate_Add(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1319,13 +1319,13 @@ func TestAccACMPCACertificateAuthority_tags_ComputedTag_OnUpdate_Replace(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1333,7 +1333,7 @@ func TestAccACMPCACertificateAuthority_tags_ComputedTag_OnUpdate_Replace(t *test ConfigDirectory: config.StaticDirectory("testdata/CertificateAuthority/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCertificateAuthorityExists(ctx, resourceName, &v), @@ -1358,7 +1358,7 @@ func TestAccACMPCACertificateAuthority_tags_ComputedTag_OnUpdate_Replace(t *test ConfigDirectory: config.StaticDirectory("testdata/CertificateAuthority/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, From 5bb139730e19c059d62daa9fc3af254ea9bf0dc9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:28 -0400 Subject: [PATCH 007/180] amp: Use constants for test strings --- internal/service/amp/scraper_test.go | 12 ++++++------ internal/service/amp/workspace_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/amp/scraper_test.go b/internal/service/amp/scraper_test.go index e68c715988a..a2038decb68 100644 --- a/internal/service/amp/scraper_test.go +++ b/internal/service/amp/scraper_test.go @@ -108,11 +108,11 @@ func TestAccAMPScraper_tags(t *testing.T) { CheckDestroy: testAccCheckScraperDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccScraperConfig_tags1(rName, "key1", "value1"), + Config: testAccScraperConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckScraperExists(ctx, resourceName, &scraper), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -121,20 +121,20 @@ func TestAccAMPScraper_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccScraperConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccScraperConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScraperExists(ctx, resourceName, &scraper), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccScraperConfig_tags1(rName, "key2", "value2"), + Config: testAccScraperConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScraperExists(ctx, resourceName, &scraper), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/amp/workspace_test.go b/internal/service/amp/workspace_test.go index 510cd9a982e..08d88cec8af 100644 --- a/internal/service/amp/workspace_test.go +++ b/internal/service/amp/workspace_test.go @@ -119,11 +119,11 @@ func TestAccAMPWorkspace_tags(t *testing.T) { CheckDestroy: testAccCheckWorkspaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkspaceConfig_tags1("key1", "value1"), + Config: testAccWorkspaceConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkspaceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -132,20 +132,20 @@ func TestAccAMPWorkspace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWorkspaceConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccWorkspaceConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkspaceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkspaceConfig_tags1("key2", "value2"), + Config: testAccWorkspaceConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkspaceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 0746942bd4f33a878e59094909a9443a44e5d7ae Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:28 -0400 Subject: [PATCH 008/180] amplify: Use constants for test strings --- internal/service/amplify/app_test.go | 12 ++++++------ internal/service/amplify/branch_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/amplify/app_test.go b/internal/service/amplify/app_test.go index 98d532e7439..9cb8e3a797d 100644 --- a/internal/service/amplify/app_test.go +++ b/internal/service/amplify/app_test.go @@ -109,11 +109,11 @@ func testAccApp_tags(t *testing.T) { CheckDestroy: testAccCheckAppDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAppConfig_tags1(rName, "key1", "value1"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -122,20 +122,20 @@ func testAccApp_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAppConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAppConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAppConfig_tags1(rName, "key2", "value2"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/amplify/branch_test.go b/internal/service/amplify/branch_test.go index 4f0a35da02f..5b1e110edbf 100644 --- a/internal/service/amplify/branch_test.go +++ b/internal/service/amplify/branch_test.go @@ -106,11 +106,11 @@ func testAccBranch_tags(t *testing.T) { CheckDestroy: testAccCheckBranchDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBranchConfig_tags1(rName, "key1", "value1"), + Config: testAccBranchConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBranchExists(ctx, resourceName, &branch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -119,20 +119,20 @@ func testAccBranch_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBranchConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccBranchConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBranchExists(ctx, resourceName, &branch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBranchConfig_tags1(rName, "key2", "value2"), + Config: testAccBranchConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBranchExists(ctx, resourceName, &branch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 9a99b71aa795d170e34096d82545713c8904e042 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:28 -0400 Subject: [PATCH 009/180] apigateway: Use constants for test strings --- internal/service/apigateway/api_key_test.go | 12 ++++++------ .../service/apigateway/client_certificate_test.go | 12 ++++++------ internal/service/apigateway/deployment_test.go | 4 ++-- internal/service/apigateway/domain_name_test.go | 12 ++++++------ internal/service/apigateway/rest_api_test.go | 12 ++++++------ internal/service/apigateway/stage_test.go | 12 ++++++------ internal/service/apigateway/usage_plan_test.go | 12 ++++++------ internal/service/apigateway/vpc_link_test.go | 12 ++++++------ 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/internal/service/apigateway/api_key_test.go b/internal/service/apigateway/api_key_test.go index 37311123d56..849f038fe28 100644 --- a/internal/service/apigateway/api_key_test.go +++ b/internal/service/apigateway/api_key_test.go @@ -84,28 +84,28 @@ func TestAccAPIGatewayAPIKey_tags(t *testing.T) { CheckDestroy: testAccCheckAPIKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAPIKeyConfig_tags1(rName, "key1", "value1"), + Config: testAccAPIKeyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAPIKeyExists(ctx, resourceName, &apiKey1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccAPIKeyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAPIKeyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAPIKeyExists(ctx, resourceName, &apiKey1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAPIKeyConfig_tags1(rName, "key2", "value2"), + Config: testAccAPIKeyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAPIKeyExists(ctx, resourceName, &apiKey1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/apigateway/client_certificate_test.go b/internal/service/apigateway/client_certificate_test.go index eb0e167d944..776a6c38ea7 100644 --- a/internal/service/apigateway/client_certificate_test.go +++ b/internal/service/apigateway/client_certificate_test.go @@ -67,11 +67,11 @@ func TestAccAPIGatewayClientCertificate_tags(t *testing.T) { CheckDestroy: testAccCheckClientCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClientCertificateConfig_tags1("key1", "value1"), + Config: testAccClientCertificateConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClientCertificateExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -80,20 +80,20 @@ func TestAccAPIGatewayClientCertificate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClientCertificateConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccClientCertificateConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClientCertificateExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClientCertificateConfig_tags1("key2", "value2"), + Config: testAccClientCertificateConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClientCertificateExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apigateway/deployment_test.go b/internal/service/apigateway/deployment_test.go index 88cd90412e8..7b2c979d46a 100644 --- a/internal/service/apigateway/deployment_test.go +++ b/internal/service/apigateway/deployment_test.go @@ -296,11 +296,11 @@ func TestAccAPIGatewayDeployment_variables(t *testing.T) { CheckDestroy: testAccCheckDeploymentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDeploymentConfig_variables(rName, "key1", "value1"), + Config: testAccDeploymentConfig_variables(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentExists(ctx, resourceName, &deployment), resource.TestCheckResourceAttr(resourceName, "variables.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "variables.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "variables.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/apigateway/domain_name_test.go b/internal/service/apigateway/domain_name_test.go index b706b805c82..1facdca5296 100644 --- a/internal/service/apigateway/domain_name_test.go +++ b/internal/service/apigateway/domain_name_test.go @@ -243,28 +243,28 @@ func TestAccAPIGatewayDomainName_tags(t *testing.T) { CheckDestroy: testAccCheckDomainNameDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainNameConfig_tags1(rName, key, certificate, "key1", "value1"), + Config: testAccDomainNameConfig_tags1(rName, key, certificate, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainNameExists(ctx, resourceName, &domainName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccDomainNameConfig_tags2(rName, key, certificate, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainNameConfig_tags2(rName, key, certificate, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainNameExists(ctx, resourceName, &domainName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainNameConfig_tags1(rName, key, certificate, "key2", "value2"), + Config: testAccDomainNameConfig_tags1(rName, key, certificate, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainNameExists(ctx, resourceName, &domainName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/apigateway/rest_api_test.go b/internal/service/apigateway/rest_api_test.go index 4c99ee0b5e1..b8894fd2e04 100644 --- a/internal/service/apigateway/rest_api_test.go +++ b/internal/service/apigateway/rest_api_test.go @@ -77,12 +77,12 @@ func TestAccAPIGatewayRestAPI_tags(t *testing.T) { CheckDestroy: testAccCheckRestAPIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRestAPIConfig_tags1(rName, "key1", "value1"), + Config: testAccRestAPIConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRestAPIExists(ctx, resourceName, &conf), acctest.MatchResourceAttrRegionalARNNoAccount(resourceName, names.AttrARN, "apigateway", regexache.MustCompile(`/restapis/+.`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -93,23 +93,23 @@ func TestAccAPIGatewayRestAPI_tags(t *testing.T) { }, { - Config: testAccRestAPIConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRestAPIConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRestAPIExists(ctx, resourceName, &conf), acctest.MatchResourceAttrRegionalARNNoAccount(resourceName, names.AttrARN, "apigateway", regexache.MustCompile(`/restapis/+.`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRestAPIConfig_tags1(rName, "key2", "value2"), + Config: testAccRestAPIConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRestAPIExists(ctx, resourceName, &conf), acctest.MatchResourceAttrRegionalARNNoAccount(resourceName, names.AttrARN, "apigateway", regexache.MustCompile(`/restapis/+.`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apigateway/stage_test.go b/internal/service/apigateway/stage_test.go index 6a0d697f0b3..1352adbbc1a 100644 --- a/internal/service/apigateway/stage_test.go +++ b/internal/service/apigateway/stage_test.go @@ -208,11 +208,11 @@ func testAccStage_tags(t *testing.T) { CheckDestroy: testAccCheckStageDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStageConfig_tags1(rName, "key1", "value1"), + Config: testAccStageConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStageExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -222,20 +222,20 @@ func testAccStage_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStageConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStageConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStageExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStageConfig_tags1(rName, "key2", "value2"), + Config: testAccStageConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStageExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apigateway/usage_plan_test.go b/internal/service/apigateway/usage_plan_test.go index 4a1fa940cb8..c180a757f3d 100644 --- a/internal/service/apigateway/usage_plan_test.go +++ b/internal/service/apigateway/usage_plan_test.go @@ -75,12 +75,12 @@ func TestAccAPIGatewayUsagePlan_tags(t *testing.T) { CheckDestroy: testAccCheckUsagePlanDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUsagePlanConfig_tags1(rName, "key1", "value1"), + Config: testAccUsagePlanConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUsagePlanExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -89,21 +89,21 @@ func TestAccAPIGatewayUsagePlan_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccUsagePlanConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUsagePlanConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUsagePlanConfig_tags1(rName, "key2", "value2"), + Config: testAccUsagePlanConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUsagePlanExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apigateway/vpc_link_test.go b/internal/service/apigateway/vpc_link_test.go index 282c738da4f..25f69a8325e 100644 --- a/internal/service/apigateway/vpc_link_test.go +++ b/internal/service/apigateway/vpc_link_test.go @@ -71,11 +71,11 @@ func TestAccAPIGatewayVPCLink_tags(t *testing.T) { CheckDestroy: testAccCheckVPCLinkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCLinkConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCLinkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCLinkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -84,20 +84,20 @@ func TestAccAPIGatewayVPCLink_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCLinkConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCLinkConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCLinkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCLinkConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCLinkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCLinkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 0235ba14c0a91b20173b953d073958f3f015310f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:29 -0400 Subject: [PATCH 010/180] apigatewayv2: Use constants for test strings --- internal/service/apigatewayv2/vpc_link_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/apigatewayv2/vpc_link_test.go b/internal/service/apigatewayv2/vpc_link_test.go index 9177a772e66..39d871dc492 100644 --- a/internal/service/apigatewayv2/vpc_link_test.go +++ b/internal/service/apigatewayv2/vpc_link_test.go @@ -97,11 +97,11 @@ func TestAccAPIGatewayV2VPCLink_tags(t *testing.T) { CheckDestroy: testAccCheckVPCLinkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCLinkConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCLinkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCLinkExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -110,20 +110,20 @@ func TestAccAPIGatewayV2VPCLink_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCLinkConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCLinkConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCLinkExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCLinkConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCLinkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCLinkExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 430c3df569790fc825b71ffa149bf45f8db76e92 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:29 -0400 Subject: [PATCH 011/180] appautoscaling: Use constants for test strings --- internal/service/appautoscaling/target_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/appautoscaling/target_test.go b/internal/service/appautoscaling/target_test.go index f799f06478e..9e17b172bb8 100644 --- a/internal/service/appautoscaling/target_test.go +++ b/internal/service/appautoscaling/target_test.go @@ -101,11 +101,11 @@ func TestAccAppAutoScalingTarget_tags(t *testing.T) { CheckDestroy: testAccCheckTargetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTargetConfig_tags1(rName, "key1", "value1"), + Config: testAccTargetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTargetExists(ctx, resourceName, &target), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -115,20 +115,20 @@ func TestAccAppAutoScalingTarget_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTargetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTargetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTargetExists(ctx, resourceName, &target), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTargetConfig_tags1(rName, "key2", "value2"), + Config: testAccTargetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTargetExists(ctx, resourceName, &target), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From ccaa4818c15f2e32fd8e02b9e517276cfa1171a6 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:29 -0400 Subject: [PATCH 012/180] appconfig: Use constants for test strings --- internal/service/appconfig/application_test.go | 12 ++++++------ .../configuration_profile_data_source_test.go | 2 +- .../appconfig/configuration_profile_test.go | 12 ++++++------ .../service/appconfig/deployment_strategy_test.go | 12 ++++++------ internal/service/appconfig/deployment_test.go | 12 ++++++------ .../appconfig/environment_data_source_test.go | 2 +- internal/service/appconfig/environment_test.go | 14 +++++++------- internal/service/appconfig/extension_test.go | 12 ++++++------ 8 files changed, 39 insertions(+), 39 deletions(-) diff --git a/internal/service/appconfig/application_test.go b/internal/service/appconfig/application_test.go index f4ce1c9dee0..d025c45f8c7 100644 --- a/internal/service/appconfig/application_test.go +++ b/internal/service/appconfig/application_test.go @@ -167,11 +167,11 @@ func TestAccAppConfigApplication_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -180,20 +180,20 @@ func TestAccAppConfigApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appconfig/configuration_profile_data_source_test.go b/internal/service/appconfig/configuration_profile_data_source_test.go index f58953c120d..cf03002593c 100644 --- a/internal/service/appconfig/configuration_profile_data_source_test.go +++ b/internal/service/appconfig/configuration_profile_data_source_test.go @@ -42,7 +42,7 @@ func TestAccAppConfigConfigurationProfileDataSource_basic(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, names.AttrName, rName), resource.TestCheckResourceAttr(dataSourceName, "retrieval_role_arn", ""), resource.TestCheckResourceAttr(dataSourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(dataSourceName, names.AttrType, "AWS.Freeform"), resource.TestCheckTypeSetElemNestedAttrs(dataSourceName, "validator.*", map[string]string{ names.AttrContent: "{\"$schema\":\"http://json-schema.org/draft-05/schema#\",\"description\":\"BasicFeatureToggle-1\",\"title\":\"$id$\"}", diff --git a/internal/service/appconfig/configuration_profile_test.go b/internal/service/appconfig/configuration_profile_test.go index c82bf7989c5..2eb19191d8c 100644 --- a/internal/service/appconfig/configuration_profile_test.go +++ b/internal/service/appconfig/configuration_profile_test.go @@ -317,11 +317,11 @@ func TestAccAppConfigConfigurationProfile_tags(t *testing.T) { CheckDestroy: testAccCheckConfigurationProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConfigurationProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccConfigurationProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationProfileExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,20 +330,20 @@ func TestAccAppConfigConfigurationProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConfigurationProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConfigurationProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationProfileExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConfigurationProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccConfigurationProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationProfileExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appconfig/deployment_strategy_test.go b/internal/service/appconfig/deployment_strategy_test.go index ea4ce3ef2d4..1482dbbef4e 100644 --- a/internal/service/appconfig/deployment_strategy_test.go +++ b/internal/service/appconfig/deployment_strategy_test.go @@ -170,11 +170,11 @@ func TestAccAppConfigDeploymentStrategy_tags(t *testing.T) { CheckDestroy: testAccCheckDeploymentStrategyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDeploymentStrategyConfig_tags1(rName, "key1", "value1"), + Config: testAccDeploymentStrategyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentStrategyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -183,20 +183,20 @@ func TestAccAppConfigDeploymentStrategy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDeploymentStrategyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDeploymentStrategyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentStrategyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDeploymentStrategyConfig_tags1(rName, "key2", "value2"), + Config: testAccDeploymentStrategyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentStrategyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appconfig/deployment_test.go b/internal/service/appconfig/deployment_test.go index 77531f3468e..53e526998b4 100644 --- a/internal/service/appconfig/deployment_test.go +++ b/internal/service/appconfig/deployment_test.go @@ -143,11 +143,11 @@ func TestAccAppConfigDeployment_tags(t *testing.T) { CheckDestroy: acctest.CheckDestroyNoop, Steps: []resource.TestStep{ { - Config: testAccDeploymentConfig_tags1(rName, "key1", "value1"), + Config: testAccDeploymentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -156,20 +156,20 @@ func TestAccAppConfigDeployment_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDeploymentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDeploymentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDeploymentConfig_tags1(rName, "key2", "value2"), + Config: testAccDeploymentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appconfig/environment_data_source_test.go b/internal/service/appconfig/environment_data_source_test.go index 9ab12626c74..9ee61d01f5f 100644 --- a/internal/service/appconfig/environment_data_source_test.go +++ b/internal/service/appconfig/environment_data_source_test.go @@ -43,7 +43,7 @@ func TestAccAppConfigEnvironmentDataSource_basic(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, names.AttrName, rName), resource.TestCheckResourceAttrSet(dataSourceName, names.AttrState), resource.TestCheckResourceAttr(dataSourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/appconfig/environment_test.go b/internal/service/appconfig/environment_test.go index 80b7bae27bd..ac292989e6e 100644 --- a/internal/service/appconfig/environment_test.go +++ b/internal/service/appconfig/environment_test.go @@ -274,11 +274,11 @@ func TestAccAppConfigEnvironment_tags(t *testing.T) { CheckDestroy: testAccCheckEnvironmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEnvironmentConfig_tags1(rName, "key1", "value1"), + Config: testAccEnvironmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -287,20 +287,20 @@ func TestAccAppConfigEnvironment_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEnvironmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEnvironmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEnvironmentConfig_tags1(rName, "key2", "value2"), + Config: testAccEnvironmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -323,7 +323,7 @@ func TestAccAppConfigEnvironment_tagsWithNullValue(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckNoResourceAttr(resourceName, "tags.key2"), ), // ~ tags = { diff --git a/internal/service/appconfig/extension_test.go b/internal/service/appconfig/extension_test.go index 95f076ceaa5..ece540fe83e 100644 --- a/internal/service/appconfig/extension_test.go +++ b/internal/service/appconfig/extension_test.go @@ -269,11 +269,11 @@ func TestAccAppConfigExtension_tags(t *testing.T) { CheckDestroy: testAccCheckExtensionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccExtensionConfig_tags1(rName, "key1", "value1"), + Config: testAccExtensionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckExtensionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -282,20 +282,20 @@ func TestAccAppConfigExtension_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccExtensionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccExtensionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExtensionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccExtensionConfig_tags1(rName, "key2", "value2"), + Config: testAccExtensionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExtensionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From b928d22898c0308d0df581de9ee97b56be671dc8 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:29 -0400 Subject: [PATCH 013/180] appflow: Use constants for test strings --- internal/service/appflow/flow_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/appflow/flow_test.go b/internal/service/appflow/flow_test.go index 1e8594e81da..43b73915c18 100644 --- a/internal/service/appflow/flow_test.go +++ b/internal/service/appflow/flow_test.go @@ -310,11 +310,11 @@ func TestAccAppFlowFlow_tags(t *testing.T) { CheckDestroy: testAccCheckFlowDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFlowConfig_tags1(rSourceName, rDestinationName, rFlowName, "key1", "value1"), + Config: testAccFlowConfig_tags1(rSourceName, rDestinationName, rFlowName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFlowExists(ctx, resourceName, &flowOutput), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -323,20 +323,20 @@ func TestAccAppFlowFlow_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFlowConfig_tags2(rSourceName, rDestinationName, rFlowName, "key1", "value1updated", "key2", "value2"), + Config: testAccFlowConfig_tags2(rSourceName, rDestinationName, rFlowName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFlowExists(ctx, resourceName, &flowOutput), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFlowConfig_tags1(rSourceName, rDestinationName, rFlowName, "key2", "value2"), + Config: testAccFlowConfig_tags1(rSourceName, rDestinationName, rFlowName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFlowExists(ctx, resourceName, &flowOutput), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 69c386c9dd3e290fcca18271563acb8d2ee6342e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:29 -0400 Subject: [PATCH 014/180] applicationinsights: Use constants for test strings --- .../service/applicationinsights/application_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/applicationinsights/application_test.go b/internal/service/applicationinsights/application_test.go index 7a62aa22458..50e956119b3 100644 --- a/internal/service/applicationinsights/application_test.go +++ b/internal/service/applicationinsights/application_test.go @@ -111,11 +111,11 @@ func TestAccApplicationInsightsApplication_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -124,20 +124,20 @@ func TestAccApplicationInsightsApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 396e28e09ca7839f0f44cb001a064795503db28b Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:30 -0400 Subject: [PATCH 015/180] appmesh: Use constants for test strings --- internal/service/appmesh/gateway_route_test.go | 12 ++++++------ internal/service/appmesh/mesh_test.go | 12 ++++++------ internal/service/appmesh/route_test.go | 12 ++++++------ internal/service/appmesh/virtual_gateway_test.go | 12 ++++++------ internal/service/appmesh/virtual_node_test.go | 12 ++++++------ internal/service/appmesh/virtual_router_test.go | 12 ++++++------ internal/service/appmesh/virtual_service_test.go | 12 ++++++------ 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/internal/service/appmesh/gateway_route_test.go b/internal/service/appmesh/gateway_route_test.go index 5e84e0f91b7..a279db5f863 100644 --- a/internal/service/appmesh/gateway_route_test.go +++ b/internal/service/appmesh/gateway_route_test.go @@ -1314,11 +1314,11 @@ func testAccGatewayRoute_tags(t *testing.T) { CheckDestroy: testAccCheckGatewayRouteDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGatewayRouteConfig_tags1(meshName, vgName, grName, "key1", "value1"), + Config: testAccGatewayRouteConfig_tags1(meshName, vgName, grName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGatewayRouteExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1328,20 +1328,20 @@ func testAccGatewayRoute_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGatewayRouteConfig_tags2(meshName, vgName, grName, "key1", "value1updated", "key2", "value2"), + Config: testAccGatewayRouteConfig_tags2(meshName, vgName, grName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGatewayRouteExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGatewayRouteConfig_tags1(meshName, vgName, grName, "key2", "value2"), + Config: testAccGatewayRouteConfig_tags1(meshName, vgName, grName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGatewayRouteExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appmesh/mesh_test.go b/internal/service/appmesh/mesh_test.go index 9c2bd9dabe4..1e4c588c2c6 100644 --- a/internal/service/appmesh/mesh_test.go +++ b/internal/service/appmesh/mesh_test.go @@ -183,11 +183,11 @@ func testAccMesh_tags(t *testing.T) { CheckDestroy: testAccCheckMeshDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMeshConfig_tags1(rName, "key1", "value1"), + Config: testAccMeshConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMeshExists(ctx, resourceName, &mesh), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -196,20 +196,20 @@ func testAccMesh_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMeshConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMeshConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMeshExists(ctx, resourceName, &mesh), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMeshConfig_tags1(rName, "key2", "value2"), + Config: testAccMeshConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMeshExists(ctx, resourceName, &mesh), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appmesh/route_test.go b/internal/service/appmesh/route_test.go index cee349be298..79559b3ad69 100644 --- a/internal/service/appmesh/route_test.go +++ b/internal/service/appmesh/route_test.go @@ -1712,11 +1712,11 @@ func testAccRoute_tags(t *testing.T) { CheckDestroy: testAccCheckRouteDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRouteConfig_tags1(meshName, vrName, vn1Name, vn2Name, rName, "key1", "value1"), + Config: testAccRouteConfig_tags1(meshName, vrName, vn1Name, vn2Name, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRouteExists(ctx, resourceName, &r), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1726,20 +1726,20 @@ func testAccRoute_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRouteConfig_tags2(meshName, vrName, vn1Name, vn2Name, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRouteConfig_tags2(meshName, vrName, vn1Name, vn2Name, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteExists(ctx, resourceName, &r), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRouteConfig_tags1(meshName, vrName, vn1Name, vn2Name, rName, "key2", "value2"), + Config: testAccRouteConfig_tags1(meshName, vrName, vn1Name, vn2Name, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteExists(ctx, resourceName, &r), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appmesh/virtual_gateway_test.go b/internal/service/appmesh/virtual_gateway_test.go index f92ff4851aa..c98efbb6952 100644 --- a/internal/service/appmesh/virtual_gateway_test.go +++ b/internal/service/appmesh/virtual_gateway_test.go @@ -887,11 +887,11 @@ func testAccVirtualGateway_Tags(t *testing.T) { CheckDestroy: testAccCheckVirtualGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVirtualGatewayConfig_tags1(meshName, vgName, "key1", "value1"), + Config: testAccVirtualGatewayConfig_tags1(meshName, vgName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -901,20 +901,20 @@ func testAccVirtualGateway_Tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVirtualGatewayConfig_tags2(meshName, vgName, "key1", "value1updated", "key2", "value2"), + Config: testAccVirtualGatewayConfig_tags2(meshName, vgName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVirtualGatewayConfig_tags1(meshName, vgName, "key2", "value2"), + Config: testAccVirtualGatewayConfig_tags1(meshName, vgName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appmesh/virtual_node_test.go b/internal/service/appmesh/virtual_node_test.go index 378c681bc50..6a8e5b98a2e 100644 --- a/internal/service/appmesh/virtual_node_test.go +++ b/internal/service/appmesh/virtual_node_test.go @@ -1428,11 +1428,11 @@ func testAccVirtualNode_tags(t *testing.T) { CheckDestroy: testAccCheckVirtualNodeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVirtualNodeConfig_tags1(meshName, vnName, "key1", "value1"), + Config: testAccVirtualNodeConfig_tags1(meshName, vnName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualNodeExists(ctx, resourceName, &vn), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1442,20 +1442,20 @@ func testAccVirtualNode_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVirtualNodeConfig_tags2(meshName, vnName, "key1", "value1updated", "key2", "value2"), + Config: testAccVirtualNodeConfig_tags2(meshName, vnName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualNodeExists(ctx, resourceName, &vn), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVirtualNodeConfig_tags1(meshName, vnName, "key2", "value2"), + Config: testAccVirtualNodeConfig_tags1(meshName, vnName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualNodeExists(ctx, resourceName, &vn), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appmesh/virtual_router_test.go b/internal/service/appmesh/virtual_router_test.go index 9056781b334..39bd3221dc4 100644 --- a/internal/service/appmesh/virtual_router_test.go +++ b/internal/service/appmesh/virtual_router_test.go @@ -156,11 +156,11 @@ func testAccVirtualRouter_tags(t *testing.T) { CheckDestroy: testAccCheckVirtualRouterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVirtualRouterConfig_tags1(meshName, vrName, "key1", "value1"), + Config: testAccVirtualRouterConfig_tags1(meshName, vrName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualRouterExists(ctx, resourceName, &vr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -170,20 +170,20 @@ func testAccVirtualRouter_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVirtualRouterConfig_tags2(meshName, vrName, "key1", "value1updated", "key2", "value2"), + Config: testAccVirtualRouterConfig_tags2(meshName, vrName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualRouterExists(ctx, resourceName, &vr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVirtualRouterConfig_tags1(meshName, vrName, "key2", "value2"), + Config: testAccVirtualRouterConfig_tags1(meshName, vrName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualRouterExists(ctx, resourceName, &vr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/appmesh/virtual_service_test.go b/internal/service/appmesh/virtual_service_test.go index 5874e6b7857..dfd38e90ff4 100644 --- a/internal/service/appmesh/virtual_service_test.go +++ b/internal/service/appmesh/virtual_service_test.go @@ -138,28 +138,28 @@ func testAccVirtualService_tags(t *testing.T) { CheckDestroy: testAccCheckVirtualServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVirtualServiceConfig_tags1(meshName, vnName1, vnName2, vsName, "aws_appmesh_virtual_node.test1", "key1", "value1"), + Config: testAccVirtualServiceConfig_tags1(meshName, vnName1, vnName2, vsName, "aws_appmesh_virtual_node.test1", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualServiceExists(ctx, resourceName, &vs), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVirtualServiceConfig_tags2(meshName, vnName1, vnName2, vsName, "aws_appmesh_virtual_node.test1", "key1", "value1updated", "key2", "value2"), + Config: testAccVirtualServiceConfig_tags2(meshName, vnName1, vnName2, vsName, "aws_appmesh_virtual_node.test1", acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualServiceExists(ctx, resourceName, &vs), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVirtualServiceConfig_tags1(meshName, vnName1, vnName2, vsName, "aws_appmesh_virtual_node.test1", "key2", "value2"), + Config: testAccVirtualServiceConfig_tags1(meshName, vnName1, vnName2, vsName, "aws_appmesh_virtual_node.test1", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualServiceExists(ctx, resourceName, &vs), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { From e7655c43a04ac475536a949ac9ecbcf45d3e1a46 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:30 -0400 Subject: [PATCH 016/180] apprunner: Use constants for test strings --- .../auto_scaling_configuration_version_test.go | 12 ++++++------ internal/service/apprunner/connection_test.go | 18 +++++++++--------- .../observability_configuration_test.go | 12 ++++++------ internal/service/apprunner/service_test.go | 12 ++++++------ .../service/apprunner/vpc_connector_test.go | 12 ++++++------ .../apprunner/vpc_ingress_connection_test.go | 12 ++++++------ 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/internal/service/apprunner/auto_scaling_configuration_version_test.go b/internal/service/apprunner/auto_scaling_configuration_version_test.go index f68f1616c45..964d7d06ddd 100644 --- a/internal/service/apprunner/auto_scaling_configuration_version_test.go +++ b/internal/service/apprunner/auto_scaling_configuration_version_test.go @@ -274,11 +274,11 @@ func TestAccAppRunnerAutoScalingConfigurationVersion_tags(t *testing.T) { CheckDestroy: testAccCheckAutoScalingConfigurationVersionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAutoScalingConfigurationVersionConfig_tags1(rName, "key1", "value1"), + Config: testAccAutoScalingConfigurationVersionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAutoScalingConfigurationVersionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -287,20 +287,20 @@ func TestAccAppRunnerAutoScalingConfigurationVersion_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAutoScalingConfigurationVersionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAutoScalingConfigurationVersionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAutoScalingConfigurationVersionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAutoScalingConfigurationVersionConfig_tags1(rName, "key2", "value2"), + Config: testAccAutoScalingConfigurationVersionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAutoScalingConfigurationVersionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apprunner/connection_test.go b/internal/service/apprunner/connection_test.go index 6efa287f6c5..84adf623713 100644 --- a/internal/service/apprunner/connection_test.go +++ b/internal/service/apprunner/connection_test.go @@ -86,13 +86,13 @@ func TestAccAppRunnerConnection_tags(t *testing.T) { CheckDestroy: testAccCheckConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -101,25 +101,25 @@ func TestAccAppRunnerConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { - Config: testAccConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apprunner/observability_configuration_test.go b/internal/service/apprunner/observability_configuration_test.go index 3964c2c9e2c..4475d8db584 100644 --- a/internal/service/apprunner/observability_configuration_test.go +++ b/internal/service/apprunner/observability_configuration_test.go @@ -117,11 +117,11 @@ func TestAccAppRunnerObservabilityConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckObservabilityConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObservabilityConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccObservabilityConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckObservabilityConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -130,20 +130,20 @@ func TestAccAppRunnerObservabilityConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccObservabilityConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccObservabilityConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckObservabilityConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccObservabilityConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccObservabilityConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckObservabilityConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apprunner/service_test.go b/internal/service/apprunner/service_test.go index 8062dec6fad..6c021c8a8e0 100644 --- a/internal/service/apprunner/service_test.go +++ b/internal/service/apprunner/service_test.go @@ -520,11 +520,11 @@ func TestAccAppRunnerService_tags(t *testing.T) { CheckDestroy: testAccCheckServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -533,20 +533,20 @@ func TestAccAppRunnerService_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccServiceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apprunner/vpc_connector_test.go b/internal/service/apprunner/vpc_connector_test.go index 49f53c22835..ff48c2e9103 100644 --- a/internal/service/apprunner/vpc_connector_test.go +++ b/internal/service/apprunner/vpc_connector_test.go @@ -86,11 +86,11 @@ func TestAccAppRunnerVPCConnector_tags(t *testing.T) { CheckDestroy: testAccCheckVPCConnectorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConnectorConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCConnectorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCConnectorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -99,20 +99,20 @@ func TestAccAppRunnerVPCConnector_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCConnectorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCConnectorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCConnectorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCConnectorConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCConnectorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCConnectorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/apprunner/vpc_ingress_connection_test.go b/internal/service/apprunner/vpc_ingress_connection_test.go index 3fa281bcfec..ff627a8c285 100644 --- a/internal/service/apprunner/vpc_ingress_connection_test.go +++ b/internal/service/apprunner/vpc_ingress_connection_test.go @@ -91,11 +91,11 @@ func TestAccAppRunnerVPCIngressConnection_tags(t *testing.T) { CheckDestroy: testAccCheckVPCIngressConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCIngressConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCIngressConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCIngressConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -104,20 +104,20 @@ func TestAccAppRunnerVPCIngressConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCIngressConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCIngressConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCIngressConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCIngressConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCIngressConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCIngressConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 547f41482b1ba3558dca2a7f843e1f443e7b25e3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:30 -0400 Subject: [PATCH 017/180] appstream: Use constants for test strings --- internal/service/appstream/image_builder_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/appstream/image_builder_test.go b/internal/service/appstream/image_builder_test.go index 3e47cd53027..2bba47a378f 100644 --- a/internal/service/appstream/image_builder_test.go +++ b/internal/service/appstream/image_builder_test.go @@ -164,11 +164,11 @@ func TestAccAppStreamImageBuilder_tags(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.AppStreamServiceID), Steps: []resource.TestStep{ { - Config: testAccImageBuilderConfig_tags1(instanceType, rName, "key1", "value1"), + Config: testAccImageBuilderConfig_tags1(instanceType, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckImageBuilderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -178,20 +178,20 @@ func TestAccAppStreamImageBuilder_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"image_name"}, }, { - Config: testAccImageBuilderConfig_tags2(instanceType, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccImageBuilderConfig_tags2(instanceType, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageBuilderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccImageBuilderConfig_tags1(instanceType, rName, "key2", "value2"), + Config: testAccImageBuilderConfig_tags1(instanceType, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageBuilderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From c02267ce618a1c5d332b459ea8a292549d1ef850 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:30 -0400 Subject: [PATCH 018/180] appsync: Use constants for test strings --- internal/service/appsync/graphql_api_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/appsync/graphql_api_test.go b/internal/service/appsync/graphql_api_test.go index 2f6dfb31575..fffb0f48a7c 100644 --- a/internal/service/appsync/graphql_api_test.go +++ b/internal/service/appsync/graphql_api_test.go @@ -886,11 +886,11 @@ func testAccGraphQLAPI_tags(t *testing.T) { CheckDestroy: testAccCheckGraphQLAPIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGraphQLAPIConfig_tags1(rName, "key1", "value1"), + Config: testAccGraphQLAPIConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGraphQLAPIExists(ctx, resourceName, &api1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -899,20 +899,20 @@ func testAccGraphQLAPI_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGraphQLAPIConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccGraphQLAPIConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGraphQLAPIExists(ctx, resourceName, &api1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGraphQLAPIConfig_tags1(rName, "key2", "value2"), + Config: testAccGraphQLAPIConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGraphQLAPIExists(ctx, resourceName, &api1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 15524552a25ba8e06a7a239e9fca303efa5e1fea Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:30 -0400 Subject: [PATCH 019/180] athena: Use constants for test strings --- internal/service/athena/data_catalog_test.go | 12 ++++++------ internal/service/athena/workgroup_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/athena/data_catalog_test.go b/internal/service/athena/data_catalog_test.go index 440e62d705d..92cbcb90cbc 100644 --- a/internal/service/athena/data_catalog_test.go +++ b/internal/service/athena/data_catalog_test.go @@ -87,11 +87,11 @@ func TestAccAthenaDataCatalog_tags(t *testing.T) { CheckDestroy: testAccCheckDataCatalogDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataCatalogConfig_tags1(rName, "key1", "value1"), + Config: testAccDataCatalogConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataCatalogExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -101,20 +101,20 @@ func TestAccAthenaDataCatalog_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrParameters}, }, { - Config: testAccDataCatalogConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDataCatalogConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataCatalogExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataCatalogConfig_tags1(rName, "key2", "value2"), + Config: testAccDataCatalogConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataCatalogExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/athena/workgroup_test.go b/internal/service/athena/workgroup_test.go index 405028954db..415bfc5b0a4 100644 --- a/internal/service/athena/workgroup_test.go +++ b/internal/service/athena/workgroup_test.go @@ -651,11 +651,11 @@ func TestAccAthenaWorkGroup_tags(t *testing.T) { CheckDestroy: testAccCheckWorkGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkGroupExists(ctx, resourceName, &workgroup1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -665,20 +665,20 @@ func TestAccAthenaWorkGroup_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrForceDestroy}, }, { - Config: testAccWorkGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkGroupExists(ctx, resourceName, &workgroup2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkGroupExists(ctx, resourceName, &workgroup3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From cd5217f4d63798aaf2dbd34b5f05b28be098f4f8 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:30 -0400 Subject: [PATCH 020/180] auditmanager: Use constants for test strings --- internal/service/auditmanager/assessment_test.go | 12 ++++++------ internal/service/auditmanager/control_test.go | 12 ++++++------ internal/service/auditmanager/framework_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/auditmanager/assessment_test.go b/internal/service/auditmanager/assessment_test.go index 585bd313c21..0e991c6f3ba 100644 --- a/internal/service/auditmanager/assessment_test.go +++ b/internal/service/auditmanager/assessment_test.go @@ -103,12 +103,12 @@ func TestAccAuditManagerAssessment_tags(t *testing.T) { CheckDestroy: testAccCheckAssessmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAssessmentConfig_tags1(rName, "key1", "value1"), + Config: testAccAssessmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAssessmentExists(ctx, resourceName, &assessment), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -118,22 +118,22 @@ func TestAccAuditManagerAssessment_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"roles"}, }, { - Config: testAccAssessmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAssessmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAssessmentExists(ctx, resourceName, &assessment), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAssessmentConfig_tags1(rName, "key2", "value2"), + Config: testAccAssessmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAssessmentExists(ctx, resourceName, &assessment), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/auditmanager/control_test.go b/internal/service/auditmanager/control_test.go index 371b426cddd..65929ac6805 100644 --- a/internal/service/auditmanager/control_test.go +++ b/internal/service/auditmanager/control_test.go @@ -100,12 +100,12 @@ func TestAccAuditManagerControl_tags(t *testing.T) { CheckDestroy: testAccCheckControlDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccControlConfig_tags1(rName, "key1", "value1"), + Config: testAccControlConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckControlExists(ctx, resourceName, &control), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -114,22 +114,22 @@ func TestAccAuditManagerControl_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccControlConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccControlConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckControlExists(ctx, resourceName, &control), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccControlConfig_tags1(rName, "key2", "value2"), + Config: testAccControlConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckControlExists(ctx, resourceName, &control), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/auditmanager/framework_test.go b/internal/service/auditmanager/framework_test.go index b3558692a96..c611f280ead 100644 --- a/internal/service/auditmanager/framework_test.go +++ b/internal/service/auditmanager/framework_test.go @@ -99,12 +99,12 @@ func TestAccAuditManagerFramework_tags(t *testing.T) { CheckDestroy: testAccCheckFrameworkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFrameworkConfig_tags1(rName, "key1", "value1"), + Config: testAccFrameworkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFrameworkExists(ctx, resourceName, &framework), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -113,22 +113,22 @@ func TestAccAuditManagerFramework_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFrameworkConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFrameworkConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFrameworkExists(ctx, resourceName, &framework), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFrameworkConfig_tags1(rName, "key2", "value2"), + Config: testAccFrameworkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFrameworkExists(ctx, resourceName, &framework), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From bddce151449a207ddd241dd204720c34ff6502cc Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:31 -0400 Subject: [PATCH 021/180] autoscaling: Use constants for test strings --- .../autoscaling/group_data_source_test.go | 8 ++++---- .../service/autoscaling/group_tag_test.go | 18 ++++++++--------- internal/service/autoscaling/group_test.go | 20 +++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/internal/service/autoscaling/group_data_source_test.go b/internal/service/autoscaling/group_data_source_test.go index 8e885a951bb..ae371611117 100644 --- a/internal/service/autoscaling/group_data_source_test.go +++ b/internal/service/autoscaling/group_data_source_test.go @@ -170,13 +170,13 @@ func TestAccAutoScalingGroupDataSource_tags(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "tag.#", acctest.CtTwo), resource.TestCheckResourceAttrPair(datasourceName, "tag.#", resourceName, "tag.#"), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "tag.*", map[string]string{ - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, "propagate_at_launch": "true", }), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "tag.*", map[string]string{ - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, "propagate_at_launch": "false", }), ), diff --git a/internal/service/autoscaling/group_tag_test.go b/internal/service/autoscaling/group_tag_test.go index 7b310e396ee..bb6b0d90416 100644 --- a/internal/service/autoscaling/group_tag_test.go +++ b/internal/service/autoscaling/group_tag_test.go @@ -29,11 +29,11 @@ func TestAccAutoScalingGroupTag_basic(t *testing.T) { CheckDestroy: testAccCheckGroupTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGroupTagConfig_basic("key1", "value1"), + Config: testAccGroupTagConfig_basic(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGroupTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, "tag.0.key", "key1"), - resource.TestCheckResourceAttr(resourceName, "tag.0.value", "value1"), + resource.TestCheckResourceAttr(resourceName, "tag.0.key", acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, "tag.0.value", acctest.CtValue1), ), }, { @@ -56,7 +56,7 @@ func TestAccAutoScalingGroupTag_disappears(t *testing.T) { CheckDestroy: testAccCheckGroupTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGroupTagConfig_basic("key1", "value1"), + Config: testAccGroupTagConfig_basic(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGroupTagExists(ctx, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfautoscaling.ResourceGroupTag(), resourceName), @@ -78,11 +78,11 @@ func TestAccAutoScalingGroupTag_value(t *testing.T) { CheckDestroy: testAccCheckGroupTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGroupTagConfig_basic("key1", "value1"), + Config: testAccGroupTagConfig_basic(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGroupTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, "tag.0.key", "key1"), - resource.TestCheckResourceAttr(resourceName, "tag.0.value", "value1"), + resource.TestCheckResourceAttr(resourceName, "tag.0.key", acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, "tag.0.value", acctest.CtValue1), ), }, { @@ -91,10 +91,10 @@ func TestAccAutoScalingGroupTag_value(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGroupTagConfig_basic("key1", "value1updated"), + Config: testAccGroupTagConfig_basic(acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckGroupTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, "tag.0.key", "key1"), + resource.TestCheckResourceAttr(resourceName, "tag.0.key", acctest.CtKey1), resource.TestCheckResourceAttr(resourceName, "tag.0.value", "value1updated"), ), }, diff --git a/internal/service/autoscaling/group_test.go b/internal/service/autoscaling/group_test.go index e014e70d2a8..71be7d863e0 100644 --- a/internal/service/autoscaling/group_test.go +++ b/internal/service/autoscaling/group_test.go @@ -239,43 +239,43 @@ func TestAccAutoScalingGroup_tags(t *testing.T) { CheckDestroy: testAccCheckGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGroupConfig_tags1(rName, "key1", "value1", true), + Config: testAccGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1, true), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, "tag.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "tag.*", map[string]string{ - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, "propagate_at_launch": "true", }), ), }, testAccGroupImportStep(resourceName), { - Config: testAccGroupConfig_tags2(rName, "key1", "value1updated", true, "key2", "value2", false), + Config: testAccGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", true, acctest.CtKey2, acctest.CtValue2, false), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, "tag.#", acctest.CtTwo), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "tag.*", map[string]string{ - names.AttrKey: "key1", + names.AttrKey: acctest.CtKey1, names.AttrValue: "value1updated", "propagate_at_launch": "true", }), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "tag.*", map[string]string{ - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, "propagate_at_launch": "false", }), ), }, { - Config: testAccGroupConfig_tags1(rName, "key2", "value2", true), + Config: testAccGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2, true), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, "tag.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "tag.*", map[string]string{ - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, "propagate_at_launch": "true", }), ), From 7fc84adb4a08bb70625f314aea66b37b44785cc9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:31 -0400 Subject: [PATCH 022/180] backup: Use constants for test strings --- internal/service/backup/vault_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/backup/vault_test.go b/internal/service/backup/vault_test.go index b1777515363..c78531e4297 100644 --- a/internal/service/backup/vault_test.go +++ b/internal/service/backup/vault_test.go @@ -92,11 +92,11 @@ func TestAccBackupVault_tags(t *testing.T) { CheckDestroy: testAccCheckVaultDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVaultConfig_tags1(rName, "key1", "value1"), + Config: testAccVaultConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVaultExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccBackupVault_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrForceDestroy}, }, { - Config: testAccVaultConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVaultConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVaultExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVaultConfig_tags1(rName, "key2", "value2"), + Config: testAccVaultConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVaultExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 94925ba5b5ea58cb7b5f3a3421b6ad5e26d5d220 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:31 -0400 Subject: [PATCH 023/180] batch: Use constants for test strings --- .../compute_environment_tags_gen_test.go | 148 ++++++++--------- .../service/batch/compute_environment_test.go | 2 +- .../batch/job_definition_tags_gen_test.go | 148 ++++++++--------- .../service/batch/job_queue_tags_gen_test.go | 150 +++++++++--------- .../batch/scheduling_policy_tags_gen_test.go | 148 ++++++++--------- 5 files changed, 298 insertions(+), 298 deletions(-) diff --git a/internal/service/batch/compute_environment_tags_gen_test.go b/internal/service/batch/compute_environment_tags_gen_test.go index 493659062e1..8f9e3458a88 100644 --- a/internal/service/batch/compute_environment_tags_gen_test.go +++ b/internal/service/batch/compute_environment_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccBatchComputeEnvironment_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccBatchComputeEnvironment_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccBatchComputeEnvironment_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccBatchComputeEnvironment_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccBatchComputeEnvironment_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccBatchComputeEnvironment_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccBatchComputeEnvironment_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccBatchComputeEnvironment_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccBatchComputeEnvironment_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccBatchComputeEnvironment_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccBatchComputeEnvironment_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToProviderOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToProviderOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToProviderOnly(t *tes testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToProviderOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToResourceOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToResourceOnly(t *tes testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToResourceOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_updateToResourceOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_emptyResourceTag(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_emptyResourceTag(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_nullOverlappingResourceTag( ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccBatchComputeEnvironment_tags_DefaultTags_nullOverlappingResourceTag( ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccBatchComputeEnvironment_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccBatchComputeEnvironment_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccBatchComputeEnvironment_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccBatchComputeEnvironment_tags_ComputedTag_OnUpdate_Replace(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccBatchComputeEnvironment_tags_ComputedTag_OnUpdate_Replace(t *testing ConfigDirectory: config.StaticDirectory("testdata/ComputeEnvironment/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckComputeEnvironmentExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccBatchComputeEnvironment_tags_ComputedTag_OnUpdate_Replace(t *testing ConfigDirectory: config.StaticDirectory("testdata/ComputeEnvironment/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/batch/compute_environment_test.go b/internal/service/batch/compute_environment_test.go index 937227b91d8..2457dd782cb 100644 --- a/internal/service/batch/compute_environment_test.go +++ b/internal/service/batch/compute_environment_test.go @@ -510,7 +510,7 @@ func TestAccBatchComputeEnvironment_CreateEC2DesiredVCPUsEC2KeyPairImageID_compu resource.TestCheckResourceAttr(resourceName, "compute_resources.0.subnets.#", acctest.CtOne), resource.TestCheckTypeSetElemAttrPair(resourceName, "compute_resources.0.subnets.*", subnetResourceName, names.AttrID), resource.TestCheckResourceAttr(resourceName, "compute_resources.0.tags.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "compute_resources.0.tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "compute_resources.0.tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "compute_resources.0.type", "EC2"), resource.TestCheckResourceAttrSet(resourceName, "ecs_cluster_arn"), resource.TestCheckResourceAttrPair(resourceName, "service_role", serviceRoleResourceName, names.AttrARN), diff --git a/internal/service/batch/job_definition_tags_gen_test.go b/internal/service/batch/job_definition_tags_gen_test.go index dbaf2acb59a..fc6c4f9f382 100644 --- a/internal/service/batch/job_definition_tags_gen_test.go +++ b/internal/service/batch/job_definition_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccBatchJobDefinition_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccBatchJobDefinition_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -61,15 +61,15 @@ func TestAccBatchJobDefinition_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -77,8 +77,8 @@ func TestAccBatchJobDefinition_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -93,13 +93,13 @@ func TestAccBatchJobDefinition_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -107,7 +107,7 @@ func TestAccBatchJobDefinition_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -162,7 +162,7 @@ func TestAccBatchJobDefinition_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -175,7 +175,7 @@ func TestAccBatchJobDefinition_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -226,13 +226,13 @@ func TestAccBatchJobDefinition_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -240,7 +240,7 @@ func TestAccBatchJobDefinition_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -271,7 +271,7 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -285,7 +285,7 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -340,13 +340,13 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -354,14 +354,14 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -370,8 +370,8 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -386,13 +386,13 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -400,7 +400,7 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -431,13 +431,13 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -445,7 +445,7 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -459,7 +459,7 @@ func TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -490,7 +490,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -507,7 +507,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -524,8 +524,8 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -534,7 +534,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -543,8 +543,8 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -561,7 +561,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -569,7 +569,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -578,7 +578,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -901,15 +901,15 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToProviderOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,7 +918,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToProviderOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -926,7 +926,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToProviderOnly(t *testing. testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToProviderOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -967,7 +967,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToResourceOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -975,7 +975,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToResourceOnly(t *testing. testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -984,15 +984,15 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToResourceOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1001,7 +1001,7 @@ func TestAccBatchJobDefinition_tags_DefaultTags_updateToResourceOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -1032,10 +1032,10 @@ func TestAccBatchJobDefinition_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1052,10 +1052,10 @@ func TestAccBatchJobDefinition_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1086,10 +1086,10 @@ func TestAccBatchJobDefinition_tags_DefaultTags_nullOverlappingResourceTag(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1105,10 +1105,10 @@ func TestAccBatchJobDefinition_tags_DefaultTags_nullOverlappingResourceTag(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1246,13 +1246,13 @@ func TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1261,13 +1261,13 @@ func TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1289,8 +1289,8 @@ func TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1320,13 +1320,13 @@ func TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1334,7 +1334,7 @@ func TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/JobDefinition/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobDefinitionExists(ctx, resourceName, &v), @@ -1359,7 +1359,7 @@ func TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/JobDefinition/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/batch/job_queue_tags_gen_test.go b/internal/service/batch/job_queue_tags_gen_test.go index cf8e666e449..40a321be64f 100644 --- a/internal/service/batch/job_queue_tags_gen_test.go +++ b/internal/service/batch/job_queue_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccBatchJobQueue_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccBatchJobQueue_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccBatchJobQueue_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccBatchJobQueue_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccBatchJobQueue_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccBatchJobQueue_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -152,7 +152,7 @@ func TestAccBatchJobQueue_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -165,7 +165,7 @@ func TestAccBatchJobQueue_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -213,13 +213,13 @@ func TestAccBatchJobQueue_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -227,7 +227,7 @@ func TestAccBatchJobQueue_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -255,7 +255,7 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -269,7 +269,7 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -318,13 +318,13 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -332,14 +332,14 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -348,8 +348,8 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -361,13 +361,13 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -375,7 +375,7 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -403,13 +403,13 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -417,7 +417,7 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -431,7 +431,7 @@ func TestAccBatchJobQueue_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -459,7 +459,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -467,7 +467,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -476,7 +476,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -490,8 +490,8 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -500,7 +500,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -509,8 +509,8 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -524,7 +524,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -532,7 +532,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -541,7 +541,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -840,15 +840,15 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -857,7 +857,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -865,7 +865,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToProviderOnly(t *testing.T) { testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -874,7 +874,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -903,7 +903,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -911,7 +911,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToResourceOnly(t *testing.T) { testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -920,15 +920,15 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -937,7 +937,7 @@ func TestAccBatchJobQueue_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -965,10 +965,10 @@ func TestAccBatchJobQueue_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -985,10 +985,10 @@ func TestAccBatchJobQueue_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1018,10 +1018,10 @@ func TestAccBatchJobQueue_tags_DefaultTags_nullOverlappingResourceTag(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1037,10 +1037,10 @@ func TestAccBatchJobQueue_tags_DefaultTags_nullOverlappingResourceTag(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1171,13 +1171,13 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1186,13 +1186,13 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1214,8 +1214,8 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1242,13 +1242,13 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1256,7 +1256,7 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/JobQueue/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckJobQueueExists(ctx, resourceName, &v), @@ -1266,7 +1266,7 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), - plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags).AtMapKey("key1")), + plancheck.ExpectUnknownValue(resourceName, tfjsonpath.New(names.AttrTags).AtMapKey(acctest.CtKey1)), }, PostApplyPreRefresh: []plancheck.PlanCheck{ plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionNoop), @@ -1281,7 +1281,7 @@ func TestAccBatchJobQueue_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/JobQueue/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/batch/scheduling_policy_tags_gen_test.go b/internal/service/batch/scheduling_policy_tags_gen_test.go index 60abe7f8abf..a29df149f53 100644 --- a/internal/service/batch/scheduling_policy_tags_gen_test.go +++ b/internal/service/batch/scheduling_policy_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccBatchSchedulingPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccBatchSchedulingPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccBatchSchedulingPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccBatchSchedulingPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccBatchSchedulingPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccBatchSchedulingPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccBatchSchedulingPolicy_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccBatchSchedulingPolicy_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccBatchSchedulingPolicy_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccBatchSchedulingPolicy_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccBatchSchedulingPolicy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToProviderOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToProviderOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToProviderOnly(t *testi testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToProviderOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToResourceOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToResourceOnly(t *testi testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToResourceOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_updateToResourceOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_emptyResourceTag(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_emptyResourceTag(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_nullOverlappingResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccBatchSchedulingPolicy_tags_DefaultTags_nullOverlappingResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccBatchSchedulingPolicy_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccBatchSchedulingPolicy_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccBatchSchedulingPolicy_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccBatchSchedulingPolicy_tags_ComputedTag_OnUpdate_Replace(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccBatchSchedulingPolicy_tags_ComputedTag_OnUpdate_Replace(t *testing.T ConfigDirectory: config.StaticDirectory("testdata/SchedulingPolicy/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSchedulingPolicyExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccBatchSchedulingPolicy_tags_ComputedTag_OnUpdate_Replace(t *testing.T ConfigDirectory: config.StaticDirectory("testdata/SchedulingPolicy/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, From 97f9574c4e212a2634bc1d0bcd5af94ad8342143 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:31 -0400 Subject: [PATCH 024/180] bcmdataexports: Use constants for test strings --- .../service/bcmdataexports/export_test.go | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/internal/service/bcmdataexports/export_test.go b/internal/service/bcmdataexports/export_test.go index e925d06ade1..143736f1b9f 100644 --- a/internal/service/bcmdataexports/export_test.go +++ b/internal/service/bcmdataexports/export_test.go @@ -60,9 +60,9 @@ func TestAccBCMDataExportsExport_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "export.0.refresh_cadence.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "export.0.refresh_cadence.0.frequency", "SYNCHRONOUS"), resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.TIME_GRANULARITY", "HOURLY"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_RESOURCES", "FALSE"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY", "FALSE"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_SPLIT_COST_ALLOCATION_DATA", "FALSE"), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_RESOURCES", acctest.CtFalseCaps), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY", acctest.CtFalseCaps), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_SPLIT_COST_ALLOCATION_DATA", acctest.CtFalseCaps), ), }, { @@ -111,9 +111,9 @@ func TestAccBCMDataExportsExport_update(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "export.0.refresh_cadence.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "export.0.refresh_cadence.0.frequency", "SYNCHRONOUS"), resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.TIME_GRANULARITY", "HOURLY"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_RESOURCES", "FALSE"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY", "FALSE"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_SPLIT_COST_ALLOCATION_DATA", "FALSE"), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_RESOURCES", acctest.CtFalseCaps), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY", acctest.CtFalseCaps), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_SPLIT_COST_ALLOCATION_DATA", acctest.CtFalseCaps), ), }, { @@ -134,9 +134,9 @@ func TestAccBCMDataExportsExport_update(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "export.0.refresh_cadence.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "export.0.refresh_cadence.0.frequency", "SYNCHRONOUS"), resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.TIME_GRANULARITY", "HOURLY"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_RESOURCES", "FALSE"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY", "FALSE"), - resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_SPLIT_COST_ALLOCATION_DATA", "FALSE"), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_RESOURCES", acctest.CtFalseCaps), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY", acctest.CtFalseCaps), + resource.TestCheckResourceAttr(resourceName, "export.0.data_query.0.table_configurations.COST_AND_USAGE_REPORT.INCLUDE_SPLIT_COST_ALLOCATION_DATA", acctest.CtFalseCaps), ), }, }, @@ -349,12 +349,12 @@ func TestAccBCMDataExportsExport_tags(t *testing.T) { CheckDestroy: testAccCheckExportDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccExportConfig_tags1(rName, "key1", "value1"), + Config: testAccExportConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckExportExists(ctx, resourceName, &export), resource.TestCheckResourceAttr(resourceName, "export.0.name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -363,22 +363,22 @@ func TestAccBCMDataExportsExport_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccExportConfig_tag2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccExportConfig_tag2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExportExists(ctx, resourceName, &export), resource.TestCheckResourceAttr(resourceName, "export.0.name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccExportConfig_tags1(rName, "key2", "value2"), + Config: testAccExportConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExportExists(ctx, resourceName, &export), resource.TestCheckResourceAttr(resourceName, "export.0.name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From be9bc0dc768ece0b2532ecd5c7fcdcb6f8c34c75 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:31 -0400 Subject: [PATCH 025/180] bedrock: Use constants for test strings --- internal/service/bedrock/custom_model_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/bedrock/custom_model_test.go b/internal/service/bedrock/custom_model_test.go index 9b9a5a82d06..ec2b4f0954c 100644 --- a/internal/service/bedrock/custom_model_test.go +++ b/internal/service/bedrock/custom_model_test.go @@ -109,11 +109,11 @@ func TestAccBedrockCustomModel_tags(t *testing.T) { CheckDestroy: testAccCheckCustomModelDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCustomModelConfig_tags1(rName, "key1", "value1"), + Config: testAccCustomModelConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCustomModelExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -123,20 +123,20 @@ func TestAccBedrockCustomModel_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"base_model_identifier"}, }, { - Config: testAccCustomModelConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCustomModelConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCustomModelExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCustomModelConfig_tags1(rName, "key2", "value2"), + Config: testAccCustomModelConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCustomModelExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 44bf92826a89f2b9046e88878c8231d4192c0583 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:31 -0400 Subject: [PATCH 026/180] bedrockagent: Use constants for test strings --- internal/service/bedrockagent/agent_alias_test.go | 12 ++++++------ internal/service/bedrockagent/agent_test.go | 12 ++++++------ internal/service/bedrockagent/knowledge_base_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/bedrockagent/agent_alias_test.go b/internal/service/bedrockagent/agent_alias_test.go index 6bb837c07ef..f72635e8b44 100644 --- a/internal/service/bedrockagent/agent_alias_test.go +++ b/internal/service/bedrockagent/agent_alias_test.go @@ -190,11 +190,11 @@ func TestAccBedrockAgentAgentAlias_tags(t *testing.T) { CheckDestroy: testAccCheckAgentAliasDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAgentAliasConfig_tags1(rName, "key1", "value1"), + Config: testAccAgentAliasConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAgentAliasExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -203,20 +203,20 @@ func TestAccBedrockAgentAgentAlias_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAgentAliasConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAgentAliasConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAgentAliasExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAgentAliasConfig_tags1(rName, "key2", "value2"), + Config: testAccAgentAliasConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAgentAliasExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/bedrockagent/agent_test.go b/internal/service/bedrockagent/agent_test.go index b3481126af3..66acc8a8995 100644 --- a/internal/service/bedrockagent/agent_test.go +++ b/internal/service/bedrockagent/agent_test.go @@ -141,11 +141,11 @@ func TestAccBedrockAgentAgent_tags(t *testing.T) { CheckDestroy: testAccCheckAgentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAgentConfig_tags1(rName, "anthropic.claude-v2", "key1", "value1"), + Config: testAccAgentConfig_tags1(rName, "anthropic.claude-v2", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAgentExists(ctx, resourceName, &agent), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -154,20 +154,20 @@ func TestAccBedrockAgentAgent_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAgentConfig_tags2(rName, "anthropic.claude-v2", "key1", "value1updated", "key2", "value2"), + Config: testAccAgentConfig_tags2(rName, "anthropic.claude-v2", acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAgentExists(ctx, resourceName, &agent), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAgentConfig_tags1(rName, "anthropic.claude-v2", "key2", "value2"), + Config: testAccAgentConfig_tags1(rName, "anthropic.claude-v2", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAgentExists(ctx, resourceName, &agent), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/bedrockagent/knowledge_base_test.go b/internal/service/bedrockagent/knowledge_base_test.go index c560bdd31f5..d6d7639f077 100644 --- a/internal/service/bedrockagent/knowledge_base_test.go +++ b/internal/service/bedrockagent/knowledge_base_test.go @@ -144,11 +144,11 @@ func testAccKnowledgeBase_tags(t *testing.T) { CheckDestroy: testAccCheckKnowledgeBaseDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKnowledgeBaseConfig_tags1(rName, foundationModel, "key1", "value1"), + Config: testAccKnowledgeBaseConfig_tags1(rName, foundationModel, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKnowledgeBaseExists(ctx, resourceName, &knowledgebase), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -157,20 +157,20 @@ func testAccKnowledgeBase_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccKnowledgeBaseConfig_tags2(rName, foundationModel, "key1", "value1updated", "key2", "value2"), + Config: testAccKnowledgeBaseConfig_tags2(rName, foundationModel, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKnowledgeBaseExists(ctx, resourceName, &knowledgebase), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKnowledgeBaseConfig_tags1(rName, foundationModel, "key2", "value2"), + Config: testAccKnowledgeBaseConfig_tags1(rName, foundationModel, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKnowledgeBaseExists(ctx, resourceName, &knowledgebase), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 36c97eb0a462bac06745356c7b33d19ffb8b191c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:32 -0400 Subject: [PATCH 027/180] budgets: Use constants for test strings --- internal/service/budgets/budget_action_test.go | 12 ++++++------ internal/service/budgets/budget_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/budgets/budget_action_test.go b/internal/service/budgets/budget_action_test.go index e150a443f7a..9e6386067e3 100644 --- a/internal/service/budgets/budget_action_test.go +++ b/internal/service/budgets/budget_action_test.go @@ -167,11 +167,11 @@ func TestAccBudgetsBudgetAction_tags(t *testing.T) { CheckDestroy: testAccCheckBudgetActionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBudgetActionConfig_tags1(rName, string(awstypes.ApprovalModelManual), thresholdValue, "key1", "value1"), + Config: testAccBudgetActionConfig_tags1(rName, string(awstypes.ApprovalModelManual), thresholdValue, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccBudgetActionExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -180,20 +180,20 @@ func TestAccBudgetsBudgetAction_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBudgetActionConfig_tags2(rName, string(awstypes.ApprovalModelManual), thresholdValue, "key1", "value1updated", "key2", "value2"), + Config: testAccBudgetActionConfig_tags2(rName, string(awstypes.ApprovalModelManual), thresholdValue, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccBudgetActionExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBudgetActionConfig_tags1(rName, string(awstypes.ApprovalModelManual), thresholdValue, "key2", "value2"), + Config: testAccBudgetActionConfig_tags1(rName, string(awstypes.ApprovalModelManual), thresholdValue, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccBudgetActionExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/budgets/budget_test.go b/internal/service/budgets/budget_test.go index 33fd18ca228..2fc9d46f3b3 100644 --- a/internal/service/budgets/budget_test.go +++ b/internal/service/budgets/budget_test.go @@ -521,11 +521,11 @@ func TestAccBudgetsBudget_tags(t *testing.T) { CheckDestroy: testAccCheckBudgetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBudgetConfig_tags1(rName, "key1", "value1"), + Config: testAccBudgetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccBudgetExists(ctx, resourceName, &budget), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -534,20 +534,20 @@ func TestAccBudgetsBudget_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBudgetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccBudgetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccBudgetExists(ctx, resourceName, &budget), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBudgetConfig_tags1(rName, "key2", "value2"), + Config: testAccBudgetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccBudgetExists(ctx, resourceName, &budget), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f0900bfdc89ab01fdbd63dd59939e506336e32e9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:32 -0400 Subject: [PATCH 028/180] ce: Use constants for test strings --- internal/service/ce/anomaly_monitor_test.go | 12 ++++++------ internal/service/ce/anomaly_subscription_test.go | 12 ++++++------ internal/service/ce/cost_category_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/ce/anomaly_monitor_test.go b/internal/service/ce/anomaly_monitor_test.go index 84f0117666e..65293672217 100644 --- a/internal/service/ce/anomaly_monitor_test.go +++ b/internal/service/ce/anomaly_monitor_test.go @@ -124,11 +124,11 @@ func TestAccCEAnomalyMonitor_tags(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.CEServiceID), Steps: []resource.TestStep{ { - Config: testAccAnomalyMonitorConfig_tags1(rName, "key1", "value1"), + Config: testAccAnomalyMonitorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnomalyMonitorExists(ctx, resourceName, &monitor), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -137,20 +137,20 @@ func TestAccCEAnomalyMonitor_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAnomalyMonitorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAnomalyMonitorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnomalyMonitorExists(ctx, resourceName, &monitor), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAnomalyMonitorConfig_tags1(rName, "key2", "value2"), + Config: testAccAnomalyMonitorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAnomalyMonitorExists(ctx, resourceName, &monitor), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ce/anomaly_subscription_test.go b/internal/service/ce/anomaly_subscription_test.go index 7d0820e6d07..51ce8b52c09 100644 --- a/internal/service/ce/anomaly_subscription_test.go +++ b/internal/service/ce/anomaly_subscription_test.go @@ -241,11 +241,11 @@ func TestAccCEAnomalySubscription_Tags(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.CEServiceID), Steps: []resource.TestStep{ { - Config: testAccAnomalySubscriptionConfig_tags1(rName, address, "key1", "value1"), + Config: testAccAnomalySubscriptionConfig_tags1(rName, address, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnomalySubscriptionExists(ctx, resourceName, &subscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -254,20 +254,20 @@ func TestAccCEAnomalySubscription_Tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAnomalySubscriptionConfig_tags2(rName, address, "key1", "value1updated", "key2", "value2"), + Config: testAccAnomalySubscriptionConfig_tags2(rName, address, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAnomalySubscriptionExists(ctx, resourceName, &subscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAnomalySubscriptionConfig_tags1(rName, address, "key2", "value2"), + Config: testAccAnomalySubscriptionConfig_tags1(rName, address, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAnomalySubscriptionExists(ctx, resourceName, &subscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ce/cost_category_test.go b/internal/service/ce/cost_category_test.go index 171aeb5c238..c484d613926 100644 --- a/internal/service/ce/cost_category_test.go +++ b/internal/service/ce/cost_category_test.go @@ -229,11 +229,11 @@ func TestAccCECostCategory_tags(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.CEServiceID), Steps: []resource.TestStep{ { - Config: testAccCostCategoryConfig_tags1(rName, "key1", "value1"), + Config: testAccCostCategoryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCostCategoryExists(ctx, resourceName, &output), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -242,20 +242,20 @@ func TestAccCECostCategory_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCostCategoryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCostCategoryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCostCategoryExists(ctx, resourceName, &output), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCostCategoryConfig_tags1(rName, "key2", "value2"), + Config: testAccCostCategoryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCostCategoryExists(ctx, resourceName, &output), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From bcec16dfd78d09dd6629470fb122bed6416849eb Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:32 -0400 Subject: [PATCH 029/180] chime: Use constants for test strings --- internal/service/chime/voice_connector_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/chime/voice_connector_test.go b/internal/service/chime/voice_connector_test.go index eda2788a566..6515ffbc48b 100644 --- a/internal/service/chime/voice_connector_test.go +++ b/internal/service/chime/voice_connector_test.go @@ -139,12 +139,12 @@ func testAccVoiceConnector_tags(t *testing.T) { CheckDestroy: testAccCheckVoiceConnectorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVoiceConnectorConfig_tags1(vcName, "key1", "value1"), + Config: testAccVoiceConnectorConfig_tags1(vcName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVoiceConnectorExists(ctx, resourceName, voiceConnector), resource.TestCheckResourceAttr(resourceName, names.AttrName, fmt.Sprintf("vc-%s", vcName)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -153,22 +153,22 @@ func testAccVoiceConnector_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVoiceConnectorConfig_tags2(vcName, "key1", "value1updated", "key2", "value2"), + Config: testAccVoiceConnectorConfig_tags2(vcName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVoiceConnectorExists(ctx, resourceName, voiceConnector), resource.TestCheckResourceAttr(resourceName, names.AttrName, fmt.Sprintf("vc-%s", vcName)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVoiceConnectorConfig_tags1(vcName, "key2", "value2"), + Config: testAccVoiceConnectorConfig_tags1(vcName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVoiceConnectorExists(ctx, resourceName, voiceConnector), resource.TestCheckResourceAttr(resourceName, names.AttrName, fmt.Sprintf("vc-%s", vcName)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From a71135faa2dd53024e4b0a914b0303ed29d77b3e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:32 -0400 Subject: [PATCH 030/180] chimesdkmediapipelines: Use constants for test strings --- .../media_insights_pipeline_configuration_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/chimesdkmediapipelines/media_insights_pipeline_configuration_test.go b/internal/service/chimesdkmediapipelines/media_insights_pipeline_configuration_test.go index 034149dc3de..0a705f9befb 100644 --- a/internal/service/chimesdkmediapipelines/media_insights_pipeline_configuration_test.go +++ b/internal/service/chimesdkmediapipelines/media_insights_pipeline_configuration_test.go @@ -217,12 +217,12 @@ func TestAccChimeSDKMediaPipelinesMediaInsightsPipelineConfiguration_tags(t *tes CheckDestroy: testAccCheckMediaInsightsPipelineConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMediaInsightsPipelineConfigurationConfig_tags1(rName, roleName, streamName, "key1", "value1"), + Config: testAccMediaInsightsPipelineConfigurationConfig_tags1(rName, roleName, streamName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMediaInsightsPipelineConfigurationExists(ctx, resourceName, &mipc), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -231,22 +231,22 @@ func TestAccChimeSDKMediaPipelinesMediaInsightsPipelineConfiguration_tags(t *tes ImportStateVerify: true, }, { - Config: testAccMediaInsightsPipelineConfigurationConfig_tags2(rName, roleName, streamName, "key1", "value1updated", "key2", "value2"), + Config: testAccMediaInsightsPipelineConfigurationConfig_tags2(rName, roleName, streamName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMediaInsightsPipelineConfigurationExists(ctx, resourceName, &mipc), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMediaInsightsPipelineConfigurationConfig_tags1(rName, roleName, streamName, "key2", "value2"), + Config: testAccMediaInsightsPipelineConfigurationConfig_tags1(rName, roleName, streamName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMediaInsightsPipelineConfigurationExists(ctx, resourceName, &mipc), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 78a13a0c52746df025eb488f71ee2ffada079840 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:32 -0400 Subject: [PATCH 031/180] chimesdkvoice: Use constants for test strings --- .../chimesdkvoice/sip_media_application_test.go | 12 ++++++------ .../chimesdkvoice/voice_profile_domain_test.go | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/service/chimesdkvoice/sip_media_application_test.go b/internal/service/chimesdkvoice/sip_media_application_test.go index 1cdaf475d19..0658e840856 100644 --- a/internal/service/chimesdkvoice/sip_media_application_test.go +++ b/internal/service/chimesdkvoice/sip_media_application_test.go @@ -143,12 +143,12 @@ func TestAccChimeSDKVoiceSipMediaApplication_tags(t *testing.T) { CheckDestroy: testAccCheckSipMediaApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSipMediaApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccSipMediaApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSipMediaApplicationExists(ctx, resourceName, sipMediaApplication), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -157,22 +157,22 @@ func TestAccChimeSDKVoiceSipMediaApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSipMediaApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSipMediaApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSipMediaApplicationExists(ctx, resourceName, sipMediaApplication), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSipMediaApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccSipMediaApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSipMediaApplicationExists(ctx, resourceName, sipMediaApplication), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/chimesdkvoice/voice_profile_domain_test.go b/internal/service/chimesdkvoice/voice_profile_domain_test.go index c8989ec4e70..82bb2e8d768 100644 --- a/internal/service/chimesdkvoice/voice_profile_domain_test.go +++ b/internal/service/chimesdkvoice/voice_profile_domain_test.go @@ -161,11 +161,11 @@ func testAccVoiceProfileDomain_tags(t *testing.T) { CheckDestroy: testAccCheckVoiceProfileDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVoiceProfileDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccVoiceProfileDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVoiceProfileDomainExists(ctx, resourceName, &voiceprofiledomain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -174,16 +174,16 @@ func testAccVoiceProfileDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVoiceProfileDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVoiceProfileDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVoiceProfileDomainExists(ctx, resourceName, &voiceprofiledomain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVoiceProfileDomainConfig_tags1(rName, "key2", "value3"), + Config: testAccVoiceProfileDomainConfig_tags1(rName, acctest.CtKey2, "value3"), Check: resource.ComposeTestCheckFunc( testAccCheckVoiceProfileDomainExists(ctx, resourceName, &voiceprofiledomain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), From afd8e70fa9bcc6f142a1b0495605c87f34a837fd Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:32 -0400 Subject: [PATCH 032/180] cloud9: Use constants for test strings --- internal/service/cloud9/environment_ec2_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/cloud9/environment_ec2_test.go b/internal/service/cloud9/environment_ec2_test.go index a7d0a43e30c..b3ccdfa8a30 100644 --- a/internal/service/cloud9/environment_ec2_test.go +++ b/internal/service/cloud9/environment_ec2_test.go @@ -117,11 +117,11 @@ func TestAccCloud9EnvironmentEC2_tags(t *testing.T) { CheckDestroy: testAccCheckEnvironmentEC2Destroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEnvironmentEC2Config_tags1(rName, "key1", "value1"), + Config: testAccEnvironmentEC2Config_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentEC2Exists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -131,20 +131,20 @@ func TestAccCloud9EnvironmentEC2_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrInstanceType, names.AttrSubnetID, "image_id"}, }, { - Config: testAccEnvironmentEC2Config_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEnvironmentEC2Config_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentEC2Exists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEnvironmentEC2Config_tags1(rName, "key2", "value2"), + Config: testAccEnvironmentEC2Config_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentEC2Exists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 1159c3f86bba9953de99b0d1d011c72d7f03fb02 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:33 -0400 Subject: [PATCH 033/180] cloudcontrol: Use constants for test strings --- internal/service/cloudcontrol/resource_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/service/cloudcontrol/resource_test.go b/internal/service/cloudcontrol/resource_test.go index b18cec467db..fbba14b6d8a 100644 --- a/internal/service/cloudcontrol/resource_test.go +++ b/internal/service/cloudcontrol/resource_test.go @@ -320,7 +320,7 @@ func TestAccCloudControlResource_DesiredState_objectValueAdded(t *testing.T) { ), }, { - Config: testAccResourceConfig_desiredStateObjectValue1(rName, "key1", "value1"), + Config: testAccResourceConfig_desiredStateObjectValue1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( resource.TestMatchResourceAttr(resourceName, names.AttrProperties, regexache.MustCompile(`"Value":"value1"`)), ), @@ -341,7 +341,7 @@ func TestAccCloudControlResource_DesiredState_objectValueRemoved(t *testing.T) { CheckDestroy: testAccCheckResourceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccResourceConfig_desiredStateObjectValue1(rName, "key1", "value1"), + Config: testAccResourceConfig_desiredStateObjectValue1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( resource.TestMatchResourceAttr(resourceName, names.AttrProperties, regexache.MustCompile(`"Value":"value1"`)), ), @@ -368,19 +368,19 @@ func TestAccCloudControlResource_DesiredState_objectValueUpdate(t *testing.T) { CheckDestroy: testAccCheckResourceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccResourceConfig_desiredStateObjectValue1(rName, "key1", "value1"), + Config: testAccResourceConfig_desiredStateObjectValue1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( resource.TestMatchResourceAttr(resourceName, names.AttrProperties, regexache.MustCompile(`"Value":"value1"`)), ), }, { - Config: testAccResourceConfig_desiredStateObjectValue1(rName, "key1", "value1updated"), + Config: testAccResourceConfig_desiredStateObjectValue1(rName, acctest.CtKey1, "value1updated"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestMatchResourceAttr(resourceName, names.AttrProperties, regexache.MustCompile(`"Value":"value1updated"`)), ), }, { - Config: testAccResourceConfig_desiredStateObjectValue1(rName, "key2", "value2"), + Config: testAccResourceConfig_desiredStateObjectValue1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( resource.TestMatchResourceAttr(resourceName, names.AttrProperties, regexache.MustCompile(`"Value":"value2"`)), ), From 1ea6a80c78dca28ef5b8fa4be9e2c8faec20fee9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:33 -0400 Subject: [PATCH 034/180] cloudformation: Use constants for test strings --- .../service/cloudformation/stack_set_test.go | 28 +++++++++---------- internal/service/cloudformation/stack_test.go | 8 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/cloudformation/stack_set_test.go b/internal/service/cloudformation/stack_set_test.go index 1fd2efabc5e..55cf6af031e 100644 --- a/internal/service/cloudformation/stack_set_test.go +++ b/internal/service/cloudformation/stack_set_test.go @@ -429,11 +429,11 @@ func TestAccCloudFormationStackSet_parameters(t *testing.T) { CheckDestroy: testAccCheckStackSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStackSetConfig_parameters1(rName, "value1"), + Config: testAccStackSetConfig_parameters1(rName, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet1), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "parameters.Parameter1", "value1"), + resource.TestCheckResourceAttr(resourceName, "parameters.Parameter1", acctest.CtValue1), ), }, { @@ -446,13 +446,13 @@ func TestAccCloudFormationStackSet_parameters(t *testing.T) { }, }, { - Config: testAccStackSetConfig_parameters2(rName, "value1updated", "value2"), + Config: testAccStackSetConfig_parameters2(rName, "value1updated", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet2), testAccCheckStackSetNotRecreated(&stackSet1, &stackSet2), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "parameters.Parameter1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "parameters.Parameter2", "value2"), + resource.TestCheckResourceAttr(resourceName, "parameters.Parameter2", acctest.CtValue2), ), }, { @@ -508,12 +508,12 @@ func TestAccCloudFormationStackSet_Parameters_default(t *testing.T) { }, }, { - Config: testAccStackSetConfig_parametersDefault1(rName, "value1"), + Config: testAccStackSetConfig_parametersDefault1(rName, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet2), testAccCheckStackSetNotRecreated(&stackSet1, &stackSet2), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "parameters.Parameter1", "value1"), + resource.TestCheckResourceAttr(resourceName, "parameters.Parameter1", acctest.CtValue1), ), }, { @@ -545,7 +545,7 @@ func TestAccCloudFormationStackSet_Parameters_noEcho(t *testing.T) { CheckDestroy: testAccCheckStackSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStackSetConfig_parametersNoEcho1(rName, "value1"), + Config: testAccStackSetConfig_parametersNoEcho1(rName, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet1), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtOne), @@ -562,7 +562,7 @@ func TestAccCloudFormationStackSet_Parameters_noEcho(t *testing.T) { }, }, { - Config: testAccStackSetConfig_parametersNoEcho1(rName, "value2"), + Config: testAccStackSetConfig_parametersNoEcho1(rName, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet2), testAccCheckStackSetNotRecreated(&stackSet1, &stackSet2), @@ -630,11 +630,11 @@ func TestAccCloudFormationStackSet_tags(t *testing.T) { CheckDestroy: testAccCheckStackSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStackSetConfig_tags1(rName, "key1", "value1"), + Config: testAccStackSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -647,21 +647,21 @@ func TestAccCloudFormationStackSet_tags(t *testing.T) { }, }, { - Config: testAccStackSetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStackSetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet2), testAccCheckStackSetNotRecreated(&stackSet1, &stackSet2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStackSetConfig_tags1(rName, "key2", "value2"), + Config: testAccStackSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackSetExists(ctx, resourceName, &stackSet1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/cloudformation/stack_test.go b/internal/service/cloudformation/stack_test.go index 2d2a6f3e6c0..ace029510d2 100644 --- a/internal/service/cloudformation/stack_test.go +++ b/internal/service/cloudformation/stack_test.go @@ -540,16 +540,16 @@ func TestAccCloudFormationStack_templateUpdate(t *testing.T) { CheckDestroy: testAccCheckStackDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStackConfig_templateUpdate(rName, "out1", "value1"), + Config: testAccStackConfig_templateUpdate(rName, "out1", acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &stack), resource.TestCheckResourceAttr(resourceName, "outputs.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "outputs.out1", "value1"), + resource.TestCheckResourceAttr(resourceName, "outputs.out1", acctest.CtValue1), resource.TestCheckOutput("stack_output", "out1:value1"), ), }, { - Config: testAccStackConfig_templateUpdate(rName, "out2", "value2"), + Config: testAccStackConfig_templateUpdate(rName, "out2", acctest.CtValue2), ConfigPlanChecks: resource.ConfigPlanChecks{ PreApply: []plancheck.PlanCheck{ plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), @@ -559,7 +559,7 @@ func TestAccCloudFormationStack_templateUpdate(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &stack), resource.TestCheckResourceAttr(resourceName, "outputs.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "outputs.out2", "value2"), + resource.TestCheckResourceAttr(resourceName, "outputs.out2", acctest.CtValue2), resource.TestCheckOutput("stack_output", "out2:value2"), ), }, From f53a33c88e77379498b45bbffb58752d21341bd8 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:33 -0400 Subject: [PATCH 035/180] cloudfront: Use constants for test strings --- internal/service/cloudfront/distribution_test.go | 12 ++++++------ .../cloudfront/response_headers_policy_test.go | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/service/cloudfront/distribution_test.go b/internal/service/cloudfront/distribution_test.go index 5eef5d6b64c..11faaafa625 100644 --- a/internal/service/cloudfront/distribution_test.go +++ b/internal/service/cloudfront/distribution_test.go @@ -88,11 +88,11 @@ func TestAccCloudFrontDistribution_tags(t *testing.T) { CheckDestroy: testAccCheckDistributionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDistributionConfig_tags1("key1", "value1"), + Config: testAccDistributionConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionExists(ctx, resourceName, &distribution), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -105,20 +105,20 @@ func TestAccCloudFrontDistribution_tags(t *testing.T) { }, }, { - Config: testAccDistributionConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccDistributionConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionExists(ctx, resourceName, &distribution), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDistributionConfig_tags1("key2", "value2"), + Config: testAccDistributionConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionExists(ctx, resourceName, &distribution), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/cloudfront/response_headers_policy_test.go b/internal/service/cloudfront/response_headers_policy_test.go index 22c663698bc..f64289aadda 100644 --- a/internal/service/cloudfront/response_headers_policy_test.go +++ b/internal/service/cloudfront/response_headers_policy_test.go @@ -121,12 +121,12 @@ func TestAccCloudFrontResponseHeadersPolicy_customHeaders(t *testing.T) { resource.TestCheckTypeSetElemNestedAttrs(resourceName, "custom_headers_config.0.items.*", map[string]string{ names.AttrHeader: "X-Header1", "override": "true", - names.AttrValue: "value1", + names.AttrValue: acctest.CtValue1, }), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "custom_headers_config.0.items.*", map[string]string{ names.AttrHeader: "X-Header2", "override": "false", - names.AttrValue: "value2", + names.AttrValue: acctest.CtValue2, }), resource.TestCheckResourceAttrSet(resourceName, "etag"), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), @@ -167,7 +167,7 @@ func TestAccCloudFrontResponseHeadersPolicy_RemoveHeadersConfig(t *testing.T) { resource.TestCheckTypeSetElemNestedAttrs(resourceName, "custom_headers_config.0.items.*", map[string]string{ names.AttrHeader: "X-Header1", "override": "true", - names.AttrValue: "value1", + names.AttrValue: acctest.CtValue1, }), resource.TestCheckResourceAttrSet(resourceName, "etag"), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), @@ -215,7 +215,7 @@ func TestAccCloudFrontResponseHeadersPolicy_securityHeaders(t *testing.T) { resource.TestCheckTypeSetElemNestedAttrs(resourceName, "custom_headers_config.0.items.*", map[string]string{ names.AttrHeader: "X-Header1", "override": "true", - names.AttrValue: "value1", + names.AttrValue: acctest.CtValue1, }), resource.TestCheckResourceAttrSet(resourceName, "etag"), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), From e89f022f1960380f44273bcfb42f020a288a2664 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:33 -0400 Subject: [PATCH 036/180] cloudhsmv2: Use constants for test strings --- internal/service/cloudhsmv2/cluster_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/cloudhsmv2/cluster_test.go b/internal/service/cloudhsmv2/cluster_test.go index bd1ac1d5b98..92bd55538cd 100644 --- a/internal/service/cloudhsmv2/cluster_test.go +++ b/internal/service/cloudhsmv2/cluster_test.go @@ -92,11 +92,11 @@ func testAccCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func testAccCluster_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"cluster_certificates"}, }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From e79ac85071c79e9a68596a55e4698d99c003b09a Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:33 -0400 Subject: [PATCH 037/180] cloudtrail: Use constants for test strings --- internal/service/cloudtrail/cloudtrail_test.go | 12 ++++++------ internal/service/cloudtrail/event_data_store_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/cloudtrail/cloudtrail_test.go b/internal/service/cloudtrail/cloudtrail_test.go index 639c0e539a6..37e18f1917e 100644 --- a/internal/service/cloudtrail/cloudtrail_test.go +++ b/internal/service/cloudtrail/cloudtrail_test.go @@ -378,11 +378,11 @@ func testAccTrail_tags(t *testing.T) { CheckDestroy: testAccCheckTrailDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCloudTrailConfig_tags1(rName, "key1", "value1"), + Config: testAccCloudTrailConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrailExists(ctx, resourceName, &trail), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -391,20 +391,20 @@ func testAccTrail_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCloudTrailConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCloudTrailConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrailExists(ctx, resourceName, &trail), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCloudTrailConfig_tags1(rName, "key2", "value2"), + Config: testAccCloudTrailConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrailExists(ctx, resourceName, &trail), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/cloudtrail/event_data_store_test.go b/internal/service/cloudtrail/event_data_store_test.go index 8ba6c250f03..1a4629ac1d8 100644 --- a/internal/service/cloudtrail/event_data_store_test.go +++ b/internal/service/cloudtrail/event_data_store_test.go @@ -127,11 +127,11 @@ func TestAccCloudTrailEventDataStore_tags(t *testing.T) { CheckDestroy: testAccCheckEventDataStoreDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEventDataStoreConfig_tags1(rName, "key1", "value1"), + Config: testAccEventDataStoreConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEventDataStoreExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -140,20 +140,20 @@ func TestAccCloudTrailEventDataStore_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEventDataStoreConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEventDataStoreConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEventDataStoreExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEventDataStoreConfig_tags1(rName, "key2", "value2"), + Config: testAccEventDataStoreConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEventDataStoreExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 168eb1f91f8c271944201c34641c432478a913e5 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:33 -0400 Subject: [PATCH 038/180] cloudwatch: Use constants for test strings --- .../cloudwatch/composite_alarm_test.go | 12 +++++----- .../service/cloudwatch/metric_alarm_test.go | 12 +++++----- .../service/cloudwatch/metric_stream_test.go | 22 +++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/internal/service/cloudwatch/composite_alarm_test.go b/internal/service/cloudwatch/composite_alarm_test.go index 9e8fd7c6135..720136c5054 100644 --- a/internal/service/cloudwatch/composite_alarm_test.go +++ b/internal/service/cloudwatch/composite_alarm_test.go @@ -90,11 +90,11 @@ func TestAccCloudWatchCompositeAlarm_tags(t *testing.T) { CheckDestroy: testAccCheckCompositeAlarmDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCompositeAlarmConfig_tags1(rName, "key1", "value1"), + Config: testAccCompositeAlarmConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCompositeAlarmExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -103,20 +103,20 @@ func TestAccCloudWatchCompositeAlarm_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCompositeAlarmConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCompositeAlarmConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCompositeAlarmExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCompositeAlarmConfig_tags1(rName, "key2", "value2"), + Config: testAccCompositeAlarmConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCompositeAlarmExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/cloudwatch/metric_alarm_test.go b/internal/service/cloudwatch/metric_alarm_test.go index a407968258c..a14495aeb60 100755 --- a/internal/service/cloudwatch/metric_alarm_test.go +++ b/internal/service/cloudwatch/metric_alarm_test.go @@ -593,11 +593,11 @@ func TestAccCloudWatchMetricAlarm_tags(t *testing.T) { CheckDestroy: testAccCheckMetricAlarmDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMetricAlarmConfig_tags1(rName, "key1", "value1"), + Config: testAccMetricAlarmConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckMetricAlarmExists(ctx, resourceName, &alarm), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -606,20 +606,20 @@ func TestAccCloudWatchMetricAlarm_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMetricAlarmConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMetricAlarmConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckMetricAlarmExists(ctx, resourceName, &alarm), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMetricAlarmConfig_tags1(rName, "key2", "value2"), + Config: testAccMetricAlarmConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckMetricAlarmExists(ctx, resourceName, &alarm), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/cloudwatch/metric_stream_test.go b/internal/service/cloudwatch/metric_stream_test.go index 13718695b8a..66478ff0337 100644 --- a/internal/service/cloudwatch/metric_stream_test.go +++ b/internal/service/cloudwatch/metric_stream_test.go @@ -306,27 +306,27 @@ func TestAccCloudWatchMetricStream_update(t *testing.T) { ), }, { - Config: testAccMetricStreamConfig_arnsWithTag(rName, "S3", "key1", "value1"), + Config: testAccMetricStreamConfig_arnsWithTag(rName, "S3", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMetricStreamExists(ctx, resourceName), acctest.MatchResourceAttrRegionalARN(resourceName, "firehose_arn", "firehose", regexache.MustCompile(`deliverystream/S3$`)), acctest.MatchResourceAttrGlobalARN(resourceName, names.AttrRoleARN, "iam", regexache.MustCompile(`role/S3$`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccMetricStreamConfig_arnsWithTag(rName, "S4", "key1", "value1"), + Config: testAccMetricStreamConfig_arnsWithTag(rName, "S4", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMetricStreamExists(ctx, resourceName), acctest.MatchResourceAttrRegionalARN(resourceName, "firehose_arn", "firehose", regexache.MustCompile(`deliverystream/S4$`)), acctest.MatchResourceAttrGlobalARN(resourceName, names.AttrRoleARN, "iam", regexache.MustCompile(`role/S4$`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccMetricStreamConfig_arnsWithTag(rName, "S4", "key1", "value1updated"), + Config: testAccMetricStreamConfig_arnsWithTag(rName, "S4", acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckMetricStreamExists(ctx, resourceName), acctest.MatchResourceAttrRegionalARN(resourceName, "firehose_arn", "firehose", regexache.MustCompile(`deliverystream/S4$`)), @@ -351,11 +351,11 @@ func TestAccCloudWatchMetricStream_tags(t *testing.T) { CheckDestroy: testAccCheckMetricStreamDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMetricStreamConfig_tags1(rName, "key1", "value1"), + Config: testAccMetricStreamConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMetricStreamExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -364,20 +364,20 @@ func TestAccCloudWatchMetricStream_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMetricStreamConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMetricStreamConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMetricStreamExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMetricStreamConfig_tags1(rName, "key2", "value2"), + Config: testAccMetricStreamConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMetricStreamExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 1dce114e78f4a4b38afd53987d506ae9bc7b5196 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 039/180] codeartifact: Use constants for test strings --- internal/service/codeartifact/domain_test.go | 12 ++++++------ internal/service/codeartifact/repository_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/codeartifact/domain_test.go b/internal/service/codeartifact/domain_test.go index bb77b3abede..481c84be237 100644 --- a/internal/service/codeartifact/domain_test.go +++ b/internal/service/codeartifact/domain_test.go @@ -100,11 +100,11 @@ func testAccDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -113,20 +113,20 @@ func testAccDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags1(rName, "key2", "value2"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2")), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2)), }, }, }) diff --git a/internal/service/codeartifact/repository_test.go b/internal/service/codeartifact/repository_test.go index 5d3a16c5cb5..ba70c7bf0ea 100644 --- a/internal/service/codeartifact/repository_test.go +++ b/internal/service/codeartifact/repository_test.go @@ -65,11 +65,11 @@ func testAccRepository_tags(t *testing.T) { CheckDestroy: testAccCheckRepositoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRepositoryConfig_tags1(rName, "key1", "value1"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -78,20 +78,20 @@ func testAccRepository_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRepositoryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRepositoryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRepositoryConfig_tags1(rName, "key2", "value2"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 31ba170ae43850be7026514d849a0c9e8d3296d6 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 040/180] codebuild: Use constants for test strings --- internal/service/codebuild/project_test.go | 12 ++++++------ internal/service/codebuild/report_group_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/codebuild/project_test.go b/internal/service/codebuild/project_test.go index ea727ed116c..f83cbe43c90 100644 --- a/internal/service/codebuild/project_test.go +++ b/internal/service/codebuild/project_test.go @@ -190,11 +190,11 @@ func TestAccCodeBuildProject_tags(t *testing.T) { CheckDestroy: testAccCheckProjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProjectConfig_tags1(rName, "key1", "value1"), + Config: testAccProjectConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &project), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -203,20 +203,20 @@ func TestAccCodeBuildProject_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProjectConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProjectConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &project), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProjectConfig_tags1(rName, "key2", "value2"), + Config: testAccProjectConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &project), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/codebuild/report_group_test.go b/internal/service/codebuild/report_group_test.go index 5cfc09cbe65..a67c0a3aa27 100644 --- a/internal/service/codebuild/report_group_test.go +++ b/internal/service/codebuild/report_group_test.go @@ -117,11 +117,11 @@ func TestAccCodeBuildReportGroup_tags(t *testing.T) { CheckDestroy: testAccCheckReportGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReportGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccReportGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckReportGroupExists(ctx, resourceName, &reportGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -131,20 +131,20 @@ func TestAccCodeBuildReportGroup_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"delete_reports"}, }, { - Config: testAccReportGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReportGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReportGroupExists(ctx, resourceName, &reportGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReportGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccReportGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReportGroupExists(ctx, resourceName, &reportGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 8ba298b15e64dd8110929dfd8cead936aa9a5950 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 041/180] codecommit: Use constants for test strings --- .../service/codecommit/repository_test.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/service/codecommit/repository_test.go b/internal/service/codecommit/repository_test.go index ba9f6f345c0..a8be07470e1 100644 --- a/internal/service/codecommit/repository_test.go +++ b/internal/service/codecommit/repository_test.go @@ -172,11 +172,11 @@ func TestAccCodeCommitRepository_tags(t *testing.T) { CheckDestroy: testAccCheckRepositoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRepositoryConfig_tags1(rName, "key1", "value1"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -185,12 +185,12 @@ func TestAccCodeCommitRepository_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRepositoryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRepositoryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -199,11 +199,11 @@ func TestAccCodeCommitRepository_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRepositoryConfig_tags1(rName, "key2", "value2"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -229,12 +229,12 @@ func TestAccCodeCommitRepository_UpdateNameAndTags(t *testing.T) { CheckDestroy: testAccCheckRepositoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRepositoryConfig_tags1(rName, "key1", "value1"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, names.AttrRepositoryName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -243,13 +243,13 @@ func TestAccCodeCommitRepository_UpdateNameAndTags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRepositoryConfig_tags2(rNameUpdated, "key1", "value1updated", "key2", "value2"), + Config: testAccRepositoryConfig_tags2(rNameUpdated, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v2), resource.TestCheckResourceAttr(resourceName, names.AttrRepositoryName, rNameUpdated), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { From b3118e096ba4af1c785466d3b8365e1548c299d9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 042/180] codeguruprofiler: Use constants for test strings --- .../codeguruprofiler/profiling_group_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/codeguruprofiler/profiling_group_test.go b/internal/service/codeguruprofiler/profiling_group_test.go index 09f396081b5..5bcf5713171 100644 --- a/internal/service/codeguruprofiler/profiling_group_test.go +++ b/internal/service/codeguruprofiler/profiling_group_test.go @@ -154,28 +154,28 @@ func TestAccCodeGuruProfilerProfilingGroup_tags(t *testing.T) { CheckDestroy: testAccCheckProfilingGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProfilingGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccProfilingGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProfilingGroupExists(ctx, resourceName, &profilinggroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccProfilingGroupConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccProfilingGroupConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProfilingGroupExists(ctx, resourceName, &profilinggroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProfilingGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccProfilingGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProfilingGroupExists(ctx, resourceName, &profilinggroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 8f663159b4c140d9468ab8ee936e884441122b2e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 043/180] codegurureviewer: Use constants for test strings --- .../codegurureviewer/repository_association_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/codegurureviewer/repository_association_test.go b/internal/service/codegurureviewer/repository_association_test.go index 805c602dac6..ec57b08f162 100644 --- a/internal/service/codegurureviewer/repository_association_test.go +++ b/internal/service/codegurureviewer/repository_association_test.go @@ -146,28 +146,28 @@ func TestAccCodeGuruReviewerRepositoryAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckRepositoryAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRepositoryAssociationConfig_tags_1(rName, "key1", "value1"), + Config: testAccRepositoryAssociationConfig_tags_1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryAssociationExists(ctx, resourceName, &repositoryassociation), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccRepositoryAssociationConfig_tags_2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRepositoryAssociationConfig_tags_2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryAssociationExists(ctx, resourceName, &repositoryassociation), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRepositoryAssociationConfig_tags_1(rName, "key2", "value2"), + Config: testAccRepositoryAssociationConfig_tags_1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRepositoryAssociationExists(ctx, resourceName, &repositoryassociation), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 45308b23acf79bc0f180b4350ec281891773e26c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 044/180] codepipeline: Use constants for test strings --- .../service/codepipeline/codepipeline_test.go | 20 +++++++++---------- .../codepipeline/custom_action_type_test.go | 12 +++++------ internal/service/codepipeline/webhook_test.go | 12 +++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/internal/service/codepipeline/codepipeline_test.go b/internal/service/codepipeline/codepipeline_test.go index b1c263ef02c..f486b3af807 100644 --- a/internal/service/codepipeline/codepipeline_test.go +++ b/internal/service/codepipeline/codepipeline_test.go @@ -244,11 +244,11 @@ func TestAccCodePipeline_tags(t *testing.T) { CheckDestroy: testAccCheckPipelineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCodePipelineConfig_tags1(rName, "key1", "value1"), + Config: testAccCodePipelineConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &p), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -257,12 +257,12 @@ func TestAccCodePipeline_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCodePipelineConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCodePipelineConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &p), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -271,11 +271,11 @@ func TestAccCodePipeline_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCodePipelineConfig_tags1(rName, "key2", "value2"), + Config: testAccCodePipelineConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &p), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -829,10 +829,10 @@ func TestAccCodePipeline_pipelinetype(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "variable.#", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "variable.0.name", "test_var1"), resource.TestCheckResourceAttr(resourceName, "variable.0.description", "This is test pipeline variable 1."), - resource.TestCheckResourceAttr(resourceName, "variable.0.default_value", "value1"), + resource.TestCheckResourceAttr(resourceName, "variable.0.default_value", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "variable.1.name", "test_var2"), resource.TestCheckResourceAttr(resourceName, "variable.1.description", "This is test pipeline variable 2."), - resource.TestCheckResourceAttr(resourceName, "variable.1.default_value", "value2"), + resource.TestCheckResourceAttr(resourceName, "variable.1.default_value", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "trigger.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "trigger.0.provider_type", "CodeStarSourceConnection"), resource.TestCheckResourceAttr(resourceName, "trigger.0.git_configuration.#", acctest.CtOne), @@ -904,10 +904,10 @@ func TestAccCodePipeline_pipelinetype(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "variable.#", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "variable.0.name", "test_var1"), resource.TestCheckResourceAttr(resourceName, "variable.0.description", "This is test pipeline variable 1."), - resource.TestCheckResourceAttr(resourceName, "variable.0.default_value", "value1"), + resource.TestCheckResourceAttr(resourceName, "variable.0.default_value", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "variable.1.name", "test_var2"), resource.TestCheckResourceAttr(resourceName, "variable.1.description", "This is test pipeline variable 2."), - resource.TestCheckResourceAttr(resourceName, "variable.1.default_value", "value2"), + resource.TestCheckResourceAttr(resourceName, "variable.1.default_value", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "trigger.0.git_configuration.#", acctest.CtZero), ), }, diff --git a/internal/service/codepipeline/custom_action_type_test.go b/internal/service/codepipeline/custom_action_type_test.go index 3fbe873db1f..77ee99628ff 100644 --- a/internal/service/codepipeline/custom_action_type_test.go +++ b/internal/service/codepipeline/custom_action_type_test.go @@ -106,11 +106,11 @@ func TestAccCodePipelineCustomActionType_tags(t *testing.T) { CheckDestroy: testAccCheckCustomActionTypeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCustomActionTypeConfig_tags1(rName, "key1", "value1"), + Config: testAccCustomActionTypeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCustomActionTypeExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -119,20 +119,20 @@ func TestAccCodePipelineCustomActionType_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCustomActionTypeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCustomActionTypeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCustomActionTypeExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCustomActionTypeConfig_tags1(rName, "key2", "value2"), + Config: testAccCustomActionTypeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCustomActionTypeExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/codepipeline/webhook_test.go b/internal/service/codepipeline/webhook_test.go index d3fbf81e52e..0d85850c51d 100644 --- a/internal/service/codepipeline/webhook_test.go +++ b/internal/service/codepipeline/webhook_test.go @@ -177,20 +177,20 @@ func TestAccCodePipelineWebhook_tags(t *testing.T) { CheckDestroy: testAccCheckWebhookDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWebhookConfig_tags1(rName, ghToken, "key1", "value1"), + Config: testAccWebhookConfig_tags1(rName, ghToken, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWebhookExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccWebhookConfig_tags2(rName, ghToken, "key1", "value1updated", "key2", "value2"), + Config: testAccWebhookConfig_tags2(rName, ghToken, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebhookExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -199,11 +199,11 @@ func TestAccCodePipelineWebhook_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWebhookConfig_tags1(rName, ghToken, "key2", "value2"), + Config: testAccWebhookConfig_tags1(rName, ghToken, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebhookExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f336e44ed90688b2026a444084fafa575fc824c3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:34 -0400 Subject: [PATCH 045/180] codestarconnections: Use constants for test strings --- .../service/codestarconnections/connection_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/codestarconnections/connection_test.go b/internal/service/codestarconnections/connection_test.go index 52d7996a665..adf941b04dc 100644 --- a/internal/service/codestarconnections/connection_test.go +++ b/internal/service/codestarconnections/connection_test.go @@ -134,11 +134,11 @@ func TestAccCodeStarConnectionsConnection_tags(t *testing.T) { CheckDestroy: testAccCheckConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -147,20 +147,20 @@ func TestAccCodeStarConnectionsConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 500a51066547d43d3deae128ec3a3d32f582b7fa Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:35 -0400 Subject: [PATCH 046/180] codestarnotifications: Use constants for test strings --- .../codestarnotifications/notification_rule_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/codestarnotifications/notification_rule_test.go b/internal/service/codestarnotifications/notification_rule_test.go index b49dc582fb2..38bbc5efd0e 100644 --- a/internal/service/codestarnotifications/notification_rule_test.go +++ b/internal/service/codestarnotifications/notification_rule_test.go @@ -172,11 +172,11 @@ func TestAccCodeStarNotificationsNotificationRule_tags(t *testing.T) { CheckDestroy: testAccCheckNotificationRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNotificationRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccNotificationRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNotificationRuleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -185,20 +185,20 @@ func TestAccCodeStarNotificationsNotificationRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNotificationRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNotificationRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNotificationRuleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNotificationRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccNotificationRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNotificationRuleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, From bd9be31188c789b905b035115328821f7397a3d1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:35 -0400 Subject: [PATCH 047/180] cognitoidentity: Use constants for test strings --- .../service/cognitoidentity/pool_data_source_test.go | 4 ++-- internal/service/cognitoidentity/pool_test.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/service/cognitoidentity/pool_data_source_test.go b/internal/service/cognitoidentity/pool_data_source_test.go index f9f58a7af64..385912482cf 100644 --- a/internal/service/cognitoidentity/pool_data_source_test.go +++ b/internal/service/cognitoidentity/pool_data_source_test.go @@ -210,12 +210,12 @@ func TestAccCognitoIdentityPoolDataSource_tags(t *testing.T) { CheckDestroy: testAccCheckPoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPoolDataSourceConfig_tags(name, "key1", "value1"), + Config: testAccPoolDataSourceConfig_tags(name, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPoolExists(ctx, resourceName, &ip), resource.TestCheckResourceAttrPair(dataSourceName, names.AttrARN, resourceName, names.AttrARN), resource.TestCheckResourceAttr(dataSourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/cognitoidentity/pool_test.go b/internal/service/cognitoidentity/pool_test.go index b969995b203..1b3b208b969 100644 --- a/internal/service/cognitoidentity/pool_test.go +++ b/internal/service/cognitoidentity/pool_test.go @@ -375,11 +375,11 @@ func TestAccCognitoIdentityPool_tags(t *testing.T) { CheckDestroy: testAccCheckPoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPoolConfig_tags1(name, "key1", "value1"), + Config: testAccPoolConfig_tags1(name, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPoolExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -388,22 +388,22 @@ func TestAccCognitoIdentityPool_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPoolConfig_tags2(name, "key1", "value1updated", "key2", "value2"), + Config: testAccPoolConfig_tags2(name, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPoolExists(ctx, resourceName, &v2), testAccCheckPoolNotRecreated(&v1, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPoolConfig_tags1(name, "key2", "value2"), + Config: testAccPoolConfig_tags1(name, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPoolExists(ctx, resourceName, &v3), testAccCheckPoolNotRecreated(&v2, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f3dfe697339bddd60c5511ef3b994c1587b38523 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:35 -0400 Subject: [PATCH 048/180] cognitoidp: Use constants for test strings --- internal/service/cognitoidp/user_pool_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/cognitoidp/user_pool_test.go b/internal/service/cognitoidp/user_pool_test.go index 0798251d73b..115a8f4374b 100644 --- a/internal/service/cognitoidp/user_pool_test.go +++ b/internal/service/cognitoidp/user_pool_test.go @@ -920,11 +920,11 @@ func TestAccCognitoIDPUserPool_tags(t *testing.T) { CheckDestroy: testAccCheckUserPoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUserPoolConfig_tags1(rName, "key1", "value1"), + Config: testAccUserPoolConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserPoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -933,19 +933,19 @@ func TestAccCognitoIDPUserPool_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccUserPoolConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUserPoolConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUserPoolConfig_tags1(rName, "key2", "value2"), + Config: testAccUserPoolConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserPoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From e75a666bfe9e17aba9f71a0b69fd3e736ef30a9b Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:35 -0400 Subject: [PATCH 049/180] comprehend: Use constants for test strings --- .../comprehend/document_classifier_test.go | 24 +++++++++---------- .../comprehend/entity_recognizer_test.go | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/comprehend/document_classifier_test.go b/internal/service/comprehend/document_classifier_test.go index 3a219a775b0..d4cbd61d02e 100644 --- a/internal/service/comprehend/document_classifier_test.go +++ b/internal/service/comprehend/document_classifier_test.go @@ -136,7 +136,7 @@ func TestAccComprehendDocumentClassifier_versionName(t *testing.T) { CheckDestroy: testAccCheckDocumentClassifierDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDocumentClassifierConfig_versionName(rName, vName1, names.AttrKey, "value1"), + Config: testAccDocumentClassifierConfig_versionName(rName, vName1, names.AttrKey, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDocumentClassifierExists(ctx, resourceName, &documentclassifier), testAccCheckDocumentClassifierPublishedVersions(ctx, resourceName, 1), @@ -145,7 +145,7 @@ func TestAccComprehendDocumentClassifier_versionName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "version_name_prefix", ""), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "comprehend", regexache.MustCompile(fmt.Sprintf(`document-classifier/%s/version/%s$`, rName, vName1))), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key", acctest.CtValue1), ), }, { @@ -154,7 +154,7 @@ func TestAccComprehendDocumentClassifier_versionName(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDocumentClassifierConfig_versionName(rName, vName2, names.AttrKey, "value2"), + Config: testAccDocumentClassifierConfig_versionName(rName, vName2, names.AttrKey, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDocumentClassifierExists(ctx, resourceName, &documentclassifier), testAccCheckDocumentClassifierPublishedVersions(ctx, resourceName, 2), @@ -163,7 +163,7 @@ func TestAccComprehendDocumentClassifier_versionName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "version_name_prefix", ""), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "comprehend", regexache.MustCompile(fmt.Sprintf(`document-classifier/%s/version/%s$`, rName, vName2))), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key", acctest.CtValue2), ), }, { @@ -1268,12 +1268,12 @@ func TestAccComprehendDocumentClassifier_tags(t *testing.T) { CheckDestroy: testAccCheckDocumentClassifierDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDocumentClassifierConfig_tags1(rName, "key1", "value1"), + Config: testAccDocumentClassifierConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDocumentClassifierExists(ctx, resourceName, &v1), testAccCheckDocumentClassifierPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1282,24 +1282,24 @@ func TestAccComprehendDocumentClassifier_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDocumentClassifierConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDocumentClassifierConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDocumentClassifierExists(ctx, resourceName, &v2), testAccCheckDocumentClassifierNotRecreated(&v1, &v2), testAccCheckDocumentClassifierPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDocumentClassifierConfig_tags1(rName, "key2", "value2"), + Config: testAccDocumentClassifierConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDocumentClassifierExists(ctx, resourceName, &v3), testAccCheckDocumentClassifierNotRecreated(&v2, &v3), testAccCheckDocumentClassifierPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -1361,7 +1361,7 @@ func TestAccComprehendDocumentClassifier_DefaultTags_providerOnly(t *testing.T) }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("providerkey1", "value1"), + acctest.ConfigDefaultTags_Tags1("providerkey1", acctest.CtValue1), testAccDocumentClassifierConfig_tags0(rName), ), Check: resource.ComposeAggregateTestCheckFunc( @@ -1370,7 +1370,7 @@ func TestAccComprehendDocumentClassifier_DefaultTags_providerOnly(t *testing.T) testAccCheckDocumentClassifierPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", acctest.CtValue1), ), }, }, diff --git a/internal/service/comprehend/entity_recognizer_test.go b/internal/service/comprehend/entity_recognizer_test.go index b27676b2055..381a222f36b 100644 --- a/internal/service/comprehend/entity_recognizer_test.go +++ b/internal/service/comprehend/entity_recognizer_test.go @@ -133,7 +133,7 @@ func TestAccComprehendEntityRecognizer_versionName(t *testing.T) { CheckDestroy: testAccCheckEntityRecognizerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEntityRecognizerConfig_versionName(rName, vName1, names.AttrKey, "value1"), + Config: testAccEntityRecognizerConfig_versionName(rName, vName1, names.AttrKey, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEntityRecognizerExists(ctx, resourceName, &entityrecognizer), testAccCheckEntityRecognizerPublishedVersions(ctx, resourceName, 1), @@ -142,7 +142,7 @@ func TestAccComprehendEntityRecognizer_versionName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "version_name_prefix", ""), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "comprehend", regexache.MustCompile(fmt.Sprintf(`entity-recognizer/%s/version/%s$`, rName, vName1))), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key", acctest.CtValue1), ), }, { @@ -151,7 +151,7 @@ func TestAccComprehendEntityRecognizer_versionName(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEntityRecognizerConfig_versionName(rName, vName2, names.AttrKey, "value2"), + Config: testAccEntityRecognizerConfig_versionName(rName, vName2, names.AttrKey, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEntityRecognizerExists(ctx, resourceName, &entityrecognizer), testAccCheckEntityRecognizerPublishedVersions(ctx, resourceName, 2), @@ -160,7 +160,7 @@ func TestAccComprehendEntityRecognizer_versionName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "version_name_prefix", ""), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "comprehend", regexache.MustCompile(fmt.Sprintf(`entity-recognizer/%s/version/%s$`, rName, vName2))), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key", acctest.CtValue2), ), }, { @@ -806,12 +806,12 @@ func TestAccComprehendEntityRecognizer_tags(t *testing.T) { CheckDestroy: testAccCheckEntityRecognizerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEntityRecognizerConfig_tags1(rName, "key1", "value1"), + Config: testAccEntityRecognizerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEntityRecognizerExists(ctx, resourceName, &v1), testAccCheckEntityRecognizerPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -820,24 +820,24 @@ func TestAccComprehendEntityRecognizer_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEntityRecognizerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEntityRecognizerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEntityRecognizerExists(ctx, resourceName, &v2), testAccCheckEntityRecognizerNotRecreated(&v1, &v2), testAccCheckEntityRecognizerPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEntityRecognizerConfig_tags1(rName, "key2", "value2"), + Config: testAccEntityRecognizerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckEntityRecognizerExists(ctx, resourceName, &v3), testAccCheckEntityRecognizerNotRecreated(&v2, &v3), testAccCheckEntityRecognizerPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -899,7 +899,7 @@ func TestAccComprehendEntityRecognizer_DefaultTags_providerOnly(t *testing.T) { }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("providerkey1", "value1"), + acctest.ConfigDefaultTags_Tags1("providerkey1", acctest.CtValue1), testAccEntityRecognizerConfig_tags0(rName), ), Check: resource.ComposeAggregateTestCheckFunc( @@ -908,7 +908,7 @@ func TestAccComprehendEntityRecognizer_DefaultTags_providerOnly(t *testing.T) { testAccCheckEntityRecognizerPublishedVersions(ctx, resourceName, 1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", acctest.CtValue1), ), }, }, From 5d75ffeb1858cb91fe8bf7f6cb63b8138add65b6 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:35 -0400 Subject: [PATCH 050/180] configservice: Use constants for test strings --- .../aggregate_authorization_test.go | 12 ++++---- .../service/configservice/config_rule_test.go | 28 +++++++++---------- .../configuration_aggregator_test.go | 12 ++++---- .../organization_custom_rule_test.go | 16 +++++------ .../organization_managed_rule_test.go | 16 +++++------ 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/internal/service/configservice/aggregate_authorization_test.go b/internal/service/configservice/aggregate_authorization_test.go index 7f8d5f358c9..825befe55a6 100644 --- a/internal/service/configservice/aggregate_authorization_test.go +++ b/internal/service/configservice/aggregate_authorization_test.go @@ -86,11 +86,11 @@ func TestAccConfigServiceAggregateAuthorization_tags(t *testing.T) { CheckDestroy: testAccCheckAggregateAuthorizationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAggregateAuthorizationConfig_tags1(accountID, "key1", "value1"), + Config: testAccAggregateAuthorizationConfig_tags1(accountID, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAggregateAuthorizationExists(ctx, resourceName, &aa), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -99,20 +99,20 @@ func TestAccConfigServiceAggregateAuthorization_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAggregateAuthorizationConfig_tags2(accountID, "key1", "value1updated", "key2", "value2"), + Config: testAccAggregateAuthorizationConfig_tags2(accountID, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAggregateAuthorizationExists(ctx, resourceName, &aa), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAggregateAuthorizationConfig_tags1(accountID, "key2", "value2"), + Config: testAccAggregateAuthorizationConfig_tags1(accountID, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAggregateAuthorizationExists(ctx, resourceName, &aa), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/configservice/config_rule_test.go b/internal/service/configservice/config_rule_test.go index 13d42c7526a..0725f9b998e 100644 --- a/internal/service/configservice/config_rule_test.go +++ b/internal/service/configservice/config_rule_test.go @@ -255,19 +255,19 @@ func testAccConfigRule_Scope_TagKey(t *testing.T) { CheckDestroy: testAccCheckConfigRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConfigRuleConfig_scopeTagKey(rName, "key1"), + Config: testAccConfigRuleConfig_scopeTagKey(rName, acctest.CtKey1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &configRule), resource.TestCheckResourceAttr(resourceName, "scope.#", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "scope.0.tag_key", "key1"), + resource.TestCheckResourceAttr(resourceName, "scope.0.tag_key", acctest.CtKey1), ), }, { - Config: testAccConfigRuleConfig_scopeTagKey(rName, "key2"), + Config: testAccConfigRuleConfig_scopeTagKey(rName, acctest.CtKey2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &configRule), resource.TestCheckResourceAttr(resourceName, "scope.#", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "scope.0.tag_key", "key2"), + resource.TestCheckResourceAttr(resourceName, "scope.0.tag_key", acctest.CtKey2), ), }, }, @@ -309,19 +309,19 @@ func testAccConfigRule_Scope_TagValue(t *testing.T) { CheckDestroy: testAccCheckConfigRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConfigRuleConfig_scopeTagValue(rName, "value1"), + Config: testAccConfigRuleConfig_scopeTagValue(rName, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &configRule), resource.TestCheckResourceAttr(resourceName, "scope.#", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "scope.0.tag_value", "value1"), + resource.TestCheckResourceAttr(resourceName, "scope.0.tag_value", acctest.CtValue1), ), }, { - Config: testAccConfigRuleConfig_scopeTagValue(rName, "value2"), + Config: testAccConfigRuleConfig_scopeTagValue(rName, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &configRule), resource.TestCheckResourceAttr(resourceName, "scope.#", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "scope.0.tag_value", "value2"), + resource.TestCheckResourceAttr(resourceName, "scope.0.tag_value", acctest.CtValue2), ), }, }, @@ -341,11 +341,11 @@ func testAccConfigRule_tags(t *testing.T) { CheckDestroy: testAccCheckConfigRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConfigRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccConfigRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &cr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -354,20 +354,20 @@ func testAccConfigRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConfigRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConfigRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &cr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConfigRuleConfig_tags1(rName, "key2", "value2"), + Config: testAccConfigRuleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigRuleExists(ctx, resourceName, &cr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/configservice/configuration_aggregator_test.go b/internal/service/configservice/configuration_aggregator_test.go index 9af1d6391ce..d94f0cef378 100644 --- a/internal/service/configservice/configuration_aggregator_test.go +++ b/internal/service/configservice/configuration_aggregator_test.go @@ -129,20 +129,20 @@ func TestAccConfigServiceConfigurationAggregator_tags(t *testing.T) { CheckDestroy: testAccCheckConfigurationAggregatorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConfigurationAggregatorConfig_tags1(rName, "key1", "value1"), + Config: testAccConfigurationAggregatorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationAggregatorExists(ctx, resourceName, &ca), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccConfigurationAggregatorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConfigurationAggregatorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationAggregatorExists(ctx, resourceName, &ca), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -151,11 +151,11 @@ func TestAccConfigServiceConfigurationAggregator_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConfigurationAggregatorConfig_tags1(rName, "key2", "value2"), + Config: testAccConfigurationAggregatorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationAggregatorExists(ctx, resourceName, &ca), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/configservice/organization_custom_rule_test.go b/internal/service/configservice/organization_custom_rule_test.go index 09c14a28e83..7a50023d25d 100644 --- a/internal/service/configservice/organization_custom_rule_test.go +++ b/internal/service/configservice/organization_custom_rule_test.go @@ -366,10 +366,10 @@ func testAccOrganizationCustomRule_TagKeyScope(t *testing.T) { CheckDestroy: testAccCheckOrganizationCustomRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOrganizationCustomRuleConfig_tagKeyScope(rName, "key1"), + Config: testAccOrganizationCustomRuleConfig_tagKeyScope(rName, acctest.CtKey1), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationCustomRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_key_scope", "key1"), + resource.TestCheckResourceAttr(resourceName, "tag_key_scope", acctest.CtKey1), ), }, { @@ -378,10 +378,10 @@ func testAccOrganizationCustomRule_TagKeyScope(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOrganizationCustomRuleConfig_tagKeyScope(rName, "key2"), + Config: testAccOrganizationCustomRuleConfig_tagKeyScope(rName, acctest.CtKey2), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationCustomRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_key_scope", "key2"), + resource.TestCheckResourceAttr(resourceName, "tag_key_scope", acctest.CtKey2), ), }, }, @@ -401,10 +401,10 @@ func testAccOrganizationCustomRule_TagValueScope(t *testing.T) { CheckDestroy: testAccCheckOrganizationCustomRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOrganizationCustomRuleConfig_tagValueScope(rName, "value1"), + Config: testAccOrganizationCustomRuleConfig_tagValueScope(rName, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationCustomRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_value_scope", "value1"), + resource.TestCheckResourceAttr(resourceName, "tag_value_scope", acctest.CtValue1), ), }, { @@ -413,10 +413,10 @@ func testAccOrganizationCustomRule_TagValueScope(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOrganizationCustomRuleConfig_tagValueScope(rName, "value2"), + Config: testAccOrganizationCustomRuleConfig_tagValueScope(rName, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationCustomRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_value_scope", "value2"), + resource.TestCheckResourceAttr(resourceName, "tag_value_scope", acctest.CtValue2), ), }, }, diff --git a/internal/service/configservice/organization_managed_rule_test.go b/internal/service/configservice/organization_managed_rule_test.go index 07b11ddeccc..4fa96671543 100644 --- a/internal/service/configservice/organization_managed_rule_test.go +++ b/internal/service/configservice/organization_managed_rule_test.go @@ -362,10 +362,10 @@ func testAccOrganizationManagedRule_TagKeyScope(t *testing.T) { CheckDestroy: testAccCheckOrganizationManagedRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOrganizationManagedRuleConfig_tagKeyScope(rName, "key1"), + Config: testAccOrganizationManagedRuleConfig_tagKeyScope(rName, acctest.CtKey1), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationManagedRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_key_scope", "key1"), + resource.TestCheckResourceAttr(resourceName, "tag_key_scope", acctest.CtKey1), ), }, { @@ -374,10 +374,10 @@ func testAccOrganizationManagedRule_TagKeyScope(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOrganizationManagedRuleConfig_tagKeyScope(rName, "key2"), + Config: testAccOrganizationManagedRuleConfig_tagKeyScope(rName, acctest.CtKey2), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationManagedRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_key_scope", "key2"), + resource.TestCheckResourceAttr(resourceName, "tag_key_scope", acctest.CtKey2), ), }, }, @@ -397,10 +397,10 @@ func testAccOrganizationManagedRule_TagValueScope(t *testing.T) { CheckDestroy: testAccCheckOrganizationManagedRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOrganizationManagedRuleConfig_tagValueScope(rName, "value1"), + Config: testAccOrganizationManagedRuleConfig_tagValueScope(rName, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationManagedRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_value_scope", "value1"), + resource.TestCheckResourceAttr(resourceName, "tag_value_scope", acctest.CtValue1), ), }, { @@ -409,10 +409,10 @@ func testAccOrganizationManagedRule_TagValueScope(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOrganizationManagedRuleConfig_tagValueScope(rName, "value2"), + Config: testAccOrganizationManagedRuleConfig_tagValueScope(rName, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationManagedRuleExists(ctx, resourceName, &rule), - resource.TestCheckResourceAttr(resourceName, "tag_value_scope", "value2"), + resource.TestCheckResourceAttr(resourceName, "tag_value_scope", acctest.CtValue2), ), }, }, From 8bbdbd0a0016800c71545683768cc67667901428 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:36 -0400 Subject: [PATCH 051/180] connect: Use constants for test strings --- internal/service/connect/phone_number_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/connect/phone_number_test.go b/internal/service/connect/phone_number_test.go index 2afe854f074..1a809edb329 100644 --- a/internal/service/connect/phone_number_test.go +++ b/internal/service/connect/phone_number_test.go @@ -165,11 +165,11 @@ func testAccPhoneNumber_tags(t *testing.T) { CheckDestroy: testAccCheckPhoneNumberDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPhoneNumberConfig_tags1(rName, "key1", "value1"), + Config: testAccPhoneNumberConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPhoneNumberExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -178,20 +178,20 @@ func testAccPhoneNumber_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPhoneNumberConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPhoneNumberConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPhoneNumberExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPhoneNumberConfig_tags1(rName, "key2", "value2"), + Config: testAccPhoneNumberConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPhoneNumberExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 903a6eeba5d81985549e8f87c97797f0dd49b92c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:36 -0400 Subject: [PATCH 052/180] controltower: Use constants for test strings --- internal/service/controltower/landing_zone_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/controltower/landing_zone_test.go b/internal/service/controltower/landing_zone_test.go index f04cb606664..84828c5ca4f 100644 --- a/internal/service/controltower/landing_zone_test.go +++ b/internal/service/controltower/landing_zone_test.go @@ -95,11 +95,11 @@ func testAccLandingZone_tags(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccLandingZoneConfig_tags1("key1", "value1"), + Config: testAccLandingZoneConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLandingZoneExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -108,20 +108,20 @@ func testAccLandingZone_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLandingZoneConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccLandingZoneConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLandingZoneExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLandingZoneConfig_tags1("key2", "value2"), + Config: testAccLandingZoneConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLandingZoneExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 9b18e427a83b6b031346f061b89c037bb25d6b66 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:36 -0400 Subject: [PATCH 053/180] customerprofiles: Use constants for test strings --- internal/service/customerprofiles/domain_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/customerprofiles/domain_test.go b/internal/service/customerprofiles/domain_test.go index d17a7331e37..5be255ea17d 100644 --- a/internal/service/customerprofiles/domain_test.go +++ b/internal/service/customerprofiles/domain_test.go @@ -164,11 +164,11 @@ func TestAccCustomerProfilesDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags(rName, "key1", "value1"), + Config: testAccDomainConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -177,20 +177,20 @@ func TestAccCustomerProfilesDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags(rName, "key2", "value2"), + Config: testAccDomainConfig_tags(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 1e1e1c1b9dfd1ac545919a85dc460ff92fa711ee Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:36 -0400 Subject: [PATCH 054/180] dataexchange: Use constants for test strings --- internal/service/dataexchange/data_set_test.go | 12 ++++++------ internal/service/dataexchange/revision_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/dataexchange/data_set_test.go b/internal/service/dataexchange/data_set_test.go index 78941374df5..5ea8620a13e 100644 --- a/internal/service/dataexchange/data_set_test.go +++ b/internal/service/dataexchange/data_set_test.go @@ -74,11 +74,11 @@ func TestAccDataExchangeDataSet_tags(t *testing.T) { CheckDestroy: testAccCheckDataSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataSetConfig_tags1(rName, "key1", "value1"), + Config: testAccDataSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataSetExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -87,20 +87,20 @@ func TestAccDataExchangeDataSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDataSetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDataSetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSetExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataSetConfig_tags1(rName, "key2", "value2"), + Config: testAccDataSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSetExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/dataexchange/revision_test.go b/internal/service/dataexchange/revision_test.go index 0f9a64e51ca..4faca66d53e 100644 --- a/internal/service/dataexchange/revision_test.go +++ b/internal/service/dataexchange/revision_test.go @@ -63,11 +63,11 @@ func TestAccDataExchangeRevision_tags(t *testing.T) { CheckDestroy: testAccCheckRevisionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRevisionConfig_tags1(rName, "key1", "value1"), + Config: testAccRevisionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRevisionExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -76,20 +76,20 @@ func TestAccDataExchangeRevision_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRevisionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRevisionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRevisionExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRevisionConfig_tags1(rName, "key2", "value2"), + Config: testAccRevisionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRevisionExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 75f75094e7ff0cbd1d97a406b839d0e6e844b9d2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:36 -0400 Subject: [PATCH 055/180] datasync: Use constants for test strings --- internal/service/datasync/agent_test.go | 12 ++++++------ .../service/datasync/location_azure_blob_test.go | 12 ++++++------ internal/service/datasync/location_efs_test.go | 12 ++++++------ .../datasync/location_fsx_lustre_file_system_test.go | 12 ++++++------ .../datasync/location_fsx_ontap_file_system_test.go | 12 ++++++------ .../location_fsx_openzfs_file_system_test.go | 12 ++++++------ .../location_fsx_windows_file_system_test.go | 12 ++++++------ internal/service/datasync/location_hdfs_test.go | 12 ++++++------ internal/service/datasync/location_nfs_test.go | 12 ++++++------ .../service/datasync/location_object_storage_test.go | 12 ++++++------ internal/service/datasync/location_s3_test.go | 12 ++++++------ internal/service/datasync/location_smb_test.go | 12 ++++++------ internal/service/datasync/task_test.go | 12 ++++++------ 13 files changed, 78 insertions(+), 78 deletions(-) diff --git a/internal/service/datasync/agent_test.go b/internal/service/datasync/agent_test.go index b392c1428c6..0ec11b08a61 100644 --- a/internal/service/datasync/agent_test.go +++ b/internal/service/datasync/agent_test.go @@ -131,11 +131,11 @@ func TestAccDataSyncAgent_tags(t *testing.T) { CheckDestroy: testAccCheckAgentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAgentConfig_tags1(rName, "key1", "value1"), + Config: testAccAgentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAgentExists(ctx, resourceName, &agent1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -145,22 +145,22 @@ func TestAccDataSyncAgent_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"activation_key", names.AttrIPAddress}, }, { - Config: testAccAgentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAgentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAgentExists(ctx, resourceName, &agent2), testAccCheckAgentNotRecreated(&agent1, &agent2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAgentConfig_tags1(rName, "key1", "value1"), + Config: testAccAgentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAgentExists(ctx, resourceName, &agent3), testAccCheckAgentNotRecreated(&agent2, &agent3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_azure_blob_test.go b/internal/service/datasync/location_azure_blob_test.go index 04e0c078940..2524ae73bee 100644 --- a/internal/service/datasync/location_azure_blob_test.go +++ b/internal/service/datasync/location_azure_blob_test.go @@ -96,11 +96,11 @@ func TestAccDataSyncLocationAzureBlob_tags(t *testing.T) { CheckDestroy: testAccCheckLocationAzureBlobDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationAzureBlobConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationAzureBlobConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationAzureBlobExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -110,20 +110,20 @@ func TestAccDataSyncLocationAzureBlob_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"sas_configuration"}, }, { - Config: testAccLocationAzureBlobConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationAzureBlobConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationAzureBlobExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationAzureBlobConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationAzureBlobConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationAzureBlobExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_efs_test.go b/internal/service/datasync/location_efs_test.go index 8a2ed7de1f0..b57f024b9d4 100644 --- a/internal/service/datasync/location_efs_test.go +++ b/internal/service/datasync/location_efs_test.go @@ -152,11 +152,11 @@ func TestAccDataSyncLocationEFS_tags(t *testing.T) { CheckDestroy: testAccCheckLocationEFSDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationEFSConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationEFSConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationEFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -165,20 +165,20 @@ func TestAccDataSyncLocationEFS_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLocationEFSConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationEFSConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationEFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationEFSConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationEFSConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationEFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_fsx_lustre_file_system_test.go b/internal/service/datasync/location_fsx_lustre_file_system_test.go index 16c5c7d0ec8..e83bc32679d 100644 --- a/internal/service/datasync/location_fsx_lustre_file_system_test.go +++ b/internal/service/datasync/location_fsx_lustre_file_system_test.go @@ -138,11 +138,11 @@ func TestAccDataSyncLocationFSxLustreFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckLocationFSxLustreDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationFSxLustreFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationFSxLustreFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxLustreExists(ctx, resourceName, &locationFsxLustre1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -152,20 +152,20 @@ func TestAccDataSyncLocationFSxLustreFileSystem_tags(t *testing.T) { ImportStateIdFunc: testAccLocationFSxLustreImportStateID(resourceName), }, { - Config: testAccLocationFSxLustreFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationFSxLustreFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxLustreExists(ctx, resourceName, &locationFsxLustre1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationFSxLustreFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationFSxLustreFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxLustreExists(ctx, resourceName, &locationFsxLustre1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_fsx_ontap_file_system_test.go b/internal/service/datasync/location_fsx_ontap_file_system_test.go index 0dee24892f1..1e737799283 100644 --- a/internal/service/datasync/location_fsx_ontap_file_system_test.go +++ b/internal/service/datasync/location_fsx_ontap_file_system_test.go @@ -189,11 +189,11 @@ func TestAccDataSyncLocationFSxONTAPFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckLocationFSxONTAPDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationFSxONTAPFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationFSxONTAPFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxONTAPExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -203,20 +203,20 @@ func TestAccDataSyncLocationFSxONTAPFileSystem_tags(t *testing.T) { ImportStateIdFunc: testAccLocationFSxONTAPImportStateID(resourceName), }, { - Config: testAccLocationFSxONTAPFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationFSxONTAPFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxONTAPExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationFSxONTAPFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationFSxONTAPFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxONTAPExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_fsx_openzfs_file_system_test.go b/internal/service/datasync/location_fsx_openzfs_file_system_test.go index 5353a320953..517bc066675 100644 --- a/internal/service/datasync/location_fsx_openzfs_file_system_test.go +++ b/internal/service/datasync/location_fsx_openzfs_file_system_test.go @@ -138,11 +138,11 @@ func TestAccDataSyncLocationFSxOpenZFSFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckLocationFSxOpenZFSDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationFSxOpenZFSFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationFSxOpenZFSFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxOpenZFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -152,20 +152,20 @@ func TestAccDataSyncLocationFSxOpenZFSFileSystem_tags(t *testing.T) { ImportStateIdFunc: testAccLocationFSxOpenZFSImportStateID(resourceName), }, { - Config: testAccLocationFSxOpenZFSFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationFSxOpenZFSFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxOpenZFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationFSxOpenZFSFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationFSxOpenZFSFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxOpenZFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_fsx_windows_file_system_test.go b/internal/service/datasync/location_fsx_windows_file_system_test.go index 4ca0541d052..a2b31dfbf86 100644 --- a/internal/service/datasync/location_fsx_windows_file_system_test.go +++ b/internal/service/datasync/location_fsx_windows_file_system_test.go @@ -144,11 +144,11 @@ func TestAccDataSyncLocationFSxWindowsFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckLocationFSxWindowsDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationFSxWindowsFileSystemConfig_tags1(rName, domainName, "key1", "value1"), + Config: testAccLocationFSxWindowsFileSystemConfig_tags1(rName, domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxWindowsExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -159,20 +159,20 @@ func TestAccDataSyncLocationFSxWindowsFileSystem_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPassword}, }, { - Config: testAccLocationFSxWindowsFileSystemConfig_tags2(rName, domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationFSxWindowsFileSystemConfig_tags2(rName, domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxWindowsExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationFSxWindowsFileSystemConfig_tags1(rName, domainName, "key1", "value1"), + Config: testAccLocationFSxWindowsFileSystemConfig_tags1(rName, domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationFSxWindowsExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_hdfs_test.go b/internal/service/datasync/location_hdfs_test.go index 0a9ae754ecf..33b04efe3be 100644 --- a/internal/service/datasync/location_hdfs_test.go +++ b/internal/service/datasync/location_hdfs_test.go @@ -104,11 +104,11 @@ func TestAccDataSyncLocationHDFS_tags(t *testing.T) { CheckDestroy: testAccCheckLocationHDFSDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationHDFSConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationHDFSConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationHDFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,20 +117,20 @@ func TestAccDataSyncLocationHDFS_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLocationHDFSConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationHDFSConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationHDFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationHDFSConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationHDFSConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationHDFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_nfs_test.go b/internal/service/datasync/location_nfs_test.go index 33b21b6e6da..336694edfe0 100644 --- a/internal/service/datasync/location_nfs_test.go +++ b/internal/service/datasync/location_nfs_test.go @@ -192,11 +192,11 @@ func TestAccDataSyncLocationNFS_tags(t *testing.T) { CheckDestroy: testAccCheckLocationNFSDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationNFSConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationNFSConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationNFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -205,20 +205,20 @@ func TestAccDataSyncLocationNFS_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLocationNFSConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationNFSConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationNFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationNFSConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationNFSConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationNFSExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_object_storage_test.go b/internal/service/datasync/location_object_storage_test.go index a4e3bcc30c7..00d4a13b170 100644 --- a/internal/service/datasync/location_object_storage_test.go +++ b/internal/service/datasync/location_object_storage_test.go @@ -170,11 +170,11 @@ func TestAccDataSyncLocationObjectStorage_tags(t *testing.T) { CheckDestroy: testAccCheckLocationObjectStorageDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationObjectStorageConfig_tags1(rName, domain, "key1", "value1"), + Config: testAccLocationObjectStorageConfig_tags1(rName, domain, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationObjectStorageExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -183,20 +183,20 @@ func TestAccDataSyncLocationObjectStorage_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLocationObjectStorageConfig_tags2(rName, domain, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationObjectStorageConfig_tags2(rName, domain, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationObjectStorageExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationObjectStorageConfig_tags1(rName, domain, "key1", "value1"), + Config: testAccLocationObjectStorageConfig_tags1(rName, domain, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationObjectStorageExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_s3_test.go b/internal/service/datasync/location_s3_test.go index 5ddb764c42a..3ab4fe2937c 100644 --- a/internal/service/datasync/location_s3_test.go +++ b/internal/service/datasync/location_s3_test.go @@ -131,11 +131,11 @@ func TestAccDataSyncLocationS3_tags(t *testing.T) { CheckDestroy: testAccCheckLocationS3Destroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationS3Config_tags1(rName, "key1", "value1"), + Config: testAccLocationS3Config_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationS3Exists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -144,20 +144,20 @@ func TestAccDataSyncLocationS3_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLocationS3Config_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationS3Config_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationS3Exists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationS3Config_tags1(rName, "key1", "value1"), + Config: testAccLocationS3Config_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationS3Exists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/location_smb_test.go b/internal/service/datasync/location_smb_test.go index a566365c98c..7a2084fcc7a 100644 --- a/internal/service/datasync/location_smb_test.go +++ b/internal/service/datasync/location_smb_test.go @@ -105,11 +105,11 @@ func TestAccDataSyncLocationSMB_tags(t *testing.T) { CheckDestroy: testAccCheckLocationSMBDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLocationSMBConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationSMBConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationSMBExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -119,20 +119,20 @@ func TestAccDataSyncLocationSMB_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPassword}, }, { - Config: testAccLocationSMBConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLocationSMBConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocationSMBExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLocationSMBConfig_tags1(rName, "key1", "value1"), + Config: testAccLocationSMBConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocationSMBExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/datasync/task_test.go b/internal/service/datasync/task_test.go index db4c8eea2b9..b48291dfd2b 100644 --- a/internal/service/datasync/task_test.go +++ b/internal/service/datasync/task_test.go @@ -860,11 +860,11 @@ func TestAccDataSyncTask_tags(t *testing.T) { CheckDestroy: testAccCheckTaskDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTaskConfig_tags1(rName, "key1", "value1"), + Config: testAccTaskConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTaskExists(ctx, resourceName, &task1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -873,22 +873,22 @@ func TestAccDataSyncTask_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTaskConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTaskConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTaskExists(ctx, resourceName, &task2), testAccCheckTaskNotRecreated(&task1, &task2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTaskConfig_tags1(rName, "key1", "value1"), + Config: testAccTaskConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTaskExists(ctx, resourceName, &task3), testAccCheckTaskNotRecreated(&task2, &task3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, From caf5edb56418c27c03314b229f84d3f76e2f4c8f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:36 -0400 Subject: [PATCH 056/180] datazone: Use constants for test strings --- internal/service/datazone/domain_test.go | 12 ++++++------ .../environment_blueprint_configuration_test.go | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/service/datazone/domain_test.go b/internal/service/datazone/domain_test.go index 41e1f7b27c0..02fa781f19a 100644 --- a/internal/service/datazone/domain_test.go +++ b/internal/service/datazone/domain_test.go @@ -205,11 +205,11 @@ func TestAccDataZoneDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags(rName, "key1", "value1"), + Config: testAccDomainConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -218,20 +218,20 @@ func TestAccDataZoneDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags(rName, "key2", "value2"), + Config: testAccDomainConfig_tags(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/datazone/environment_blueprint_configuration_test.go b/internal/service/datazone/environment_blueprint_configuration_test.go index 6357258a797..39f961430be 100644 --- a/internal/service/datazone/environment_blueprint_configuration_test.go +++ b/internal/service/datazone/environment_blueprint_configuration_test.go @@ -243,13 +243,13 @@ func TestAccDataZoneEnvironmentBlueprintConfiguration_regional_parameters(t *tes CheckDestroy: testAccCheckEnvironmentBlueprintConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEnvironmentBlueprintConfigurationConfig_regional_parameters(domainName, names.USWest2RegionID, "key1", "value1"), + Config: testAccEnvironmentBlueprintConfigurationConfig_regional_parameters(domainName, names.USWest2RegionID, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentBlueprintConfigurationExists(ctx, resourceName, &environmentblueprintconfiguration), resource.TestCheckResourceAttrSet(resourceName, "environment_blueprint_id"), resource.TestCheckResourceAttr(resourceName, "regional_parameters.%", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, fmt.Sprintf("regional_parameters.%s.%%", names.USWest2RegionID), acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, fmt.Sprintf("regional_parameters.%s.key1", names.USWest2RegionID), "value1"), + resource.TestCheckResourceAttr(resourceName, fmt.Sprintf("regional_parameters.%s.key1", names.USWest2RegionID), acctest.CtValue1), ), }, { @@ -260,13 +260,13 @@ func TestAccDataZoneEnvironmentBlueprintConfiguration_regional_parameters(t *tes ImportStateVerifyIdentifierAttribute: "environment_blueprint_id", }, { - Config: testAccEnvironmentBlueprintConfigurationConfig_regional_parameters(domainName, names.USWest2RegionID, "key2", "value2"), + Config: testAccEnvironmentBlueprintConfigurationConfig_regional_parameters(domainName, names.USWest2RegionID, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentBlueprintConfigurationExists(ctx, resourceName, &environmentblueprintconfiguration), resource.TestCheckResourceAttrSet(resourceName, "environment_blueprint_id"), resource.TestCheckResourceAttr(resourceName, "regional_parameters.%", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, fmt.Sprintf("regional_parameters.%s.%%", names.USWest2RegionID), acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, fmt.Sprintf("regional_parameters.%s.key2", names.USWest2RegionID), "value2"), + resource.TestCheckResourceAttr(resourceName, fmt.Sprintf("regional_parameters.%s.key2", names.USWest2RegionID), acctest.CtValue2), ), }, }, From 96368ea504d519ae2cfb10768b359ba058cbe6e2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:37 -0400 Subject: [PATCH 057/180] deploy: Use constants for test strings --- internal/service/deploy/app_test.go | 12 ++++++------ internal/service/deploy/deployment_group_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/deploy/app_test.go b/internal/service/deploy/app_test.go index c3199488970..64543c7be0b 100644 --- a/internal/service/deploy/app_test.go +++ b/internal/service/deploy/app_test.go @@ -198,11 +198,11 @@ func TestAccDeployApp_tags(t *testing.T) { CheckDestroy: testAccCheckAppDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAppConfig_tags1(rName, "key1", "value1"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -211,20 +211,20 @@ func TestAccDeployApp_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAppConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAppConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAppConfig_tags1(rName, "key2", "value2"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/deploy/deployment_group_test.go b/internal/service/deploy/deployment_group_test.go index 704e3f681aa..1f03ccf7066 100644 --- a/internal/service/deploy/deployment_group_test.go +++ b/internal/service/deploy/deployment_group_test.go @@ -243,11 +243,11 @@ func TestAccDeployDeploymentGroup_tags(t *testing.T) { CheckDestroy: testAccCheckDeploymentGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDeploymentGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccDeploymentGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -257,20 +257,20 @@ func TestAccDeployDeploymentGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDeploymentGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDeploymentGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDeploymentGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccDeploymentGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeploymentGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 39a0c84e6e18490f27015c6341a1a8232fbbf3dc Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:37 -0400 Subject: [PATCH 058/180] detective: Use constants for test strings --- internal/service/detective/graph_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/detective/graph_test.go b/internal/service/detective/graph_test.go index e759f632aa2..d7fb9d67325 100644 --- a/internal/service/detective/graph_test.go +++ b/internal/service/detective/graph_test.go @@ -80,12 +80,12 @@ func testAccGraph_tags(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.DetectiveServiceID), Steps: []resource.TestStep{ { - Config: testAccGraphConfig_tags1("key1", "value1"), + Config: testAccGraphConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGraphExists(ctx, resourceName, &graph), acctest.CheckResourceAttrRFC3339(resourceName, names.AttrCreatedTime), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -94,20 +94,20 @@ func testAccGraph_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGraphConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccGraphConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGraphExists(ctx, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGraphConfig_tags1("key2", "value2"), + Config: testAccGraphConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGraphExists(ctx, resourceName, &graph), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 6f79005d5a23dc02b0998b3038e37d63fadb0324 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:37 -0400 Subject: [PATCH 059/180] devicefarm: Use constants for test strings --- internal/service/devicefarm/device_pool_test.go | 12 ++++++------ internal/service/devicefarm/instance_profile_test.go | 12 ++++++------ internal/service/devicefarm/network_profile_test.go | 12 ++++++------ internal/service/devicefarm/project_test.go | 12 ++++++------ .../service/devicefarm/test_grid_project_test.go | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/internal/service/devicefarm/device_pool_test.go b/internal/service/devicefarm/device_pool_test.go index 46694eba345..deb70caaecc 100644 --- a/internal/service/devicefarm/device_pool_test.go +++ b/internal/service/devicefarm/device_pool_test.go @@ -87,11 +87,11 @@ func TestAccDeviceFarmDevicePool_tags(t *testing.T) { CheckDestroy: testAccCheckDevicePoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDevicePoolConfig_tags1(rName, "key1", "value1"), + Config: testAccDevicePoolConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDevicePoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,20 +100,20 @@ func TestAccDeviceFarmDevicePool_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDevicePoolConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDevicePoolConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDevicePoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDevicePoolConfig_tags1(rName, "key2", "value2"), + Config: testAccDevicePoolConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDevicePoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/devicefarm/instance_profile_test.go b/internal/service/devicefarm/instance_profile_test.go index 240ad0e4d9c..40a29d57a58 100644 --- a/internal/service/devicefarm/instance_profile_test.go +++ b/internal/service/devicefarm/instance_profile_test.go @@ -88,11 +88,11 @@ func TestAccDeviceFarmInstanceProfile_tags(t *testing.T) { CheckDestroy: testAccCheckInstanceProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInstanceProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccInstanceProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &profile), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -101,20 +101,20 @@ func TestAccDeviceFarmInstanceProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccInstanceProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccInstanceProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &profile), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInstanceProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccInstanceProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &profile), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/devicefarm/network_profile_test.go b/internal/service/devicefarm/network_profile_test.go index 3f2d3e8fd3c..4f912e42175 100644 --- a/internal/service/devicefarm/network_profile_test.go +++ b/internal/service/devicefarm/network_profile_test.go @@ -94,11 +94,11 @@ func TestAccDeviceFarmNetworkProfile_tags(t *testing.T) { CheckDestroy: testAccCheckNetworkProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNetworkProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccNetworkProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkProfileExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -107,20 +107,20 @@ func TestAccDeviceFarmNetworkProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNetworkProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNetworkProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkProfileExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNetworkProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccNetworkProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkProfileExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/devicefarm/project_test.go b/internal/service/devicefarm/project_test.go index 1cf7c980ac0..8b4ef3834c1 100644 --- a/internal/service/devicefarm/project_test.go +++ b/internal/service/devicefarm/project_test.go @@ -128,11 +128,11 @@ func TestAccDeviceFarmProject_tags(t *testing.T) { CheckDestroy: testAccCheckProjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProjectConfig_tags1(rName, "key1", "value1"), + Config: testAccProjectConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -141,20 +141,20 @@ func TestAccDeviceFarmProject_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProjectConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProjectConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProjectConfig_tags1(rName, "key2", "value2"), + Config: testAccProjectConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/devicefarm/test_grid_project_test.go b/internal/service/devicefarm/test_grid_project_test.go index b832a72316b..0a164f6c460 100644 --- a/internal/service/devicefarm/test_grid_project_test.go +++ b/internal/service/devicefarm/test_grid_project_test.go @@ -122,11 +122,11 @@ func TestAccDeviceFarmTestGridProject_tags(t *testing.T) { CheckDestroy: testAccCheckProjectTestGridProjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTestGridProjectConfig_projectTags1(rName, "key1", "value1"), + Config: testAccTestGridProjectConfig_projectTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProjectTestGridProjectExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -135,20 +135,20 @@ func TestAccDeviceFarmTestGridProject_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTestGridProjectConfig_projectTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTestGridProjectConfig_projectTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectTestGridProjectExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTestGridProjectConfig_projectTags1(rName, "key2", "value2"), + Config: testAccTestGridProjectConfig_projectTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectTestGridProjectExists(ctx, resourceName, &proj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 1248eb91522533d1f83f36cf636a92bba8c95e09 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:37 -0400 Subject: [PATCH 060/180] directconnect: Use constants for test strings --- internal/service/directconnect/connection_test.go | 12 ++++++------ internal/service/directconnect/lag_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/directconnect/connection_test.go b/internal/service/directconnect/connection_test.go index 52d31e2af5e..e154e9b4623 100644 --- a/internal/service/directconnect/connection_test.go +++ b/internal/service/directconnect/connection_test.go @@ -249,12 +249,12 @@ func TestAccDirectConnectConnection_tags(t *testing.T) { CheckDestroy: testAccCheckConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &connection), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, // Test import. @@ -265,22 +265,22 @@ func TestAccDirectConnectConnection_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"request_macsec", names.AttrSkipDestroy}, }, { - Config: testAccConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &connection), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &connection), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/directconnect/lag_test.go b/internal/service/directconnect/lag_test.go index 05a9f4b9856..22d7f5b01fb 100644 --- a/internal/service/directconnect/lag_test.go +++ b/internal/service/directconnect/lag_test.go @@ -193,12 +193,12 @@ func TestAccDirectConnectLag_tags(t *testing.T) { CheckDestroy: testAccCheckLagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLagConfig_tags1(rName, "key1", "value1"), + Config: testAccLagConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLagExists(ctx, resourceName, &lag), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -208,22 +208,22 @@ func TestAccDirectConnectLag_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrForceDestroy}, }, { - Config: testAccLagConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLagConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLagExists(ctx, resourceName, &lag), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLagConfig_tags1(rName, "key2", "value2"), + Config: testAccLagConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLagExists(ctx, resourceName, &lag), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 891aeb04df28e436d7d7358ad15136d2a231affe Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:37 -0400 Subject: [PATCH 061/180] dlm: Use constants for test strings --- internal/service/dlm/lifecycle_policy_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/dlm/lifecycle_policy_test.go b/internal/service/dlm/lifecycle_policy_test.go index 8d2d26ce899..bb2560c621f 100644 --- a/internal/service/dlm/lifecycle_policy_test.go +++ b/internal/service/dlm/lifecycle_policy_test.go @@ -467,11 +467,11 @@ func TestAccDLMLifecyclePolicy_tags(t *testing.T) { CheckDestroy: testAccCheckLifecyclePolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLifecyclePolicyConfig_tags1(rName, "key1", "value1"), + Config: testAccLifecyclePolicyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( checkLifecyclePolicyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -480,20 +480,20 @@ func TestAccDLMLifecyclePolicy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLifecyclePolicyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLifecyclePolicyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( checkLifecyclePolicyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLifecyclePolicyConfig_tags1(rName, "key2", "value2"), + Config: testAccLifecyclePolicyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( checkLifecyclePolicyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 5ceaca84d39a62bae9c017cb90334588e63f888c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:37 -0400 Subject: [PATCH 062/180] dms: Use constants for test strings --- internal/service/dms/certificate_test.go | 12 +++---- .../service/dms/event_subscription_test.go | 12 +++---- .../service/dms/replication_config_test.go | 12 +++---- .../service/dms/replication_instance_test.go | 12 +++---- .../dms/replication_subnet_group_test.go | 12 +++---- .../service/dms/task_settings_json_test.go | 33 ++++++++++--------- 6 files changed, 47 insertions(+), 46 deletions(-) diff --git a/internal/service/dms/certificate_test.go b/internal/service/dms/certificate_test.go index c8681b7694f..2dd3276ba9e 100644 --- a/internal/service/dms/certificate_test.go +++ b/internal/service/dms/certificate_test.go @@ -107,11 +107,11 @@ func TestAccDMSCertificate_tags(t *testing.T) { CheckDestroy: testAccCheckCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCertificateConfig_tags1(rName, "key1", "value1"), + Config: testAccCertificateConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -120,20 +120,20 @@ func TestAccDMSCertificate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCertificateConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCertificateConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCertificateConfig_tags1(rName, "key2", "value2"), + Config: testAccCertificateConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/dms/event_subscription_test.go b/internal/service/dms/event_subscription_test.go index de7b3a5c25b..ac243f5deaf 100644 --- a/internal/service/dms/event_subscription_test.go +++ b/internal/service/dms/event_subscription_test.go @@ -175,11 +175,11 @@ func TestAccDMSEventSubscription_tags(t *testing.T) { CheckDestroy: testAccCheckEventSubscriptionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEventSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -188,20 +188,20 @@ func TestAccDMSEventSubscription_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEventSubscriptionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEventSubscriptionConfig_tags1(rName, "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/dms/replication_config_test.go b/internal/service/dms/replication_config_test.go index 4a54ae2a376..51703574c39 100644 --- a/internal/service/dms/replication_config_test.go +++ b/internal/service/dms/replication_config_test.go @@ -272,28 +272,28 @@ func TestAccDMSReplicationConfig_tags(t *testing.T) { CheckDestroy: testAccCheckReplicationConfigDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicationConfigConfig_tags1(rName, "key1", "value1"), + Config: testAccReplicationConfigConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationConfigExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccReplicationConfigConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReplicationConfigConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationConfigExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReplicationConfigConfig_tags1(rName, "key2", "value2"), + Config: testAccReplicationConfigConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationConfigExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/dms/replication_instance_test.go b/internal/service/dms/replication_instance_test.go index 0a452be37f5..7125b59fecc 100644 --- a/internal/service/dms/replication_instance_test.go +++ b/internal/service/dms/replication_instance_test.go @@ -450,11 +450,11 @@ func TestAccDMSReplicationInstance_tags(t *testing.T) { CheckDestroy: testAccCheckReplicationInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicationInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccReplicationInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationInstanceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -464,20 +464,20 @@ func TestAccDMSReplicationInstance_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrApplyImmediately}, }, { - Config: testAccReplicationInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReplicationInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationInstanceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReplicationInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccReplicationInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationInstanceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/dms/replication_subnet_group_test.go b/internal/service/dms/replication_subnet_group_test.go index 3306155b771..ff6351aa73d 100644 --- a/internal/service/dms/replication_subnet_group_test.go +++ b/internal/service/dms/replication_subnet_group_test.go @@ -92,11 +92,11 @@ func TestAccDMSReplicationSubnetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckReplicationSubnetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicationSubnetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccReplicationSubnetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationSubnetGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -105,20 +105,20 @@ func TestAccDMSReplicationSubnetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccReplicationSubnetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReplicationSubnetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationSubnetGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReplicationSubnetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccReplicationSubnetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationSubnetGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/dms/task_settings_json_test.go b/internal/service/dms/task_settings_json_test.go index 8aefeb952a5..c73657bae94 100644 --- a/internal/service/dms/task_settings_json_test.go +++ b/internal/service/dms/task_settings_json_test.go @@ -6,6 +6,7 @@ package dms import ( "testing" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -82,8 +83,8 @@ func TestTaskSettingsEqual(t *testing.T) { expected: true, }, "not equal": { - a: "value1", - b: "value2", + a: acctest.CtValue1, + b: acctest.CtValue2, expected: false, }, "both null": { @@ -105,14 +106,14 @@ func TestTaskSettingsEqual(t *testing.T) { "map": { "equal": { a: map[string]any{ - "key1": names.AttrValue, - "key2": map[string]any{ + acctest.CtKey1: names.AttrValue, + acctest.CtKey2: map[string]any{ "key3": names.AttrValue, }, }, b: map[string]any{ - "key1": names.AttrValue, - "key2": map[string]any{ + acctest.CtKey1: names.AttrValue, + acctest.CtKey2: map[string]any{ "key3": names.AttrValue, }, }, @@ -120,29 +121,29 @@ func TestTaskSettingsEqual(t *testing.T) { }, "not equal": { a: map[string]any{ - "key1": names.AttrValue, - "key2": map[string]any{ - "key3": "value1", + acctest.CtKey1: names.AttrValue, + acctest.CtKey2: map[string]any{ + "key3": acctest.CtValue1, }, }, b: map[string]any{ - "key1": names.AttrValue, - "key2": map[string]any{ - "key3": "value2", + acctest.CtKey1: names.AttrValue, + acctest.CtKey2: map[string]any{ + "key3": acctest.CtValue2, }, }, expected: false, }, "proposed null": { a: map[string]any{ - "key1": names.AttrValue, - "key2": map[string]any{ + acctest.CtKey1: names.AttrValue, + acctest.CtKey2: map[string]any{ "key3": names.AttrValue, }, }, b: map[string]any{ - "key1": nil, - "key2": map[string]any{ + acctest.CtKey1: nil, + acctest.CtKey2: map[string]any{ "key3": names.AttrValue, }, }, From bebc53a2e870b740a8b1d0148f7de6e24ba75a13 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:38 -0400 Subject: [PATCH 063/180] docdb: Use constants for test strings --- internal/service/docdb/cluster_instance_test.go | 12 ++++++------ .../service/docdb/cluster_parameter_group_test.go | 12 ++++++------ internal/service/docdb/cluster_test.go | 12 ++++++------ internal/service/docdb/event_subscription_test.go | 12 ++++++------ internal/service/docdb/subnet_group_test.go | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/internal/service/docdb/cluster_instance_test.go b/internal/service/docdb/cluster_instance_test.go index 398b2d40cdc..bc42b84f9ec 100644 --- a/internal/service/docdb/cluster_instance_test.go +++ b/internal/service/docdb/cluster_instance_test.go @@ -187,11 +187,11 @@ func TestAccDocDBClusterInstance_tags(t *testing.T) { CheckDestroy: testAccCheckClusterInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -203,20 +203,20 @@ func TestAccDocDBClusterInstance_tags(t *testing.T) { }, }, { - Config: testAccClusterInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/docdb/cluster_parameter_group_test.go b/internal/service/docdb/cluster_parameter_group_test.go index c5daa126b84..a3e955db4cb 100644 --- a/internal/service/docdb/cluster_parameter_group_test.go +++ b/internal/service/docdb/cluster_parameter_group_test.go @@ -249,11 +249,11 @@ func TestAccDocDBClusterParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckClusterParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterParameterGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterParameterGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -262,20 +262,20 @@ func TestAccDocDBClusterParameterGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterParameterGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterParameterGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterParameterGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterParameterGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/docdb/cluster_test.go b/internal/service/docdb/cluster_test.go index 9ade5b111e9..c35e1532307 100644 --- a/internal/service/docdb/cluster_test.go +++ b/internal/service/docdb/cluster_test.go @@ -208,11 +208,11 @@ func TestAccDocDBCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -228,20 +228,20 @@ func TestAccDocDBCluster_tags(t *testing.T) { }, }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/docdb/event_subscription_test.go b/internal/service/docdb/event_subscription_test.go index 3c276035caa..db567bbfa66 100644 --- a/internal/service/docdb/event_subscription_test.go +++ b/internal/service/docdb/event_subscription_test.go @@ -204,11 +204,11 @@ func TestAccDocDBEventSubscription_tags(t *testing.T) { CheckDestroy: testAccCheckEventSubscriptionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEventSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -217,20 +217,20 @@ func TestAccDocDBEventSubscription_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEventSubscriptionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEventSubscriptionConfig_tags1(rName, "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/docdb/subnet_group_test.go b/internal/service/docdb/subnet_group_test.go index 973c3206582..ed9bed38bfd 100644 --- a/internal/service/docdb/subnet_group_test.go +++ b/internal/service/docdb/subnet_group_test.go @@ -217,11 +217,11 @@ func TestAccDocDBSubnetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckSubnetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSubnetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -230,20 +230,20 @@ func TestAccDocDBSubnetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSubnetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSubnetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 3e0f20aca43f36b600232bfa013d0aefefa14930 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:38 -0400 Subject: [PATCH 064/180] docdbelastic: Use constants for test strings --- internal/service/docdbelastic/cluster_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/docdbelastic/cluster_test.go b/internal/service/docdbelastic/cluster_test.go index 4b67d317181..4994c5c585d 100644 --- a/internal/service/docdbelastic/cluster_test.go +++ b/internal/service/docdbelastic/cluster_test.go @@ -122,28 +122,28 @@ func TestAccDocDBElasticCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From b62e0553380348836c5fa6549cab5d3062052996 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:38 -0400 Subject: [PATCH 065/180] ds: Use constants for test strings --- internal/service/ds/directory_test.go | 12 ++++++------ internal/service/ds/region_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/ds/directory_test.go b/internal/service/ds/directory_test.go index de4285086a5..4dfd011653f 100644 --- a/internal/service/ds/directory_test.go +++ b/internal/service/ds/directory_test.go @@ -118,11 +118,11 @@ func TestAccDSDirectory_tags(t *testing.T) { CheckDestroy: testAccCheckDirectoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDirectoryConfig_tags1(rName, domainName, "key1", "value1"), + Config: testAccDirectoryConfig_tags1(rName, domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDirectoryExists(ctx, resourceName, &ds), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -134,20 +134,20 @@ func TestAccDSDirectory_tags(t *testing.T) { }, }, { - Config: testAccDirectoryConfig_tags2(rName, domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccDirectoryConfig_tags2(rName, domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDirectoryExists(ctx, resourceName, &ds), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDirectoryConfig_tags1(rName, domainName, "key2", "value2"), + Config: testAccDirectoryConfig_tags1(rName, domainName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDirectoryExists(ctx, resourceName, &ds), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ds/region_test.go b/internal/service/ds/region_test.go index 9345626cf38..a4542bf26f8 100644 --- a/internal/service/ds/region_test.go +++ b/internal/service/ds/region_test.go @@ -101,11 +101,11 @@ func TestAccDSRegion_tags(t *testing.T) { CheckDestroy: testAccCheckRegionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRegionConfig_tags1(rName, domainName, "key1", "value1"), + Config: testAccRegionConfig_tags1(rName, domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRegionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -114,20 +114,20 @@ func TestAccDSRegion_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRegionConfig_tags2(rName, domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccRegionConfig_tags2(rName, domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRegionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRegionConfig_tags1(rName, domainName, "key2", "value2"), + Config: testAccRegionConfig_tags1(rName, domainName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRegionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f1a0577052a17928162a73488583eb978cf60c52 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:38 -0400 Subject: [PATCH 066/180] dynamodb: Use constants for test strings --- internal/service/dynamodb/tag_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/service/dynamodb/tag_test.go b/internal/service/dynamodb/tag_test.go index 36923d6ed90..c61223f7e22 100644 --- a/internal/service/dynamodb/tag_test.go +++ b/internal/service/dynamodb/tag_test.go @@ -26,11 +26,11 @@ func TestAccDynamoDBTag_basic(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -54,7 +54,7 @@ func TestAccDynamoDBTag_disappears(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfdynamodb.ResourceTag(), resourceName), @@ -108,11 +108,11 @@ func TestAccDynamoDBTag_value(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -121,10 +121,10 @@ func TestAccDynamoDBTag_value(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTagConfig_basic(rName, "key1", "value1updated"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1updated"), ), }, From 1aa5f4bb485838c3b51af38728888ef0f224d4f1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:38 -0400 Subject: [PATCH 067/180] ec2: Use constants for test strings --- .../service/ec2/ebs_snapshot_copy_test.go | 12 +-- .../service/ec2/ebs_snapshot_import_test.go | 12 +-- internal/service/ec2/ebs_snapshot_test.go | 12 +-- internal/service/ec2/ebs_volume_test.go | 12 +-- internal/service/ec2/ec2_ami_copy_test.go | 12 +-- .../service/ec2/ec2_ami_from_instance_test.go | 12 +-- internal/service/ec2/ec2_ami_test.go | 12 +-- .../ec2/ec2_capacity_reservation_test.go | 12 +-- internal/service/ec2/ec2_eip_test.go | 12 +-- internal/service/ec2/ec2_fleet_test.go | 12 +-- internal/service/ec2/ec2_host_test.go | 12 +-- .../ec2/ec2_instance_connect_endpoint_test.go | 12 +-- internal/service/ec2/ec2_instance_test.go | 12 +-- internal/service/ec2/ec2_key_pair_test.go | 12 +-- .../service/ec2/ec2_launch_template_test.go | 12 +-- .../service/ec2/ec2_placement_group_test.go | 12 +-- .../ec2/ec2_spot_fleet_request_test.go | 12 +-- .../ec2/ec2_spot_instance_request_test.go | 12 +-- internal/service/ec2/ipam_pool_test.go | 12 +-- ...pam_resource_discovery_association_test.go | 12 +-- .../ec2/ipam_resource_discovery_test.go | 12 +-- internal/service/ec2/ipam_scope_test.go | 12 +-- internal/service/ec2/ipam_test.go | 12 +-- ...ateway_route_table_vpc_association_test.go | 12 +-- internal/service/ec2/tag_test.go | 18 ++--- .../ec2/transitgateway_connect_peer_test.go | 12 +-- .../ec2/transitgateway_connect_test.go | 12 +-- .../transitgateway_multicast_domain_test.go | 12 +-- ...ateway_peering_attachment_accepter_test.go | 14 ++-- .../transitgateway_peering_attachment_test.go | 14 ++-- .../ec2/transitgateway_policy_table_test.go | 12 +-- .../ec2/transitgateway_route_table_test.go | 12 +-- internal/service/ec2/transitgateway_test.go | 12 +-- ...sitgateway_vpc_attachment_accepter_test.go | 14 ++-- .../ec2/transitgateway_vpc_attachment_test.go | 12 +-- .../ec2/verifiedaccess_endpoint_test.go | 12 +-- .../service/ec2/verifiedaccess_group_test.go | 14 ++-- .../ec2/verifiedaccess_instance_test.go | 12 +-- .../ec2/verifiedaccess_trust_provider_test.go | 12 +-- .../ec2/vpc_default_network_acl_test.go | 12 +-- .../ec2/vpc_default_route_table_test.go | 12 +-- internal/service/ec2/vpc_dhcp_options_test.go | 12 +-- .../vpc_egress_only_internet_gateway_test.go | 12 +-- .../service/ec2/vpc_endpoint_service_test.go | 12 +-- internal/service/ec2/vpc_endpoint_test.go | 12 +-- internal/service/ec2/vpc_flow_log_test.go | 12 +-- .../service/ec2/vpc_internet_gateway_test.go | 12 +-- .../ec2/vpc_managed_prefix_list_test.go | 12 +-- internal/service/ec2/vpc_nat_gateway_test.go | 12 +-- internal/service/ec2/vpc_network_acl_test.go | 12 +-- .../ec2/vpc_network_insights_analysis_test.go | 12 +-- .../ec2/vpc_network_insights_path_test.go | 12 +-- .../service/ec2/vpc_network_interface_test.go | 12 +-- .../ec2/vpc_peering_connection_test.go | 12 +-- internal/service/ec2/vpc_route_table_test.go | 12 +-- .../vpc_security_group_ingress_rule_test.go | 46 +++++------ .../service/ec2/vpc_security_group_test.go | 12 +-- internal/service/ec2/vpc_subnet_test.go | 46 +++++------ internal/service/ec2/vpc_test.go | 76 +++++++++---------- .../ec2/vpc_traffic_mirror_filter_test.go | 12 +-- .../ec2/vpc_traffic_mirror_session_test.go | 12 +-- .../ec2/vpc_traffic_mirror_target_test.go | 12 +-- .../service/ec2/vpnclient_endpoint_test.go | 12 +-- .../service/ec2/vpnsite_connection_test.go | 12 +-- .../ec2/vpnsite_customer_gateway_test.go | 12 +-- internal/service/ec2/vpnsite_gateway_test.go | 12 +-- .../ec2/wavelength_carrier_gateway_test.go | 12 +-- 67 files changed, 475 insertions(+), 475 deletions(-) diff --git a/internal/service/ec2/ebs_snapshot_copy_test.go b/internal/service/ec2/ebs_snapshot_copy_test.go index 3e8007fa14d..c47af085abe 100644 --- a/internal/service/ec2/ebs_snapshot_copy_test.go +++ b/internal/service/ec2/ebs_snapshot_copy_test.go @@ -77,28 +77,28 @@ func TestAccEC2EBSSnapshotCopy_tags(t *testing.T) { CheckDestroy: testAccCheckEBSSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEBSSnapshotCopyConfig_tags1(rName, "key1", "value1"), + Config: testAccEBSSnapshotCopyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &snapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccEBSSnapshotCopyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEBSSnapshotCopyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &snapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEBSSnapshotCopyConfig_tags1(rName, "key2", "value2"), + Config: testAccEBSSnapshotCopyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &snapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ebs_snapshot_import_test.go b/internal/service/ec2/ebs_snapshot_import_test.go index 3c925e1b16e..538ff80a1ad 100644 --- a/internal/service/ec2/ebs_snapshot_import_test.go +++ b/internal/service/ec2/ebs_snapshot_import_test.go @@ -108,28 +108,28 @@ func TestAccEC2EBSSnapshotImport_tags(t *testing.T) { CheckDestroy: testAccCheckEBSSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEBSSnapshotImportConfig_tags1(t, rName, "key1", "value1"), + Config: testAccEBSSnapshotImportConfig_tags1(t, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccEBSSnapshotImportConfig_tags2(t, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEBSSnapshotImportConfig_tags2(t, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEBSSnapshotImportConfig_tags1(t, rName, "key2", "value2"), + Config: testAccEBSSnapshotImportConfig_tags1(t, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ebs_snapshot_test.go b/internal/service/ec2/ebs_snapshot_test.go index d8bfe26bff5..32113333075 100644 --- a/internal/service/ec2/ebs_snapshot_test.go +++ b/internal/service/ec2/ebs_snapshot_test.go @@ -147,11 +147,11 @@ func TestAccEC2EBSSnapshot_tags(t *testing.T) { CheckDestroy: testAccCheckEBSSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEBSSnapshotConfig_tags1(rName, "key1", "value1"), + Config: testAccEBSSnapshotConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -160,20 +160,20 @@ func TestAccEC2EBSSnapshot_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEBSSnapshotConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEBSSnapshotConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEBSSnapshotConfig_tags1(rName, "key2", "value2"), + Config: testAccEBSSnapshotConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ebs_volume_test.go b/internal/service/ec2/ebs_volume_test.go index aefc78a59d0..271c54841e5 100644 --- a/internal/service/ec2/ebs_volume_test.go +++ b/internal/service/ec2/ebs_volume_test.go @@ -378,11 +378,11 @@ func TestAccEC2EBSVolume_withTags(t *testing.T) { CheckDestroy: testAccCheckVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEBSVolumeConfig_tags1("key1", "value1"), + Config: testAccEBSVolumeConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -392,20 +392,20 @@ func TestAccEC2EBSVolume_withTags(t *testing.T) { ImportStateVerifyIgnore: []string{"final_snapshot"}, }, { - Config: testAccEBSVolumeConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccEBSVolumeConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEBSVolumeConfig_tags1("key2", "value2"), + Config: testAccEBSVolumeConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_ami_copy_test.go b/internal/service/ec2/ec2_ami_copy_test.go index 22162c2d7bb..ac05a66a711 100644 --- a/internal/service/ec2/ec2_ami_copy_test.go +++ b/internal/service/ec2/ec2_ami_copy_test.go @@ -136,31 +136,31 @@ func TestAccEC2AMICopy_tags(t *testing.T) { CheckDestroy: testAccCheckAMIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAMICopyConfig_tags1(rName, "key1", "value1"), + Config: testAccAMICopyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &ami), testAccCheckAMICopyAttributes(&ami, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccAMICopyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAMICopyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &ami), testAccCheckAMICopyAttributes(&ami, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAMICopyConfig_tags1(rName, "key2", "value2"), + Config: testAccAMICopyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &ami), testAccCheckAMICopyAttributes(&ami, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_ami_from_instance_test.go b/internal/service/ec2/ec2_ami_from_instance_test.go index bd9b6d0647e..82fb6a7f186 100644 --- a/internal/service/ec2/ec2_ami_from_instance_test.go +++ b/internal/service/ec2/ec2_ami_from_instance_test.go @@ -59,28 +59,28 @@ func TestAccEC2AMIFromInstance_tags(t *testing.T) { CheckDestroy: testAccCheckAMIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAMIFromInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccAMIFromInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &image), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccAMIFromInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAMIFromInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &image), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAMIFromInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccAMIFromInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &image), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_ami_test.go b/internal/service/ec2/ec2_ami_test.go index 00e19eb24b8..42c9c328c81 100644 --- a/internal/service/ec2/ec2_ami_test.go +++ b/internal/service/ec2/ec2_ami_test.go @@ -363,11 +363,11 @@ func TestAccEC2AMI_tags(t *testing.T) { CheckDestroy: testAccCheckAMIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAMIConfig_tags1(rName, "key1", "value1"), + Config: testAccAMIConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &ami), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -379,20 +379,20 @@ func TestAccEC2AMI_tags(t *testing.T) { }, }, { - Config: testAccAMIConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAMIConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &ami), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAMIConfig_tags1(rName, "key2", "value2"), + Config: testAccAMIConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAMIExists(ctx, resourceName, &ami), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_capacity_reservation_test.go b/internal/service/ec2/ec2_capacity_reservation_test.go index 58db92af613..b7a743ae25a 100644 --- a/internal/service/ec2/ec2_capacity_reservation_test.go +++ b/internal/service/ec2/ec2_capacity_reservation_test.go @@ -336,11 +336,11 @@ func TestAccEC2CapacityReservation_tags(t *testing.T) { CheckDestroy: testAccCheckCapacityReservationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCapacityReservationConfig_tags1("key1", "value1"), + Config: testAccCapacityReservationConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCapacityReservationExists(ctx, resourceName, &cr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -349,20 +349,20 @@ func TestAccEC2CapacityReservation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCapacityReservationConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccCapacityReservationConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCapacityReservationExists(ctx, resourceName, &cr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCapacityReservationConfig_tags1("key2", "value2"), + Config: testAccCapacityReservationConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCapacityReservationExists(ctx, resourceName, &cr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_eip_test.go b/internal/service/ec2/ec2_eip_test.go index e8b299d8ec1..2a18403874a 100644 --- a/internal/service/ec2/ec2_eip_test.go +++ b/internal/service/ec2/ec2_eip_test.go @@ -150,11 +150,11 @@ func TestAccEC2EIP_tags(t *testing.T) { CheckDestroy: testAccCheckEIPDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEIPConfig_tags1("key1", "value1"), + Config: testAccEIPConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEIPExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -163,20 +163,20 @@ func TestAccEC2EIP_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEIPConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccEIPConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEIPExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEIPConfig_tags1("key2", "value2"), + Config: testAccEIPConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEIPExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_fleet_test.go b/internal/service/ec2/ec2_fleet_test.go index 739938920ba..4cb4c67f4fc 100644 --- a/internal/service/ec2/ec2_fleet_test.go +++ b/internal/service/ec2/ec2_fleet_test.go @@ -114,11 +114,11 @@ func TestAccEC2Fleet_tags(t *testing.T) { CheckDestroy: testAccCheckFleetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFleetConfig_tags1(rName, "key1", "value1"), + Config: testAccFleetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFleetExists(ctx, resourceName, &fleet1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -128,20 +128,20 @@ func TestAccEC2Fleet_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"terminate_instances"}, }, { - Config: testAccFleetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFleetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFleetExists(ctx, resourceName, &fleet2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFleetConfig_tags1(rName, "key2", "value2"), + Config: testAccFleetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFleetExists(ctx, resourceName, &fleet1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_host_test.go b/internal/service/ec2/ec2_host_test.go index c032ffd159d..73df3f23fdf 100644 --- a/internal/service/ec2/ec2_host_test.go +++ b/internal/service/ec2/ec2_host_test.go @@ -138,11 +138,11 @@ func TestAccEC2Host_tags(t *testing.T) { CheckDestroy: testAccCheckHostDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHostConfig_tags1("key1", "value1"), + Config: testAccHostConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckHostExists(ctx, resourceName, &host), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -151,20 +151,20 @@ func TestAccEC2Host_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccHostConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccHostConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHostExists(ctx, resourceName, &host), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccHostConfig_tags1("key2", "value2"), + Config: testAccHostConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHostExists(ctx, resourceName, &host), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_instance_connect_endpoint_test.go b/internal/service/ec2/ec2_instance_connect_endpoint_test.go index 58286642d30..6023dbea3f3 100644 --- a/internal/service/ec2/ec2_instance_connect_endpoint_test.go +++ b/internal/service/ec2/ec2_instance_connect_endpoint_test.go @@ -93,11 +93,11 @@ func TestAccEC2InstanceConnectEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckInstanceConnectEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInstanceConnectEndpointConfig_tags1(rName, "key1", "value1"), + Config: testAccInstanceConnectEndpointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceConnectEndpointExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccEC2InstanceConnectEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccInstanceConnectEndpointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccInstanceConnectEndpointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceConnectEndpointExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInstanceConnectEndpointConfig_tags1(rName, "key2", "value2"), + Config: testAccInstanceConnectEndpointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceConnectEndpointExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_instance_test.go b/internal/service/ec2/ec2_instance_test.go index dfaef619676..007dc9b631f 100644 --- a/internal/service/ec2/ec2_instance_test.go +++ b/internal/service/ec2/ec2_instance_test.go @@ -263,11 +263,11 @@ func TestAccEC2Instance_tags(t *testing.T) { CheckDestroy: testAccCheckInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInstanceConfig_tags1("key1", "value1"), + Config: testAccInstanceConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -277,20 +277,20 @@ func TestAccEC2Instance_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"user_data_replace_on_change"}, }, { - Config: testAccInstanceConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccInstanceConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInstanceConfig_tags1("key2", "value2"), + Config: testAccInstanceConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_key_pair_test.go b/internal/service/ec2/ec2_key_pair_test.go index 684e041d58b..a49db108b83 100644 --- a/internal/service/ec2/ec2_key_pair_test.go +++ b/internal/service/ec2/ec2_key_pair_test.go @@ -76,11 +76,11 @@ func TestAccEC2KeyPair_tags(t *testing.T) { CheckDestroy: testAccCheckKeyPairDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKeyPairConfig_tags1(rName, publicKey, "key1", "value1"), + Config: testAccKeyPairConfig_tags1(rName, publicKey, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckKeyPairExists(ctx, resourceName, &keyPair), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -90,20 +90,20 @@ func TestAccEC2KeyPair_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPublicKey}, }, { - Config: testAccKeyPairConfig_tags2(rName, publicKey, "key1", "value1updated", "key2", "value2"), + Config: testAccKeyPairConfig_tags2(rName, publicKey, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckKeyPairExists(ctx, resourceName, &keyPair), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKeyPairConfig_tags1(rName, publicKey, "key2", "value2"), + Config: testAccKeyPairConfig_tags1(rName, publicKey, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckKeyPairExists(ctx, resourceName, &keyPair), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_launch_template_test.go b/internal/service/ec2/ec2_launch_template_test.go index ca2b2235893..fbfafcb575c 100644 --- a/internal/service/ec2/ec2_launch_template_test.go +++ b/internal/service/ec2/ec2_launch_template_test.go @@ -566,11 +566,11 @@ func TestAccEC2LaunchTemplate_tags(t *testing.T) { CheckDestroy: testAccCheckLaunchTemplateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLaunchTemplateConfig_tags1(rName, "key1", "value1"), + Config: testAccLaunchTemplateConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLaunchTemplateExists(ctx, resourceName, &template), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -579,20 +579,20 @@ func TestAccEC2LaunchTemplate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLaunchTemplateConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLaunchTemplateConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLaunchTemplateExists(ctx, resourceName, &template), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLaunchTemplateConfig_tags1(rName, "key2", "value2"), + Config: testAccLaunchTemplateConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLaunchTemplateExists(ctx, resourceName, &template), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_placement_group_test.go b/internal/service/ec2/ec2_placement_group_test.go index 70cda5cac81..961b80633ef 100644 --- a/internal/service/ec2/ec2_placement_group_test.go +++ b/internal/service/ec2/ec2_placement_group_test.go @@ -87,11 +87,11 @@ func TestAccEC2PlacementGroup_tags(t *testing.T) { CheckDestroy: testAccCheckPlacementGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPlacementGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccPlacementGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPlacementGroupExists(ctx, resourceName, &pg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,20 +100,20 @@ func TestAccEC2PlacementGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPlacementGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPlacementGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPlacementGroupExists(ctx, resourceName, &pg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPlacementGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccPlacementGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPlacementGroupExists(ctx, resourceName, &pg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2")), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2)), }, }, }) diff --git a/internal/service/ec2/ec2_spot_fleet_request_test.go b/internal/service/ec2/ec2_spot_fleet_request_test.go index f6fd997f832..26a0e038775 100644 --- a/internal/service/ec2/ec2_spot_fleet_request_test.go +++ b/internal/service/ec2/ec2_spot_fleet_request_test.go @@ -183,11 +183,11 @@ func TestAccEC2SpotFleetRequest_tags(t *testing.T) { CheckDestroy: testAccCheckSpotFleetRequestDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSpotFleetRequestConfig_tags1(rName, publicKey, validUntil, "key1", "value1"), + Config: testAccSpotFleetRequestConfig_tags1(rName, publicKey, validUntil, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSpotFleetRequestExists(ctx, resourceName, &sfr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -197,20 +197,20 @@ func TestAccEC2SpotFleetRequest_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, }, { - Config: testAccSpotFleetRequestConfig_tags2(rName, publicKey, validUntil, "key1", "value1updated", "key2", "value2"), + Config: testAccSpotFleetRequestConfig_tags2(rName, publicKey, validUntil, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSpotFleetRequestExists(ctx, resourceName, &sfr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSpotFleetRequestConfig_tags1(rName, publicKey, validUntil, "key2", "value2"), + Config: testAccSpotFleetRequestConfig_tags1(rName, publicKey, validUntil, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSpotFleetRequestExists(ctx, resourceName, &sfr), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ec2_spot_instance_request_test.go b/internal/service/ec2/ec2_spot_instance_request_test.go index b8261f47ed9..e26a5b6802a 100644 --- a/internal/service/ec2/ec2_spot_instance_request_test.go +++ b/internal/service/ec2/ec2_spot_instance_request_test.go @@ -91,11 +91,11 @@ func TestAccEC2SpotInstanceRequest_tags(t *testing.T) { CheckDestroy: testAccCheckSpotInstanceRequestDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSpotInstanceRequestConfig_tags1(rName, "key1", "value1"), + Config: testAccSpotInstanceRequestConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSpotInstanceRequestExists(ctx, resourceName, &sir1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -105,22 +105,22 @@ func TestAccEC2SpotInstanceRequest_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"user_data_replace_on_change", "wait_for_fulfillment"}, }, { - Config: testAccSpotInstanceRequestConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSpotInstanceRequestConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSpotInstanceRequestExists(ctx, resourceName, &sir2), testAccCheckSpotInstanceRequestIDsEqual(&sir2, &sir1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSpotInstanceRequestConfig_tags1(rName, "key2", "value2"), + Config: testAccSpotInstanceRequestConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSpotInstanceRequestExists(ctx, resourceName, &sir3), testAccCheckSpotInstanceRequestIDsEqual(&sir3, &sir2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ipam_pool_test.go b/internal/service/ec2/ipam_pool_test.go index a9edb1f95a6..244572f2202 100644 --- a/internal/service/ec2/ipam_pool_test.go +++ b/internal/service/ec2/ipam_pool_test.go @@ -200,11 +200,11 @@ func TestAccIPAMPool_tags(t *testing.T) { CheckDestroy: testAccCheckIPAMPoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPAMPoolConfig_tags("key1", "value1"), + Config: testAccIPAMPoolConfig_tags(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMPoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -213,20 +213,20 @@ func TestAccIPAMPool_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPAMPoolConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccIPAMPoolConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMPoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPAMPoolConfig_tags("key2", "value2"), + Config: testAccIPAMPoolConfig_tags(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMPoolExists(ctx, resourceName, &pool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ipam_resource_discovery_association_test.go b/internal/service/ec2/ipam_resource_discovery_association_test.go index de14f167f93..087559f5a48 100644 --- a/internal/service/ec2/ipam_resource_discovery_association_test.go +++ b/internal/service/ec2/ipam_resource_discovery_association_test.go @@ -64,11 +64,11 @@ func testAccIPAMResourceDiscoveryAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckIPAMResourceDiscoveryAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPAMResourceDiscoveryAssociationConfig_tags("key2", "value2"), + Config: testAccIPAMResourceDiscoveryAssociationConfig_tags(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMResourceDiscoveryAssociationExists(ctx, resourceName, &rda), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -77,18 +77,18 @@ func testAccIPAMResourceDiscoveryAssociation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPAMResourceDiscoveryAssociationConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccIPAMResourceDiscoveryAssociationConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPAMResourceDiscoveryAssociationConfig_tags("key2", "value2"), + Config: testAccIPAMResourceDiscoveryAssociationConfig_tags(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ipam_resource_discovery_test.go b/internal/service/ec2/ipam_resource_discovery_test.go index 3de5f2c4d24..70cec9414c1 100644 --- a/internal/service/ec2/ipam_resource_discovery_test.go +++ b/internal/service/ec2/ipam_resource_discovery_test.go @@ -156,11 +156,11 @@ func testAccIPAMResourceDiscovery_tags(t *testing.T) { CheckDestroy: testAccCheckIPAMResourceDiscoveryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPAMResourceDiscoveryConfig_tags("key1", "value1"), + Config: testAccIPAMResourceDiscoveryConfig_tags(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMResourceDiscoveryExists(ctx, resourceName, &rd), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -169,18 +169,18 @@ func testAccIPAMResourceDiscovery_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPAMResourceDiscoveryConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccIPAMResourceDiscoveryConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPAMResourceDiscoveryConfig_tags("key2", "value2"), + Config: testAccIPAMResourceDiscoveryConfig_tags(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ipam_scope_test.go b/internal/service/ec2/ipam_scope_test.go index c1c7d5f5e7a..33ac05e42ac 100644 --- a/internal/service/ec2/ipam_scope_test.go +++ b/internal/service/ec2/ipam_scope_test.go @@ -93,11 +93,11 @@ func TestAccIPAMScope_tags(t *testing.T) { CheckDestroy: testAccCheckIPAMScopeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPAMScopeConfig_tags("key1", "value1"), + Config: testAccIPAMScopeConfig_tags(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMScopeExists(ctx, resourceName, &scope), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccIPAMScope_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPAMScopeConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccIPAMScopeConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMScopeExists(ctx, resourceName, &scope), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPAMScopeConfig_tags("key2", "value2"), + Config: testAccIPAMScopeConfig_tags(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMScopeExists(ctx, resourceName, &scope), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/ipam_test.go b/internal/service/ec2/ipam_test.go index 68e7c8b1aa4..8b3c56dd224 100644 --- a/internal/service/ec2/ipam_test.go +++ b/internal/service/ec2/ipam_test.go @@ -228,11 +228,11 @@ func TestAccIPAM_tags(t *testing.T) { CheckDestroy: testAccCheckIPAMDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPAMConfig_tags("key1", "value1"), + Config: testAccIPAMConfig_tags(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMExists(ctx, resourceName, &ipam), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -241,20 +241,20 @@ func TestAccIPAM_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPAMConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccIPAMConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMExists(ctx, resourceName, &ipam), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPAMConfig_tags("key2", "value2"), + Config: testAccIPAMConfig_tags(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPAMExists(ctx, resourceName, &ipam), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/outposts_local_gateway_route_table_vpc_association_test.go b/internal/service/ec2/outposts_local_gateway_route_table_vpc_association_test.go index b9306a7ebca..8c5e1645024 100644 --- a/internal/service/ec2/outposts_local_gateway_route_table_vpc_association_test.go +++ b/internal/service/ec2/outposts_local_gateway_route_table_vpc_association_test.go @@ -86,11 +86,11 @@ func TestAccEC2OutpostsLocalGatewayRouteTableVPCAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckLocalGatewayRouteTableVPCAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOutpostsLocalGatewayRouteTableVPCAssociationConfig_tags1(rName, "key1", "value1"), + Config: testAccOutpostsLocalGatewayRouteTableVPCAssociationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLocalGatewayRouteTableVPCAssociationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -99,20 +99,20 @@ func TestAccEC2OutpostsLocalGatewayRouteTableVPCAssociation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOutpostsLocalGatewayRouteTableVPCAssociationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOutpostsLocalGatewayRouteTableVPCAssociationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocalGatewayRouteTableVPCAssociationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOutpostsLocalGatewayRouteTableVPCAssociationConfig_tags1(rName, "key2", "value2"), + Config: testAccOutpostsLocalGatewayRouteTableVPCAssociationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLocalGatewayRouteTableVPCAssociationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/tag_test.go b/internal/service/ec2/tag_test.go index 676d2a89be4..5ad461967b5 100644 --- a/internal/service/ec2/tag_test.go +++ b/internal/service/ec2/tag_test.go @@ -27,11 +27,11 @@ func TestAccEC2Tag_basic(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, rBgpAsn, "key1", "value1"), + Config: testAccTagConfig_basic(rName, rBgpAsn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -56,7 +56,7 @@ func TestAccEC2Tag_disappears(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, rBgpAsn, "key1", "value1"), + Config: testAccTagConfig_basic(rName, rBgpAsn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfec2.ResourceTag(), resourceName), @@ -80,11 +80,11 @@ func TestAccEC2Tag_value(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, rBgpAsn, "key1", "value1"), + Config: testAccTagConfig_basic(rName, rBgpAsn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -93,10 +93,10 @@ func TestAccEC2Tag_value(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTagConfig_basic(rName, rBgpAsn, "key1", "value1updated"), + Config: testAccTagConfig_basic(rName, rBgpAsn, acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1updated"), ), }, diff --git a/internal/service/ec2/transitgateway_connect_peer_test.go b/internal/service/ec2/transitgateway_connect_peer_test.go index 53e7a148397..d2656aeba9d 100644 --- a/internal/service/ec2/transitgateway_connect_peer_test.go +++ b/internal/service/ec2/transitgateway_connect_peer_test.go @@ -166,11 +166,11 @@ func testAccTransitGatewayConnectPeer_tags(t *testing.T, semaphore tfsync.Semaph CheckDestroy: testAccCheckTransitGatewayConnectPeerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayConnectPeerConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayConnectPeerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayConnectPeerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -179,20 +179,20 @@ func testAccTransitGatewayConnectPeer_tags(t *testing.T, semaphore tfsync.Semaph ImportStateVerify: true, }, { - Config: testAccTransitGatewayConnectPeerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayConnectPeerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayConnectPeerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayConnectPeerConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayConnectPeerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayConnectPeerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_connect_test.go b/internal/service/ec2/transitgateway_connect_test.go index 0ee8e3925df..3f42bda98b1 100644 --- a/internal/service/ec2/transitgateway_connect_test.go +++ b/internal/service/ec2/transitgateway_connect_test.go @@ -106,11 +106,11 @@ func testAccTransitGatewayConnect_tags(t *testing.T, semaphore tfsync.Semaphore) CheckDestroy: testAccCheckTransitGatewayConnectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayConnectConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayConnectConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayConnectExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -119,20 +119,20 @@ func testAccTransitGatewayConnect_tags(t *testing.T, semaphore tfsync.Semaphore) ImportStateVerify: true, }, { - Config: testAccTransitGatewayConnectConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayConnectConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayConnectExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayConnectConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayConnectConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayConnectExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_multicast_domain_test.go b/internal/service/ec2/transitgateway_multicast_domain_test.go index bf787900d88..4c9cf0de042 100644 --- a/internal/service/ec2/transitgateway_multicast_domain_test.go +++ b/internal/service/ec2/transitgateway_multicast_domain_test.go @@ -104,11 +104,11 @@ func testAccTransitGatewayMulticastDomain_tags(t *testing.T, semaphore tfsync.Se CheckDestroy: testAccCheckTransitGatewayMulticastDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayMulticastDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayMulticastDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayMulticastDomainExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,18 +117,18 @@ func testAccTransitGatewayMulticastDomain_tags(t *testing.T, semaphore tfsync.Se ImportStateVerify: true, }, { - Config: testAccTransitGatewayMulticastDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayMulticastDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayMulticastDomainConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayMulticastDomainConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_peering_attachment_accepter_test.go b/internal/service/ec2/transitgateway_peering_attachment_accepter_test.go index 8671051a0bf..fdc22a21786 100644 --- a/internal/service/ec2/transitgateway_peering_attachment_accepter_test.go +++ b/internal/service/ec2/transitgateway_peering_attachment_accepter_test.go @@ -75,34 +75,34 @@ func testAccTransitGatewayPeeringAttachmentAccepter_tags(t *testing.T, semaphore CheckDestroy: testAccCheckTransitGatewayPeeringAttachmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringAttachmentExists(ctx, resourceName, &transitGatewayPeeringAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, { - Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringAttachmentExists(ctx, resourceName, &transitGatewayPeeringAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayPeeringAttachmentAccepterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringAttachmentExists(ctx, resourceName, &transitGatewayPeeringAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_peering_attachment_test.go b/internal/service/ec2/transitgateway_peering_attachment_test.go index 9ea1e7867ee..c6c44eacfe8 100644 --- a/internal/service/ec2/transitgateway_peering_attachment_test.go +++ b/internal/service/ec2/transitgateway_peering_attachment_test.go @@ -108,34 +108,34 @@ func testAccTransitGatewayPeeringAttachment_tags(t *testing.T, semaphore tfsync. CheckDestroy: testAccCheckTransitGatewayPeeringAttachmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayPeeringAttachmentConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayPeeringAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringAttachmentExists(ctx, resourceName, &transitGatewayPeeringAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccTransitGatewayPeeringAttachmentConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayPeeringAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, { - Config: testAccTransitGatewayPeeringAttachmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayPeeringAttachmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringAttachmentExists(ctx, resourceName, &transitGatewayPeeringAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayPeeringAttachmentConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayPeeringAttachmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringAttachmentExists(ctx, resourceName, &transitGatewayPeeringAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_policy_table_test.go b/internal/service/ec2/transitgateway_policy_table_test.go index 0648803a422..b719a21b81b 100644 --- a/internal/service/ec2/transitgateway_policy_table_test.go +++ b/internal/service/ec2/transitgateway_policy_table_test.go @@ -135,11 +135,11 @@ func testAccTransitGatewayPolicyTable_tags(t *testing.T, semaphore tfsync.Semaph CheckDestroy: testAccCheckTransitGatewayPolicyTableDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayPolicyTableConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayPolicyTableConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPolicyTableExists(ctx, resourceName, &transitGatewayPolicyTable1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -148,22 +148,22 @@ func testAccTransitGatewayPolicyTable_tags(t *testing.T, semaphore tfsync.Semaph ImportStateVerify: true, }, { - Config: testAccTransitGatewayPolicyTableConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayPolicyTableConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPolicyTableExists(ctx, resourceName, &transitGatewayPolicyTable2), testAccCheckTransitGatewayPolicyTableNotRecreated(&transitGatewayPolicyTable1, &transitGatewayPolicyTable2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayPolicyTableConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayPolicyTableConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPolicyTableExists(ctx, resourceName, &transitGatewayPolicyTable3), testAccCheckTransitGatewayPolicyTableNotRecreated(&transitGatewayPolicyTable2, &transitGatewayPolicyTable3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_route_table_test.go b/internal/service/ec2/transitgateway_route_table_test.go index d700bea3b48..8c0bd4f2ca6 100644 --- a/internal/service/ec2/transitgateway_route_table_test.go +++ b/internal/service/ec2/transitgateway_route_table_test.go @@ -136,11 +136,11 @@ func testAccTransitGatewayRouteTable_tags(t *testing.T, semaphore tfsync.Semapho CheckDestroy: testAccCheckTransitGatewayRouteTableDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayRouteTableConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayRouteTableConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayRouteTableExists(ctx, resourceName, &transitGatewayRouteTable1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -149,22 +149,22 @@ func testAccTransitGatewayRouteTable_tags(t *testing.T, semaphore tfsync.Semapho ImportStateVerify: true, }, { - Config: testAccTransitGatewayRouteTableConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayRouteTableConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayRouteTableExists(ctx, resourceName, &transitGatewayRouteTable2), testAccCheckTransitGatewayRouteTableNotRecreated(&transitGatewayRouteTable1, &transitGatewayRouteTable2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayRouteTableConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayRouteTableConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayRouteTableExists(ctx, resourceName, &transitGatewayRouteTable3), testAccCheckTransitGatewayRouteTableNotRecreated(&transitGatewayRouteTable2, &transitGatewayRouteTable3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_test.go b/internal/service/ec2/transitgateway_test.go index 8c58e7a257e..57b31c12cfb 100644 --- a/internal/service/ec2/transitgateway_test.go +++ b/internal/service/ec2/transitgateway_test.go @@ -626,11 +626,11 @@ func testAccTransitGateway_tags(t *testing.T, semaphore tfsync.Semaphore) { CheckDestroy: testAccCheckTransitGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayConfig_tags1("key1", "value1"), + Config: testAccTransitGatewayConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayExists(ctx, resourceName, &transitGateway1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -639,22 +639,22 @@ func testAccTransitGateway_tags(t *testing.T, semaphore tfsync.Semaphore) { ImportStateVerify: true, }, { - Config: testAccTransitGatewayConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayExists(ctx, resourceName, &transitGateway2), testAccCheckTransitGatewayNotRecreated(&transitGateway1, &transitGateway2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayConfig_tags1("key2", "value2"), + Config: testAccTransitGatewayConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayExists(ctx, resourceName, &transitGateway3), testAccCheckTransitGatewayNotRecreated(&transitGateway2, &transitGateway3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_vpc_attachment_accepter_test.go b/internal/service/ec2/transitgateway_vpc_attachment_accepter_test.go index 1ef4f8a701e..15afdc9b4f4 100644 --- a/internal/service/ec2/transitgateway_vpc_attachment_accepter_test.go +++ b/internal/service/ec2/transitgateway_vpc_attachment_accepter_test.go @@ -81,34 +81,34 @@ func testAccTransitGatewayVPCAttachmentAccepter_tags(t *testing.T, semaphore tfs CheckDestroy: testAccCheckTransitGatewayVPCAttachmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayVPCAttachmentExists(ctx, resourceName, &transitGatewayVpcAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, { - Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayVPCAttachmentExists(ctx, resourceName, &transitGatewayVpcAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayVPCAttachmentAccepterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayVPCAttachmentExists(ctx, resourceName, &transitGatewayVpcAttachment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/transitgateway_vpc_attachment_test.go b/internal/service/ec2/transitgateway_vpc_attachment_test.go index 9fe51d6a0fc..416841fcfb9 100644 --- a/internal/service/ec2/transitgateway_vpc_attachment_test.go +++ b/internal/service/ec2/transitgateway_vpc_attachment_test.go @@ -310,11 +310,11 @@ func testAccTransitGatewayVPCAttachment_tags(t *testing.T, semaphore tfsync.Sema CheckDestroy: testAccCheckTransitGatewayVPCAttachmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayVPCAttachmentConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayVPCAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayVPCAttachmentExists(ctx, resourceName, &transitGatewayVpcAttachment1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -323,22 +323,22 @@ func testAccTransitGatewayVPCAttachment_tags(t *testing.T, semaphore tfsync.Sema ImportStateVerify: true, }, { - Config: testAccTransitGatewayVPCAttachmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayVPCAttachmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayVPCAttachmentExists(ctx, resourceName, &transitGatewayVpcAttachment2), testAccCheckTransitGatewayVPCAttachmentNotRecreated(&transitGatewayVpcAttachment1, &transitGatewayVpcAttachment2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayVPCAttachmentConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayVPCAttachmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayVPCAttachmentExists(ctx, resourceName, &transitGatewayVpcAttachment3), testAccCheckTransitGatewayVPCAttachmentNotRecreated(&transitGatewayVpcAttachment2, &transitGatewayVpcAttachment3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/verifiedaccess_endpoint_test.go b/internal/service/ec2/verifiedaccess_endpoint_test.go index 9adf14dcaf7..43b254548de 100644 --- a/internal/service/ec2/verifiedaccess_endpoint_test.go +++ b/internal/service/ec2/verifiedaccess_endpoint_test.go @@ -136,11 +136,11 @@ func testAccVerifiedAccessEndpoint_tags(t *testing.T, semaphore tfsync.Semaphore CheckDestroy: testAccCheckVerifiedAccessEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVerifiedAccessEndpointConfig_tags1(rName, acctest.TLSPEMEscapeNewlines(key), acctest.TLSPEMEscapeNewlines(certificate), "key1", "value1"), + Config: testAccVerifiedAccessEndpointConfig_tags1(rName, acctest.TLSPEMEscapeNewlines(key), acctest.TLSPEMEscapeNewlines(certificate), acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -152,20 +152,20 @@ func testAccVerifiedAccessEndpoint_tags(t *testing.T, semaphore tfsync.Semaphore }, }, { - Config: testAccVerifiedAccessEndpointConfig_tags2(rName, acctest.TLSPEMEscapeNewlines(key), acctest.TLSPEMEscapeNewlines(certificate), "key1", "value1updated", "key2", "value2"), + Config: testAccVerifiedAccessEndpointConfig_tags2(rName, acctest.TLSPEMEscapeNewlines(key), acctest.TLSPEMEscapeNewlines(certificate), acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVerifiedAccessEndpointConfig_tags1(rName, acctest.TLSPEMEscapeNewlines(key), acctest.TLSPEMEscapeNewlines(certificate), "key2", "value2"), + Config: testAccVerifiedAccessEndpointConfig_tags1(rName, acctest.TLSPEMEscapeNewlines(key), acctest.TLSPEMEscapeNewlines(certificate), acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/verifiedaccess_group_test.go b/internal/service/ec2/verifiedaccess_group_test.go index 04eee0d0141..18044954470 100644 --- a/internal/service/ec2/verifiedaccess_group_test.go +++ b/internal/service/ec2/verifiedaccess_group_test.go @@ -176,7 +176,7 @@ func testAccVerifiedAccessGroup_disappears(t *testing.T, semaphore tfsync.Semaph CheckDestroy: testAccCheckVerifiedAccessGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVerifiedAccessGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccVerifiedAccessGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessGroupExists(ctx, resourceName, &v), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfec2.ResourceVerifiedAccessGroup(), resourceName), @@ -204,11 +204,11 @@ func testAccVerifiedAccessGroup_tags(t *testing.T, semaphore tfsync.Semaphore) { CheckDestroy: testAccCheckVerifiedAccessGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVerifiedAccessGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccVerifiedAccessGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -218,20 +218,20 @@ func testAccVerifiedAccessGroup_tags(t *testing.T, semaphore tfsync.Semaphore) { ImportStateVerifyIgnore: []string{}, }, { - Config: testAccVerifiedAccessGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVerifiedAccessGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVerifiedAccessGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccVerifiedAccessGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/verifiedaccess_instance_test.go b/internal/service/ec2/verifiedaccess_instance_test.go index 5a51d19db5c..adac538a592 100644 --- a/internal/service/ec2/verifiedaccess_instance_test.go +++ b/internal/service/ec2/verifiedaccess_instance_test.go @@ -183,30 +183,30 @@ func testAccVerifiedAccessInstance_tags(t *testing.T, semaphore tfsync.Semaphore CheckDestroy: testAccCheckVerifiedAccessInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVerifiedAccessInstanceConfig_tags1("key1", "value1"), + Config: testAccVerifiedAccessInstanceConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessInstanceExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVerifiedAccessInstanceConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccVerifiedAccessInstanceConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessInstanceExists(ctx, resourceName, &v2), testAccCheckVerifiedAccessInstanceNotRecreated(&v1, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVerifiedAccessInstanceConfig_tags1("key2", "value2"), + Config: testAccVerifiedAccessInstanceConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessInstanceExists(ctx, resourceName, &v3), testAccCheckVerifiedAccessInstanceNotRecreated(&v2, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/ec2/verifiedaccess_trust_provider_test.go b/internal/service/ec2/verifiedaccess_trust_provider_test.go index 86973d072fd..c67ba9287bf 100644 --- a/internal/service/ec2/verifiedaccess_trust_provider_test.go +++ b/internal/service/ec2/verifiedaccess_trust_provider_test.go @@ -202,28 +202,28 @@ func TestAccVerifiedAccessTrustProvider_tags(t *testing.T) { CheckDestroy: testAccCheckVerifiedAccessTrustProviderDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVerifiedAccessTrustProviderConfig_tags1(policyReferenceName, trustProviderType, userTrustProviderType, description, "key1", "value1"), + Config: testAccVerifiedAccessTrustProviderConfig_tags1(policyReferenceName, trustProviderType, userTrustProviderType, description, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessTrustProviderExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVerifiedAccessTrustProviderConfig_tags2(policyReferenceName, trustProviderType, userTrustProviderType, description, "key1", "value1updated", "key2", "value2"), + Config: testAccVerifiedAccessTrustProviderConfig_tags2(policyReferenceName, trustProviderType, userTrustProviderType, description, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessTrustProviderExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVerifiedAccessTrustProviderConfig_tags1(policyReferenceName, trustProviderType, userTrustProviderType, description, "key2", "value2"), + Config: testAccVerifiedAccessTrustProviderConfig_tags1(policyReferenceName, trustProviderType, userTrustProviderType, description, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVerifiedAccessTrustProviderExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/ec2/vpc_default_network_acl_test.go b/internal/service/ec2/vpc_default_network_acl_test.go index a680e52e3d2..b03ebff047b 100644 --- a/internal/service/ec2/vpc_default_network_acl_test.go +++ b/internal/service/ec2/vpc_default_network_acl_test.go @@ -97,11 +97,11 @@ func TestAccVPCDefaultNetworkACL_tags(t *testing.T) { CheckDestroy: testAccCheckDefaultNetworkACLDestroy, Steps: []resource.TestStep{ { - Config: testAccVPCDefaultNetworkACLConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCDefaultNetworkACLConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDefaultNetworkACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -110,20 +110,20 @@ func TestAccVPCDefaultNetworkACL_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCDefaultNetworkACLConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCDefaultNetworkACLConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDefaultNetworkACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCDefaultNetworkACLConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCDefaultNetworkACLConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDefaultNetworkACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_default_route_table_test.go b/internal/service/ec2/vpc_default_route_table_test.go index 3cd06a7b55d..03a35e0c3b1 100644 --- a/internal/service/ec2/vpc_default_route_table_test.go +++ b/internal/service/ec2/vpc_default_route_table_test.go @@ -361,28 +361,28 @@ func TestAccVPCDefaultRouteTable_tags(t *testing.T) { CheckDestroy: testAccCheckRouteTableDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCDefaultRouteTableConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCDefaultRouteTableConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists(ctx, resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVPCDefaultRouteTableConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCDefaultRouteTableConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists(ctx, resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCDefaultRouteTableConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCDefaultRouteTableConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists(ctx, resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_dhcp_options_test.go b/internal/service/ec2/vpc_dhcp_options_test.go index 41fc29f99f6..16072360fe3 100644 --- a/internal/service/ec2/vpc_dhcp_options_test.go +++ b/internal/service/ec2/vpc_dhcp_options_test.go @@ -109,11 +109,11 @@ func TestAccVPCDHCPOptions_tags(t *testing.T) { CheckDestroy: testAccCheckDHCPOptionsDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCDHCPOptionsConfig_tags1("key1", "value1"), + Config: testAccVPCDHCPOptionsConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDHCPOptionsExists(ctx, resourceName, &d), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -122,20 +122,20 @@ func TestAccVPCDHCPOptions_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCDHCPOptionsConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccVPCDHCPOptionsConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDHCPOptionsExists(ctx, resourceName, &d), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCDHCPOptionsConfig_tags1("key2", "value2"), + Config: testAccVPCDHCPOptionsConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDHCPOptionsExists(ctx, resourceName, &d), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_egress_only_internet_gateway_test.go b/internal/service/ec2/vpc_egress_only_internet_gateway_test.go index 62b80ae23be..db46c81742a 100644 --- a/internal/service/ec2/vpc_egress_only_internet_gateway_test.go +++ b/internal/service/ec2/vpc_egress_only_internet_gateway_test.go @@ -60,11 +60,11 @@ func TestAccVPCEgressOnlyInternetGateway_tags(t *testing.T) { CheckDestroy: testAccCheckEgressOnlyInternetGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCEgressOnlyInternetGatewayConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCEgressOnlyInternetGatewayConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEgressOnlyInternetGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -73,20 +73,20 @@ func TestAccVPCEgressOnlyInternetGateway_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCEgressOnlyInternetGatewayConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCEgressOnlyInternetGatewayConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEgressOnlyInternetGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCEgressOnlyInternetGatewayConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCEgressOnlyInternetGatewayConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEgressOnlyInternetGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_endpoint_service_test.go b/internal/service/ec2/vpc_endpoint_service_test.go index 155d3001e0e..38bf81f8aa5 100644 --- a/internal/service/ec2/vpc_endpoint_service_test.go +++ b/internal/service/ec2/vpc_endpoint_service_test.go @@ -99,11 +99,11 @@ func TestAccVPCEndpointService_tags(t *testing.T) { CheckDestroy: testAccCheckVPCEndpointServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCEndpointServiceConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCEndpointServiceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCEndpointServiceExists(ctx, resourceName, &svcCfg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -112,20 +112,20 @@ func TestAccVPCEndpointService_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCEndpointServiceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCEndpointServiceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCEndpointServiceExists(ctx, resourceName, &svcCfg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCEndpointServiceConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCEndpointServiceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCEndpointServiceExists(ctx, resourceName, &svcCfg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_endpoint_test.go b/internal/service/ec2/vpc_endpoint_test.go index a0a3062a333..8608880994c 100644 --- a/internal/service/ec2/vpc_endpoint_test.go +++ b/internal/service/ec2/vpc_endpoint_test.go @@ -223,11 +223,11 @@ func TestAccVPCEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckVPCEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCEndpointConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCEndpointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCEndpointExists(ctx, resourceName, &endpoint), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -236,20 +236,20 @@ func TestAccVPCEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCEndpointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCEndpointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCEndpointExists(ctx, resourceName, &endpoint), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCEndpointConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCEndpointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCEndpointExists(ctx, resourceName, &endpoint), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_flow_log_test.go b/internal/service/ec2/vpc_flow_log_test.go index 48d232c0979..8d5402535a0 100644 --- a/internal/service/ec2/vpc_flow_log_test.go +++ b/internal/service/ec2/vpc_flow_log_test.go @@ -518,11 +518,11 @@ func TestAccVPCFlowLog_tags(t *testing.T) { CheckDestroy: testAccCheckFlowLogDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCFlowLogConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCFlowLogConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFlowLogExists(ctx, resourceName, &flowLog), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -531,20 +531,20 @@ func TestAccVPCFlowLog_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCFlowLogConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCFlowLogConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFlowLogExists(ctx, resourceName, &flowLog), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCFlowLogConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCFlowLogConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFlowLogExists(ctx, resourceName, &flowLog), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_internet_gateway_test.go b/internal/service/ec2/vpc_internet_gateway_test.go index 2bd3606d2aa..3ccd8942689 100644 --- a/internal/service/ec2/vpc_internet_gateway_test.go +++ b/internal/service/ec2/vpc_internet_gateway_test.go @@ -123,11 +123,11 @@ func TestAccVPCInternetGateway_Tags(t *testing.T) { CheckDestroy: testAccCheckInternetGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCInternetGatewayConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCInternetGatewayConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInternetGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -136,20 +136,20 @@ func TestAccVPCInternetGateway_Tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCInternetGatewayConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCInternetGatewayConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInternetGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCInternetGatewayConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCInternetGatewayConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInternetGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_managed_prefix_list_test.go b/internal/service/ec2/vpc_managed_prefix_list_test.go index 562f5bef93a..0029705a702 100644 --- a/internal/service/ec2/vpc_managed_prefix_list_test.go +++ b/internal/service/ec2/vpc_managed_prefix_list_test.go @@ -322,11 +322,11 @@ func TestAccVPCManagedPrefixList_tags(t *testing.T) { CheckDestroy: testAccCheckManagedPrefixListDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCManagedPrefixListConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCManagedPrefixListConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccManagedPrefixListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, names.AttrVersion, acctest.CtOne), ), }, @@ -336,21 +336,21 @@ func TestAccVPCManagedPrefixList_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCManagedPrefixListConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCManagedPrefixListConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccManagedPrefixListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, names.AttrVersion, acctest.CtOne), ), }, { - Config: testAccVPCManagedPrefixListConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCManagedPrefixListConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccManagedPrefixListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, names.AttrVersion, acctest.CtOne), ), }, diff --git a/internal/service/ec2/vpc_nat_gateway_test.go b/internal/service/ec2/vpc_nat_gateway_test.go index 033191f7db3..8926385e7da 100644 --- a/internal/service/ec2/vpc_nat_gateway_test.go +++ b/internal/service/ec2/vpc_nat_gateway_test.go @@ -166,11 +166,11 @@ func TestAccVPCNATGateway_tags(t *testing.T) { CheckDestroy: testAccCheckNATGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCNATGatewayConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCNATGatewayConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNATGatewayExists(ctx, resourceName, &natGateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -179,20 +179,20 @@ func TestAccVPCNATGateway_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCNATGatewayConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCNATGatewayConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNATGatewayExists(ctx, resourceName, &natGateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCNATGatewayConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCNATGatewayConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNATGatewayExists(ctx, resourceName, &natGateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_network_acl_test.go b/internal/service/ec2/vpc_network_acl_test.go index 52a6823a54f..a666872a25c 100644 --- a/internal/service/ec2/vpc_network_acl_test.go +++ b/internal/service/ec2/vpc_network_acl_test.go @@ -92,11 +92,11 @@ func TestAccVPCNetworkACL_tags(t *testing.T) { CheckDestroy: testAccCheckNetworkACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCNetworkACLConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCNetworkACLConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -105,20 +105,20 @@ func TestAccVPCNetworkACL_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCNetworkACLConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCNetworkACLConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCNetworkACLConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCNetworkACLConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_network_insights_analysis_test.go b/internal/service/ec2/vpc_network_insights_analysis_test.go index 0dc77a592ac..f53047a69de 100644 --- a/internal/service/ec2/vpc_network_insights_analysis_test.go +++ b/internal/service/ec2/vpc_network_insights_analysis_test.go @@ -89,11 +89,11 @@ func TestAccVPCNetworkInsightsAnalysis_tags(t *testing.T) { CheckDestroy: testAccCheckNetworkInsightsAnalysisDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCNetworkInsightsAnalysisConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCNetworkInsightsAnalysisConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkInsightsAnalysisExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -103,20 +103,20 @@ func TestAccVPCNetworkInsightsAnalysis_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"wait_for_completion"}, }, { - Config: testAccVPCNetworkInsightsAnalysisConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCNetworkInsightsAnalysisConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkInsightsAnalysisExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCNetworkInsightsAnalysisConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCNetworkInsightsAnalysisConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkInsightsAnalysisExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_network_insights_path_test.go b/internal/service/ec2/vpc_network_insights_path_test.go index 90c7bf324c2..ffadfec9bd6 100644 --- a/internal/service/ec2/vpc_network_insights_path_test.go +++ b/internal/service/ec2/vpc_network_insights_path_test.go @@ -90,11 +90,11 @@ func TestAccVPCNetworkInsightsPath_tags(t *testing.T) { CheckDestroy: testAccCheckNetworkInsightsPathDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCNetworkInsightsPathConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCNetworkInsightsPathConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkInsightsPathExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -103,20 +103,20 @@ func TestAccVPCNetworkInsightsPath_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCNetworkInsightsPathConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCNetworkInsightsPathConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkInsightsPathExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCNetworkInsightsPathConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCNetworkInsightsPathConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNetworkInsightsPathExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_network_interface_test.go b/internal/service/ec2/vpc_network_interface_test.go index 5de94f73c21..2786a5a4f71 100644 --- a/internal/service/ec2/vpc_network_interface_test.go +++ b/internal/service/ec2/vpc_network_interface_test.go @@ -129,11 +129,11 @@ func TestAccVPCNetworkInterface_tags(t *testing.T) { CheckDestroy: testAccCheckENIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCNetworkInterfaceConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCNetworkInterfaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckENIExistsV2(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -143,20 +143,20 @@ func TestAccVPCNetworkInterface_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"private_ip_list_enabled", "ipv6_address_list_enabled"}, }, { - Config: testAccVPCNetworkInterfaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCNetworkInterfaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckENIExistsV2(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCNetworkInterfaceConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCNetworkInterfaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckENIExistsV2(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_peering_connection_test.go b/internal/service/ec2/vpc_peering_connection_test.go index 7a4cb2f0f7f..f8aa46ad0b6 100644 --- a/internal/service/ec2/vpc_peering_connection_test.go +++ b/internal/service/ec2/vpc_peering_connection_test.go @@ -91,11 +91,11 @@ func TestAccVPCPeeringConnection_tags(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCPeeringConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCPeeringConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCPeeringConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -107,20 +107,20 @@ func TestAccVPCPeeringConnection_tags(t *testing.T) { }, }, { - Config: testAccVPCPeeringConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCPeeringConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCPeeringConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCPeeringConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCPeeringConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCPeeringConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_route_table_test.go b/internal/service/ec2/vpc_route_table_test.go index 42a1004c74c..ea8ff994bc7 100644 --- a/internal/service/ec2/vpc_route_table_test.go +++ b/internal/service/ec2/vpc_route_table_test.go @@ -246,11 +246,11 @@ func TestAccVPCRouteTable_tags(t *testing.T) { CheckDestroy: testAccCheckRouteTableDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCRouteTableConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCRouteTableConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists(ctx, resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -259,20 +259,20 @@ func TestAccVPCRouteTable_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCRouteTableConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCRouteTableConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists(ctx, resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCRouteTableConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCRouteTableConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists(ctx, resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_security_group_ingress_rule_test.go b/internal/service/ec2/vpc_security_group_ingress_rule_test.go index 9a440d4b769..8aee882cfaf 100644 --- a/internal/service/ec2/vpc_security_group_ingress_rule_test.go +++ b/internal/service/ec2/vpc_security_group_ingress_rule_test.go @@ -138,11 +138,11 @@ func TestAccVPCSecurityGroupIngressRule_tags(t *testing.T) { CheckDestroy: testAccCheckSecurityGroupIngressRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -151,20 +151,20 @@ func TestAccVPCSecurityGroupIngressRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCSecurityGroupIngressRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -239,14 +239,14 @@ func TestAccVPCSecurityGroupIngressRule_DefaultTags_providerOnly(t *testing.T) { }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("providerkey1", "value1"), + acctest.ConfigDefaultTags_Tags1("providerkey1", acctest.CtValue1), testAccVPCSecurityGroupIngressRuleConfig_basic(rName), ), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", acctest.CtValue1), ), }, }, @@ -266,25 +266,25 @@ func TestAccVPCSecurityGroupIngressRule_DefaultTags_updateToProviderOnly(t *test CheckDestroy: testAccCheckSecurityGroupIngressRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), testAccVPCSecurityGroupIngressRuleConfig_basic(rName), ), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -310,24 +310,24 @@ func TestAccVPCSecurityGroupIngressRule_DefaultTags_updateToResourceOnly(t *test Steps: []resource.TestStep{ { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), testAccVPCSecurityGroupIngressRuleConfig_basic(rName), ), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { - Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -505,7 +505,7 @@ func TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply(t *testing.T) { CheckDestroy: testAccCheckSecurityGroupIngressRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSecurityGroupIngressRuleConfig_tagsComputedFromDataSource1(rName, "key1", "value1"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tagsComputedFromDataSource1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -513,7 +513,7 @@ func TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply(t *testing.T) { ), }, { - Config: testAccVPCSecurityGroupIngressRuleConfig_tagsComputedFromDataSource2(rName, "key1", "value1", "key2", "value2"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tagsComputedFromDataSource2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), @@ -542,7 +542,7 @@ func TestAccVPCSecurityGroupIngressRule_defaultAndIgnoreTags(t *testing.T) { CheckDestroy: testAccCheckSecurityGroupIngressRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupIngressRuleExists(ctx, resourceName, &v), testAccCheckSecurityGroupIngressRuleUpdateTags(ctx, &v, nil, map[string]string{"defaultkey1": "defaultvalue1"}), @@ -552,14 +552,14 @@ func TestAccVPCSecurityGroupIngressRule_defaultAndIgnoreTags(t *testing.T) { { Config: acctest.ConfigCompose( acctest.ConfigDefaultAndIgnoreTagsKeyPrefixes1("defaultkey1", "defaultvalue1", "defaultkey"), - testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key1", "value1"), + testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ), PlanOnly: true, }, { Config: acctest.ConfigCompose( acctest.ConfigDefaultAndIgnoreTagsKeys1("defaultkey1", "defaultvalue1"), - testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, "key1", "value1"), + testAccVPCSecurityGroupIngressRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ), PlanOnly: true, }, diff --git a/internal/service/ec2/vpc_security_group_test.go b/internal/service/ec2/vpc_security_group_test.go index 53838af294c..c3f36f4b813 100644 --- a/internal/service/ec2/vpc_security_group_test.go +++ b/internal/service/ec2/vpc_security_group_test.go @@ -1107,11 +1107,11 @@ func TestAccVPCSecurityGroup_tags(t *testing.T) { CheckDestroy: testAccCheckSecurityGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSecurityGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSecurityGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1121,20 +1121,20 @@ func TestAccVPCSecurityGroup_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"revoke_rules_on_delete"}, }, { - Config: testAccVPCSecurityGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCSecurityGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCSecurityGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCSecurityGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecurityGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_subnet_test.go b/internal/service/ec2/vpc_subnet_test.go index f6b32cb745f..ca93785386d 100644 --- a/internal/service/ec2/vpc_subnet_test.go +++ b/internal/service/ec2/vpc_subnet_test.go @@ -77,11 +77,11 @@ func TestAccVPCSubnet_tags(t *testing.T) { CheckDestroy: testAccCheckSubnetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSubnetConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSubnetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -90,20 +90,20 @@ func TestAccVPCSubnet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCSubnetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCSubnetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCSubnetConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCSubnetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2")), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2)), }, }, }) @@ -153,14 +153,14 @@ func TestAccVPCSubnet_DefaultTags_providerOnly(t *testing.T) { }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("providerkey1", "value1"), + acctest.ConfigDefaultTags_Tags1("providerkey1", acctest.CtValue1), testAccVPCSubnetConfig_basic(rName), ), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", acctest.CtValue1), ), }, }, @@ -180,25 +180,25 @@ func TestAccVPCSubnet_DefaultTags_updateToProviderOnly(t *testing.T) { CheckDestroy: testAccCheckSubnetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSubnetConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSubnetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), testAccVPCSubnetConfig_basic(rName), ), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -224,24 +224,24 @@ func TestAccVPCSubnet_DefaultTags_updateToResourceOnly(t *testing.T) { Steps: []resource.TestStep{ { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), testAccVPCSubnetConfig_basic(rName), ), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { - Config: testAccVPCSubnetConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSubnetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -392,7 +392,7 @@ func TestAccVPCSubnet_defaultAndIgnoreTags(t *testing.T) { CheckDestroy: testAccCheckSubnetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSubnetConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCSubnetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), testAccCheckSubnetUpdateTags(ctx, &subnet, nil, map[string]string{"defaultkey1": "defaultvalue1"}), @@ -402,14 +402,14 @@ func TestAccVPCSubnet_defaultAndIgnoreTags(t *testing.T) { { Config: acctest.ConfigCompose( acctest.ConfigDefaultAndIgnoreTagsKeyPrefixes1("defaultkey1", "defaultvalue1", "defaultkey"), - testAccVPCSubnetConfig_tags1(rName, "key1", "value1"), + testAccVPCSubnetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ), PlanOnly: true, }, { Config: acctest.ConfigCompose( acctest.ConfigDefaultAndIgnoreTagsKeys1("defaultkey1", "defaultvalue1"), - testAccVPCSubnetConfig_tags1(rName, "key1", "value1"), + testAccVPCSubnetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), ), PlanOnly: true, }, @@ -434,7 +434,7 @@ func TestAccVPCSubnet_updateTagsKnownAtApply(t *testing.T) { CheckDestroy: testAccCheckSubnetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCSubnetConfig_tagsComputedFromDataSource1("key1", "value1"), + Config: testAccVPCSubnetConfig_tagsComputedFromDataSource1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -442,7 +442,7 @@ func TestAccVPCSubnet_updateTagsKnownAtApply(t *testing.T) { ), }, { - Config: testAccVPCSubnetConfig_tagsComputedFromDataSource2("key1", "value1", "key2", "value2"), + Config: testAccVPCSubnetConfig_tagsComputedFromDataSource2(acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists(ctx, resourceName, &subnet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), diff --git a/internal/service/ec2/vpc_test.go b/internal/service/ec2/vpc_test.go index a2e582f50d6..257e3c301ff 100644 --- a/internal/service/ec2/vpc_test.go +++ b/internal/service/ec2/vpc_test.go @@ -104,11 +104,11 @@ func TestAccVPC_tags(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,22 +117,22 @@ func TestAccVPC_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccVPCConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc2), testAccCheckVPCIDsEqual(&vpc2, &vpc1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCConfig_tags1("key2", "value2"), + Config: testAccVPCConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc3), testAccCheckVPCIDsEqual(&vpc3, &vpc2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -197,7 +197,7 @@ func TestAccVPC_DefaultTags_zeroValue(t *testing.T) { Steps: []resource.TestStep{ { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", ""), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, ""), testAccVPCConfig_basic, ), Check: resource.ComposeTestCheckFunc( @@ -209,8 +209,8 @@ func TestAccVPC_DefaultTags_zeroValue(t *testing.T) { }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", ""), - testAccVPCConfig_tags1("key2", ""), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, ""), + testAccVPCConfig_tags1(acctest.CtKey2, ""), ), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), @@ -222,14 +222,14 @@ func TestAccVPC_DefaultTags_zeroValue(t *testing.T) { }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), - testAccVPCConfig_tags1("key2", ""), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), + testAccVPCConfig_tags1(acctest.CtKey2, ""), ), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.key2", ""), ), }, @@ -280,14 +280,14 @@ func TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly(t *t }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("providerkey1", "value1"), + acctest.ConfigDefaultTags_Tags1("providerkey1", acctest.CtValue1), testAccVPCConfig_basic, ), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.providerkey1", acctest.CtValue1), ), }, }, @@ -306,25 +306,25 @@ func TestAccVPC_DefaultTags_updateToProviderOnly(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), testAccVPCConfig_basic, ), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -349,24 +349,24 @@ func TestAccVPC_DefaultTags_updateToResourceOnly(t *testing.T) { Steps: []resource.TestStep{ { Config: acctest.ConfigCompose( - acctest.ConfigDefaultTags_Tags1("key1", "value1"), + acctest.ConfigDefaultTags_Tags1(acctest.CtKey1, acctest.CtValue1), testAccVPCConfig_basic, ), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -586,7 +586,7 @@ func TestAccVPC_Tags_EmptyTag_OnCreate(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", ""), + Config: testAccVPCConfig_tags1(acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -614,19 +614,19 @@ func TestAccVPC_Tags_EmptyTag_OnUpdate_Add(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVPCConfig_tags2("key1", "value1", "key2", ""), + Config: testAccVPCConfig_tags2(acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeAggregateTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -651,15 +651,15 @@ func TestAccVPC_Tags_EmptyTag_OnUpdate_Replace(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVPCConfig_tags1("key1", ""), + Config: testAccVPCConfig_tags1(acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -793,7 +793,7 @@ func TestAccVPC_defaultAndIgnoreTags(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), testAccCheckVPCUpdateTags(ctx, &vpc, nil, map[string]string{"defaultkey1": "defaultvalue1"}), @@ -803,14 +803,14 @@ func TestAccVPC_defaultAndIgnoreTags(t *testing.T) { { Config: acctest.ConfigCompose( acctest.ConfigDefaultAndIgnoreTagsKeyPrefixes1("defaultkey1", "defaultvalue1", "defaultkey"), - testAccVPCConfig_tags1("key1", "value1"), + testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), ), PlanOnly: true, }, { Config: acctest.ConfigCompose( acctest.ConfigDefaultAndIgnoreTagsKeys1("defaultkey1", "defaultvalue1"), - testAccVPCConfig_tags1("key1", "value1"), + testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), ), PlanOnly: true, }, @@ -830,7 +830,7 @@ func TestAccVPC_ignoreTags(t *testing.T) { CheckDestroy: testAccCheckVPCDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConfig_tags1("key1", "value1"), + Config: testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( acctest.CheckVPCExistsV2(ctx, resourceName, &vpc), testAccCheckVPCUpdateTags(ctx, &vpc, nil, map[string]string{"ignorekey1": "ignorevalue1"}), @@ -838,11 +838,11 @@ func TestAccVPC_ignoreTags(t *testing.T) { ExpectNonEmptyPlan: true, }, { - Config: acctest.ConfigIgnoreTagsKeyPrefixes1("ignorekey") + testAccVPCConfig_tags1("key1", "value1"), + Config: acctest.ConfigIgnoreTagsKeyPrefixes1("ignorekey") + testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), PlanOnly: true, }, { - Config: acctest.ConfigIgnoreTagsKeys("ignorekey1") + testAccVPCConfig_tags1("key1", "value1"), + Config: acctest.ConfigIgnoreTagsKeys("ignorekey1") + testAccVPCConfig_tags1(acctest.CtKey1, acctest.CtValue1), PlanOnly: true, }, }, diff --git a/internal/service/ec2/vpc_traffic_mirror_filter_test.go b/internal/service/ec2/vpc_traffic_mirror_filter_test.go index f4cf1f94562..3233e746a67 100644 --- a/internal/service/ec2/vpc_traffic_mirror_filter_test.go +++ b/internal/service/ec2/vpc_traffic_mirror_filter_test.go @@ -86,11 +86,11 @@ func TestAccVPCTrafficMirrorFilter_tags(t *testing.T) { CheckDestroy: testAccCheckTrafficMirrorFilterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCTrafficMirrorFilterConfig_tags1("key1", "value1"), + Config: testAccVPCTrafficMirrorFilterConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorFilterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -99,20 +99,20 @@ func TestAccVPCTrafficMirrorFilter_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCTrafficMirrorFilterConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccVPCTrafficMirrorFilterConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorFilterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCTrafficMirrorFilterConfig_tags1("key2", "value2"), + Config: testAccVPCTrafficMirrorFilterConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorFilterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_traffic_mirror_session_test.go b/internal/service/ec2/vpc_traffic_mirror_session_test.go index 79939527ede..df1c29a9d5c 100644 --- a/internal/service/ec2/vpc_traffic_mirror_session_test.go +++ b/internal/service/ec2/vpc_traffic_mirror_session_test.go @@ -104,11 +104,11 @@ func TestAccVPCTrafficMirrorSession_tags(t *testing.T) { CheckDestroy: testAccCheckTrafficMirrorSessionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCTrafficMirrorSessionConfig_tags1(rName, "key1", "value1", session), + Config: testAccVPCTrafficMirrorSessionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1, session), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorSessionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,20 +117,20 @@ func TestAccVPCTrafficMirrorSession_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCTrafficMirrorSessionConfig_tags2(rName, "key1", "value1updated", "key2", "value2", session), + Config: testAccVPCTrafficMirrorSessionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2, session), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorSessionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCTrafficMirrorSessionConfig_tags1(rName, "key2", "value2", session), + Config: testAccVPCTrafficMirrorSessionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2, session), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorSessionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpc_traffic_mirror_target_test.go b/internal/service/ec2/vpc_traffic_mirror_target_test.go index 8bbb0559e76..c3d4fd009b6 100644 --- a/internal/service/ec2/vpc_traffic_mirror_target_test.go +++ b/internal/service/ec2/vpc_traffic_mirror_target_test.go @@ -106,11 +106,11 @@ func TestAccVPCTrafficMirrorTarget_tags(t *testing.T) { CheckDestroy: testAccCheckTrafficMirrorTargetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCTrafficMirrorTargetConfig_tags1(rName, description, "key1", "value1"), + Config: testAccVPCTrafficMirrorTargetConfig_tags1(rName, description, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorTargetExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -119,20 +119,20 @@ func TestAccVPCTrafficMirrorTarget_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCTrafficMirrorTargetConfig_tags2(rName, description, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCTrafficMirrorTargetConfig_tags2(rName, description, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorTargetExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCTrafficMirrorTargetConfig_tags1(rName, description, "key2", "value2"), + Config: testAccVPCTrafficMirrorTargetConfig_tags1(rName, description, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrafficMirrorTargetExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpnclient_endpoint_test.go b/internal/service/ec2/vpnclient_endpoint_test.go index 72a5346680a..e73a9a4d739 100644 --- a/internal/service/ec2/vpnclient_endpoint_test.go +++ b/internal/service/ec2/vpnclient_endpoint_test.go @@ -122,11 +122,11 @@ func testAccClientVPNEndpoint_tags(t *testing.T, semaphore tfsync.Semaphore) { CheckDestroy: testAccCheckClientVPNEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClientVPNEndpointConfig_tags1(t, "key1", "value1"), + Config: testAccClientVPNEndpointConfig_tags1(t, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClientVPNEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -135,20 +135,20 @@ func testAccClientVPNEndpoint_tags(t *testing.T, semaphore tfsync.Semaphore) { ImportStateVerify: true, }, { - Config: testAccClientVPNEndpointConfig_tags2(t, "key1", "value1updated", "key2", "value2"), + Config: testAccClientVPNEndpointConfig_tags2(t, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClientVPNEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClientVPNEndpointConfig_tags1(t, "key2", "value2"), + Config: testAccClientVPNEndpointConfig_tags1(t, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClientVPNEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpnsite_connection_test.go b/internal/service/ec2/vpnsite_connection_test.go index 42857301b59..9248d56f6ac 100644 --- a/internal/service/ec2/vpnsite_connection_test.go +++ b/internal/service/ec2/vpnsite_connection_test.go @@ -1384,11 +1384,11 @@ func TestAccSiteVPNConnection_tags(t *testing.T) { CheckDestroy: testAccCheckVPNConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSiteVPNConnectionConfig_tags1(rName, rBgpAsn, "key1", "value1"), + Config: testAccSiteVPNConnectionConfig_tags1(rName, rBgpAsn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccVPNConnectionExists(ctx, resourceName, &vpn), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1398,20 +1398,20 @@ func TestAccSiteVPNConnection_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"vgw_telemetry"}, }, { - Config: testAccSiteVPNConnectionConfig_tags2(rName, rBgpAsn, "key1", "value1updated", "key2", "value2"), + Config: testAccSiteVPNConnectionConfig_tags2(rName, rBgpAsn, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccVPNConnectionExists(ctx, resourceName, &vpn), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSiteVPNConnectionConfig_tags1(rName, rBgpAsn, "key2", "value2"), + Config: testAccSiteVPNConnectionConfig_tags1(rName, rBgpAsn, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccVPNConnectionExists(ctx, resourceName, &vpn), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/vpnsite_customer_gateway_test.go b/internal/service/ec2/vpnsite_customer_gateway_test.go index 3bb8cbe7f47..7bb42b47704 100644 --- a/internal/service/ec2/vpnsite_customer_gateway_test.go +++ b/internal/service/ec2/vpnsite_customer_gateway_test.go @@ -93,11 +93,11 @@ func TestAccSiteVPNCustomerGateway_tags(t *testing.T) { CheckDestroy: testAccCheckCustomerGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSiteVPNCustomerGatewayConfig_tags1(rBgpAsn, "key1", "value1"), + Config: testAccSiteVPNCustomerGatewayConfig_tags1(rBgpAsn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCustomerGatewayExists(ctx, resourceName, &gateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1")), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1)), }, { ResourceName: resourceName, @@ -105,19 +105,19 @@ func TestAccSiteVPNCustomerGateway_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSiteVPNCustomerGatewayConfig_tags2(rBgpAsn, "key1", "value1updated", "key2", "value2"), + Config: testAccSiteVPNCustomerGatewayConfig_tags2(rBgpAsn, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCustomerGatewayExists(ctx, resourceName, &gateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2")), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2)), }, { - Config: testAccSiteVPNCustomerGatewayConfig_tags1(rBgpAsn, "key2", "value2"), + Config: testAccSiteVPNCustomerGatewayConfig_tags1(rBgpAsn, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCustomerGatewayExists(ctx, resourceName, &gateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2")), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2)), }, }, }) diff --git a/internal/service/ec2/vpnsite_gateway_test.go b/internal/service/ec2/vpnsite_gateway_test.go index 1f025b0f4fe..3a0edc114ad 100644 --- a/internal/service/ec2/vpnsite_gateway_test.go +++ b/internal/service/ec2/vpnsite_gateway_test.go @@ -261,11 +261,11 @@ func TestAccSiteVPNGateway_tags(t *testing.T) { CheckDestroy: testAccCheckVPNGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSiteVPNGatewayConfig_tags1(rName, "key1", "value1"), + Config: testAccSiteVPNGatewayConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPNGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -274,20 +274,20 @@ func TestAccSiteVPNGateway_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSiteVPNGatewayConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSiteVPNGatewayConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPNGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSiteVPNGatewayConfig_tags1(rName, "key2", "value2"), + Config: testAccSiteVPNGatewayConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPNGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ec2/wavelength_carrier_gateway_test.go b/internal/service/ec2/wavelength_carrier_gateway_test.go index 464ab584bf5..1df9eba1cbb 100644 --- a/internal/service/ec2/wavelength_carrier_gateway_test.go +++ b/internal/service/ec2/wavelength_carrier_gateway_test.go @@ -89,11 +89,11 @@ func TestAccWavelengthCarrierGateway_tags(t *testing.T) { CheckDestroy: testAccCheckCarrierGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWavelengthCarrierGatewayConfig_tags1(rName, "key1", "value1"), + Config: testAccWavelengthCarrierGatewayConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCarrierGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func TestAccWavelengthCarrierGateway_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWavelengthCarrierGatewayConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWavelengthCarrierGatewayConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCarrierGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWavelengthCarrierGatewayConfig_tags1(rName, "key2", "value2"), + Config: testAccWavelengthCarrierGatewayConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCarrierGatewayExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From eef3a2ed7168a95e884c5fd1245fa0453ddbf3ec Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:40 -0400 Subject: [PATCH 068/180] ecr: Use constants for test strings --- internal/service/ecr/repository_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/ecr/repository_test.go b/internal/service/ecr/repository_test.go index 8123764a0ed..fa8a3c9081d 100644 --- a/internal/service/ecr/repository_test.go +++ b/internal/service/ecr/repository_test.go @@ -93,11 +93,11 @@ func TestAccECRRepository_tags(t *testing.T) { CheckDestroy: testAccCheckRepositoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRepositoryConfig_tags1(rName, "key1", "value1"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccECRRepository_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRepositoryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRepositoryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRepositoryConfig_tags1(rName, "key2", "value2"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 754c5c7ac5efb15409862a59f4cd9c95a193e160 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:40 -0400 Subject: [PATCH 069/180] ecrpublic: Use constants for test strings --- internal/service/ecrpublic/repository_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/ecrpublic/repository_test.go b/internal/service/ecrpublic/repository_test.go index be820fdd0a1..0d7e863615f 100644 --- a/internal/service/ecrpublic/repository_test.go +++ b/internal/service/ecrpublic/repository_test.go @@ -64,11 +64,11 @@ func TestAccECRPublicRepository_tags(t *testing.T) { CheckDestroy: testAccCheckRepositoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRepositoryConfig_tags1(rName, "key1", "value1"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -77,20 +77,20 @@ func TestAccECRPublicRepository_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRepositoryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRepositoryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRepositoryConfig_tags1(rName, "key2", "value2"), + Config: testAccRepositoryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRepositoryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From a8e6830d4140fab3e6840f07c0b122e6beac0625 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:40 -0400 Subject: [PATCH 070/180] ecs: Use constants for test strings --- internal/service/ecs/capacity_provider_test.go | 12 ++++++------ .../service/ecs/cluster_data_source_test.go | 4 ++-- internal/service/ecs/cluster_test.go | 12 ++++++------ internal/service/ecs/service_test.go | 12 ++++++------ internal/service/ecs/tag_test.go | 18 +++++++++--------- internal/service/ecs/task_definition_test.go | 12 ++++++------ .../ecs/task_execution_data_source_test.go | 10 +++++----- internal/service/ecs/task_set_test.go | 12 ++++++------ 8 files changed, 46 insertions(+), 46 deletions(-) diff --git a/internal/service/ecs/capacity_provider_test.go b/internal/service/ecs/capacity_provider_test.go index e310947bfa9..0c7465cddc5 100644 --- a/internal/service/ecs/capacity_provider_test.go +++ b/internal/service/ecs/capacity_provider_test.go @@ -199,11 +199,11 @@ func TestAccECSCapacityProvider_tags(t *testing.T) { CheckDestroy: testAccCheckCapacityProviderDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCapacityProviderConfig_tags1(rName, "key1", "value1"), + Config: testAccCapacityProviderConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCapacityProviderExists(ctx, resourceName, &provider), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -213,20 +213,20 @@ func TestAccECSCapacityProvider_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCapacityProviderConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCapacityProviderConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCapacityProviderExists(ctx, resourceName, &provider), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCapacityProviderConfig_tags1(rName, "key2", "value2"), + Config: testAccCapacityProviderConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCapacityProviderExists(ctx, resourceName, &provider), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ecs/cluster_data_source_test.go b/internal/service/ecs/cluster_data_source_test.go index eacd4c818d6..4fcb53846d0 100644 --- a/internal/service/ecs/cluster_data_source_test.go +++ b/internal/service/ecs/cluster_data_source_test.go @@ -78,7 +78,7 @@ func TestAccECSClusterDataSource_tags(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccClusterDataSourceConfig_tags(rName, "key1", "value1"), + Config: testAccClusterDataSourceConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, names.AttrARN, resourceName, names.AttrARN), resource.TestCheckResourceAttr(dataSourceName, "pending_tasks_count", acctest.CtZero), @@ -87,7 +87,7 @@ func TestAccECSClusterDataSource_tags(t *testing.T) { resource.TestCheckResourceAttrPair(dataSourceName, "service_connect_defaults.#", resourceName, "service_connect_defaults.#"), resource.TestCheckResourceAttr(dataSourceName, names.AttrStatus, "ACTIVE"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/ecs/cluster_test.go b/internal/service/ecs/cluster_test.go index 2771d40cb9a..54201da286c 100644 --- a/internal/service/ecs/cluster_test.go +++ b/internal/service/ecs/cluster_test.go @@ -95,11 +95,11 @@ func TestAccECSCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -109,20 +109,20 @@ func TestAccECSCluster_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ecs/service_test.go b/internal/service/ecs/service_test.go index 79922b0cd88..dbf77af2db1 100644 --- a/internal/service/ecs/service_test.go +++ b/internal/service/ecs/service_test.go @@ -1470,11 +1470,11 @@ func TestAccECSService_Tags_basic(t *testing.T) { CheckDestroy: testAccCheckServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName, &service), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1487,20 +1487,20 @@ func TestAccECSService_Tags_basic(t *testing.T) { ImportStateVerifyIgnore: []string{"task_definition", "wait_for_steady_state"}, }, { - Config: testAccServiceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName, &service), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName, &service), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ecs/tag_test.go b/internal/service/ecs/tag_test.go index cbf084f116c..0d920c17664 100644 --- a/internal/service/ecs/tag_test.go +++ b/internal/service/ecs/tag_test.go @@ -29,11 +29,11 @@ func TestAccECSTag_basic(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -57,7 +57,7 @@ func TestAccECSTag_disappears(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tfecs.ResourceTag(), resourceName), @@ -107,11 +107,11 @@ func TestAccECSTag_value(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -120,10 +120,10 @@ func TestAccECSTag_value(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTagConfig_basic(rName, "key1", "value1updated"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1updated"), ), }, diff --git a/internal/service/ecs/task_definition_test.go b/internal/service/ecs/task_definition_test.go index d47c1474fed..d1ee4e95265 100644 --- a/internal/service/ecs/task_definition_test.go +++ b/internal/service/ecs/task_definition_test.go @@ -1010,11 +1010,11 @@ func TestAccECSTaskDefinition_tags(t *testing.T) { CheckDestroy: testAccCheckTaskDefinitionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTaskDefinitionConfig_tags1(rName, "key1", "value1"), + Config: testAccTaskDefinitionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTaskDefinitionExists(ctx, resourceName, &def), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1025,20 +1025,20 @@ func TestAccECSTaskDefinition_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrSkipDestroy, "track_latest"}, }, { - Config: testAccTaskDefinitionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTaskDefinitionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTaskDefinitionExists(ctx, resourceName, &def), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTaskDefinitionConfig_tags1(rName, "key2", "value2"), + Config: testAccTaskDefinitionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTaskDefinitionExists(ctx, resourceName, &def), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ecs/task_execution_data_source_test.go b/internal/service/ecs/task_execution_data_source_test.go index 8c036bccef6..34ba11cbe5d 100644 --- a/internal/service/ecs/task_execution_data_source_test.go +++ b/internal/service/ecs/task_execution_data_source_test.go @@ -69,7 +69,7 @@ func TestAccECSTaskExecutionDataSource_overrides(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccTaskExecutionDataSourceConfig_overrides(rName, "key1", "value1"), + Config: testAccTaskExecutionDataSourceConfig_overrides(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, "cluster", clusterName, names.AttrID), resource.TestCheckResourceAttrPair(dataSourceName, "task_definition", taskDefinitionName, names.AttrARN), @@ -80,8 +80,8 @@ func TestAccECSTaskExecutionDataSource_overrides(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, "overrides.#", acctest.CtOne), resource.TestCheckResourceAttr(dataSourceName, "overrides.0.container_overrides.#", acctest.CtOne), resource.TestCheckResourceAttr(dataSourceName, "overrides.0.container_overrides.0.environment.#", acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "overrides.0.container_overrides.0.environment.0.key", "key1"), - resource.TestCheckResourceAttr(dataSourceName, "overrides.0.container_overrides.0.environment.0.value", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "overrides.0.container_overrides.0.environment.0.key", acctest.CtKey1), + resource.TestCheckResourceAttr(dataSourceName, "overrides.0.container_overrides.0.environment.0.value", acctest.CtValue1), ), }, }, @@ -108,7 +108,7 @@ func TestAccECSTaskExecutionDataSource_tags(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccTaskExecutionDataSourceConfig_tags(rName, "key1", "value1"), + Config: testAccTaskExecutionDataSourceConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, "cluster", clusterName, names.AttrID), resource.TestCheckResourceAttrPair(dataSourceName, "task_definition", taskDefinitionName, names.AttrARN), @@ -117,7 +117,7 @@ func TestAccECSTaskExecutionDataSource_tags(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, "network_configuration.#", acctest.CtOne), resource.TestCheckResourceAttr(dataSourceName, "task_arns.#", acctest.CtOne), resource.TestCheckResourceAttr(dataSourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/ecs/task_set_test.go b/internal/service/ecs/task_set_test.go index bdd01b38a3f..7d9ddf9d787 100644 --- a/internal/service/ecs/task_set_test.go +++ b/internal/service/ecs/task_set_test.go @@ -354,11 +354,11 @@ func TestAccECSTaskSet_tags(t *testing.T) { CheckDestroy: testAccCheckTaskSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTaskSetConfig_tags1(rName, "key1", "value1"), + Config: testAccTaskSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTaskSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -370,20 +370,20 @@ func TestAccECSTaskSet_tags(t *testing.T) { }, }, { - Config: testAccTaskSetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTaskSetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTaskSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTaskSetConfig_tags1(rName, "key2", "value2"), + Config: testAccTaskSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTaskSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f4b0893f30667eb5726cd983cfe9e8146d7d6332 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:40 -0400 Subject: [PATCH 071/180] efs: Use constants for test strings --- internal/service/efs/access_point_test.go | 12 ++++++------ internal/service/efs/file_system_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/efs/access_point_test.go b/internal/service/efs/access_point_test.go index 11a292b982b..551eb886209 100644 --- a/internal/service/efs/access_point_test.go +++ b/internal/service/efs/access_point_test.go @@ -194,11 +194,11 @@ func TestAccEFSAccessPoint_tags(t *testing.T) { CheckDestroy: testAccCheckAccessPointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccessPointConfig_tags1(rName, "key1", "value1"), + Config: testAccAccessPointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessPointExists(ctx, resourceName, &ap), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -207,20 +207,20 @@ func TestAccEFSAccessPoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAccessPointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAccessPointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessPointExists(ctx, resourceName, &ap), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccessPointConfig_tags1(rName, "key2", "value2"), + Config: testAccAccessPointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessPointExists(ctx, resourceName, &ap), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/efs/file_system_test.go b/internal/service/efs/file_system_test.go index 0bbff9aab3d..7404a46efa3 100644 --- a/internal/service/efs/file_system_test.go +++ b/internal/service/efs/file_system_test.go @@ -190,11 +190,11 @@ func TestAccEFSFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckFileSystemDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFileSystem(ctx, resourceName, &desc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -203,20 +203,20 @@ func TestAccEFSFileSystem_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFileSystem(ctx, resourceName, &desc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFileSystemConfig_tags1(rName, "key2", "value2"), + Config: testAccFileSystemConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFileSystem(ctx, resourceName, &desc), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { From c1c65290725020faf6e321cd0a91d154b399c406 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:40 -0400 Subject: [PATCH 072/180] eks: Use constants for test strings --- internal/service/eks/access_entry_test.go | 12 ++--- internal/service/eks/addon_test.go | 12 ++--- internal/service/eks/cluster_test.go | 12 ++--- internal/service/eks/fargate_profile_test.go | 14 +++--- .../eks/identity_provider_config_test.go | 12 ++--- internal/service/eks/node_group_test.go | 46 +++++++++---------- .../eks/pod_identity_association_test.go | 12 ++--- 7 files changed, 60 insertions(+), 60 deletions(-) diff --git a/internal/service/eks/access_entry_test.go b/internal/service/eks/access_entry_test.go index 4970c4e4614..d4623cde3fc 100644 --- a/internal/service/eks/access_entry_test.go +++ b/internal/service/eks/access_entry_test.go @@ -143,11 +143,11 @@ func TestAccEKSAccessEntry_tags(t *testing.T) { CheckDestroy: testAccCheckAccessEntryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccessEntryConfig_tags1(rName, "key1", "value1"), + Config: testAccAccessEntryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessEntryExists(ctx, resourceName, &accessentry), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -156,20 +156,20 @@ func TestAccEKSAccessEntry_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAccessEntryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAccessEntryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessEntryExists(ctx, resourceName, &accessentry), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccessEntryConfig_tags1(rName, "key2", "value2"), + Config: testAccAccessEntryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessEntryExists(ctx, resourceName, &accessentry), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/eks/addon_test.go b/internal/service/eks/addon_test.go index f9518c5b8ac..09ae5abb000 100644 --- a/internal/service/eks/addon_test.go +++ b/internal/service/eks/addon_test.go @@ -365,11 +365,11 @@ func TestAccEKSAddon_tags(t *testing.T) { CheckDestroy: testAccCheckAddonDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAddonConfig_tags1(rName, addonName, "key1", "value1"), + Config: testAccAddonConfig_tags1(rName, addonName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAddonExists(ctx, resourceName, &addon1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -378,20 +378,20 @@ func TestAccEKSAddon_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAddonConfig_tags2(rName, addonName, "key1", "value1updated", "key2", "value2"), + Config: testAccAddonConfig_tags2(rName, addonName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAddonExists(ctx, resourceName, &addon2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAddonConfig_tags1(rName, addonName, "key2", "value2"), + Config: testAccAddonConfig_tags1(rName, addonName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAddonExists(ctx, resourceName, &addon3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/eks/cluster_test.go b/internal/service/eks/cluster_test.go index 65e8bfbf408..15374cc3a46 100644 --- a/internal/service/eks/cluster_test.go +++ b/internal/service/eks/cluster_test.go @@ -401,11 +401,11 @@ func TestAccEKSCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -414,20 +414,20 @@ func TestAccEKSCluster_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/eks/fargate_profile_test.go b/internal/service/eks/fargate_profile_test.go index 88e555fca65..f3576ed93b7 100644 --- a/internal/service/eks/fargate_profile_test.go +++ b/internal/service/eks/fargate_profile_test.go @@ -134,7 +134,7 @@ func TestAccEKSFargateProfile_Selector_labels(t *testing.T) { CheckDestroy: testAccCheckFargateProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFargateProfileConfig_selectorLabels1(rName, "key1", "value1"), + Config: testAccFargateProfileConfig_selectorLabels1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFargateProfileExists(ctx, resourceName, &fargateProfile1), ), @@ -165,11 +165,11 @@ func TestAccEKSFargateProfile_tags(t *testing.T) { CheckDestroy: testAccCheckFargateProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFargateProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccFargateProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFargateProfileExists(ctx, resourceName, &fargateProfile1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -178,20 +178,20 @@ func TestAccEKSFargateProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFargateProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFargateProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFargateProfileExists(ctx, resourceName, &fargateProfile2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFargateProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccFargateProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFargateProfileExists(ctx, resourceName, &fargateProfile3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/eks/identity_provider_config_test.go b/internal/service/eks/identity_provider_config_test.go index 23079db902a..70b7e792f04 100644 --- a/internal/service/eks/identity_provider_config_test.go +++ b/internal/service/eks/identity_provider_config_test.go @@ -139,11 +139,11 @@ func TestAccEKSIdentityProviderConfig_tags(t *testing.T) { CheckDestroy: testAccCheckIdentityProviderConfigDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIdentityProviderConfigConfig_tags1(rName, "key1", "value1"), + Config: testAccIdentityProviderConfigConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIdentityProviderExistsConfig(ctx, resourceName, &config), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -152,20 +152,20 @@ func TestAccEKSIdentityProviderConfig_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIdentityProviderConfigConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccIdentityProviderConfigConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIdentityProviderExistsConfig(ctx, resourceName, &config), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIdentityProviderConfigConfig_tags1(rName, "key2", "value2"), + Config: testAccIdentityProviderConfigConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIdentityProviderExistsConfig(ctx, resourceName, &config), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/eks/node_group_test.go b/internal/service/eks/node_group_test.go index 2e0f033371b..1ec373a4afd 100644 --- a/internal/service/eks/node_group_test.go +++ b/internal/service/eks/node_group_test.go @@ -361,11 +361,11 @@ func TestAccEKSNodeGroup_labels(t *testing.T) { CheckDestroy: testAccCheckNodeGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNodeGroupConfig_labels1(rName, "key1", "value1"), + Config: testAccNodeGroupConfig_labels1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup1), resource.TestCheckResourceAttr(resourceName, "labels.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "labels.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "labels.key1", acctest.CtValue1), ), }, { @@ -374,20 +374,20 @@ func TestAccEKSNodeGroup_labels(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNodeGroupConfig_labels2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNodeGroupConfig_labels2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup2), resource.TestCheckResourceAttr(resourceName, "labels.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "labels.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "labels.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "labels.key2", acctest.CtValue2), ), }, { - Config: testAccNodeGroupConfig_labels1(rName, "key2", "value2"), + Config: testAccNodeGroupConfig_labels1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup3), resource.TestCheckResourceAttr(resourceName, "labels.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "labels.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "labels.key2", acctest.CtValue2), ), }, }, @@ -809,11 +809,11 @@ func TestAccEKSNodeGroup_tags(t *testing.T) { CheckDestroy: testAccCheckNodeGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNodeGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccNodeGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -822,22 +822,22 @@ func TestAccEKSNodeGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNodeGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNodeGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup2), testAccCheckNodeGroupNotRecreated(&nodeGroup1, &nodeGroup2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNodeGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccNodeGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup3), testAccCheckNodeGroupNotRecreated(&nodeGroup2, &nodeGroup3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -857,13 +857,13 @@ func TestAccEKSNodeGroup_taints(t *testing.T) { CheckDestroy: testAccCheckNodeGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNodeGroupConfig_taints1(rName, "key1", "value1", "NO_SCHEDULE"), + Config: testAccNodeGroupConfig_taints1(rName, acctest.CtKey1, acctest.CtValue1, "NO_SCHEDULE"), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup1), resource.TestCheckResourceAttr(resourceName, "taint.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "taint.*", map[string]string{ - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, "effect": "NO_SCHEDULE", }), ), @@ -875,31 +875,31 @@ func TestAccEKSNodeGroup_taints(t *testing.T) { }, { Config: testAccNodeGroupConfig_taints2(rName, - "key1", "value1updated", "NO_EXECUTE", - "key2", "value2", "NO_SCHEDULE"), + acctest.CtKey1, "value1updated", "NO_EXECUTE", + acctest.CtKey2, acctest.CtValue2, "NO_SCHEDULE"), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup1), resource.TestCheckResourceAttr(resourceName, "taint.#", acctest.CtTwo), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "taint.*", map[string]string{ - names.AttrKey: "key1", + names.AttrKey: acctest.CtKey1, names.AttrValue: "value1updated", "effect": "NO_EXECUTE", }), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "taint.*", map[string]string{ - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, "effect": "NO_SCHEDULE", }), ), }, { - Config: testAccNodeGroupConfig_taints1(rName, "key2", "value2", "NO_SCHEDULE"), + Config: testAccNodeGroupConfig_taints1(rName, acctest.CtKey2, acctest.CtValue2, "NO_SCHEDULE"), Check: resource.ComposeTestCheckFunc( testAccCheckNodeGroupExists(ctx, resourceName, &nodeGroup1), resource.TestCheckResourceAttr(resourceName, "taint.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "taint.*", map[string]string{ - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, "effect": "NO_SCHEDULE", }), ), diff --git a/internal/service/eks/pod_identity_association_test.go b/internal/service/eks/pod_identity_association_test.go index 5afc2af070a..9fe87ff0f1c 100644 --- a/internal/service/eks/pod_identity_association_test.go +++ b/internal/service/eks/pod_identity_association_test.go @@ -103,11 +103,11 @@ func TestAccEKSPodIdentityAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckPodIdentityAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPodIdentityAssociationConfig_tags1(rName, "key1", "value1"), + Config: testAccPodIdentityAssociationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPodIdentityAssociationExists(ctx, resourceName, &podidentityassociation), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,20 +117,20 @@ func TestAccEKSPodIdentityAssociation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPodIdentityAssociationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPodIdentityAssociationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPodIdentityAssociationExists(ctx, resourceName, &podidentityassociation), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPodIdentityAssociationConfig_tags1(rName, "key2", "value2"), + Config: testAccPodIdentityAssociationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPodIdentityAssociationExists(ctx, resourceName, &podidentityassociation), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 97c64446e09fdc242283908782a6b787505e52d4 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:40 -0400 Subject: [PATCH 073/180] elasticache: Use constants for test strings --- internal/service/elasticache/cluster_test.go | 26 +++++++++---------- .../elasticache/parameter_group_test.go | 8 +++--- .../elasticache/replication_group_test.go | 22 ++++++++-------- .../elasticache/serverless_cache_test.go | 8 +++--- .../service/elasticache/subnet_group_test.go | 12 ++++----- .../service/elasticache/user_group_test.go | 12 ++++----- internal/service/elasticache/user_test.go | 8 +++--- 7 files changed, 48 insertions(+), 48 deletions(-) diff --git a/internal/service/elasticache/cluster_test.go b/internal/service/elasticache/cluster_test.go index 43febb72d2d..043ce7f11b3 100644 --- a/internal/service/elasticache/cluster_test.go +++ b/internal/service/elasticache/cluster_test.go @@ -1187,13 +1187,13 @@ func TestAccElastiCacheCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1203,25 +1203,25 @@ func TestAccElastiCacheCluster_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrApplyImmediately}, //not in the API }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, }, @@ -1245,18 +1245,18 @@ func TestAccElastiCacheCluster_tagWithOtherModification(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_versionAndTag(rName, "5.0.4", "key1", "value1"), + Config: testAccClusterConfig_versionAndTag(rName, "5.0.4", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, names.AttrEngineVersion, "5.0.4"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { - Config: testAccClusterConfig_versionAndTag(rName, "5.0.6", "key1", "value1updated"), + Config: testAccClusterConfig_versionAndTag(rName, "5.0.6", acctest.CtKey1, "value1updated"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, names.AttrEngineVersion, "5.0.6"), diff --git a/internal/service/elasticache/parameter_group_test.go b/internal/service/elasticache/parameter_group_test.go index 7ef143de37f..7cbfb4d08bd 100644 --- a/internal/service/elasticache/parameter_group_test.go +++ b/internal/service/elasticache/parameter_group_test.go @@ -414,20 +414,20 @@ func TestAccElastiCacheParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterGroupConfig_tags1(rName, "redis2.8", "key1", "value1"), + Config: testAccParameterGroupConfig_tags1(rName, "redis2.8", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &cacheParameterGroup1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccParameterGroupConfig_tags2(rName, "redis2.8", "key1", "updatedvalue1", "key2", "value2"), + Config: testAccParameterGroupConfig_tags2(rName, "redis2.8", acctest.CtKey1, "updatedvalue1", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &cacheParameterGroup1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "updatedvalue1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/elasticache/replication_group_test.go b/internal/service/elasticache/replication_group_test.go index a88a16d0572..c303f5b0720 100644 --- a/internal/service/elasticache/replication_group_test.go +++ b/internal/service/elasticache/replication_group_test.go @@ -2045,11 +2045,11 @@ func TestAccElastiCacheReplicationGroup_tags(t *testing.T) { CheckDestroy: testAccCheckReplicationGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicationGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccReplicationGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), testAccReplicationGroupCheckMemberClusterTags(resourceName, clusterDataSourcePrefix, 2, []kvp{ - {"key1", "value1"}, + {acctest.CtKey1, acctest.CtValue1}, }), ), }, @@ -2060,21 +2060,21 @@ func TestAccElastiCacheReplicationGroup_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "auth_token_update_strategy"}, }, { - Config: testAccReplicationGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReplicationGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), testAccReplicationGroupCheckMemberClusterTags(resourceName, clusterDataSourcePrefix, 2, []kvp{ - {"key1", "value1updated"}, - {"key2", "value2"}, + {acctest.CtKey1, "value1updated"}, + {acctest.CtKey2, acctest.CtValue2}, }), ), }, { - Config: testAccReplicationGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccReplicationGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), testAccReplicationGroupCheckMemberClusterTags(resourceName, clusterDataSourcePrefix, 2, []kvp{ - {"key2", "value2"}, + {acctest.CtKey2, acctest.CtValue2}, }), ), }, @@ -2100,22 +2100,22 @@ func TestAccElastiCacheReplicationGroup_tagWithOtherModification(t *testing.T) { CheckDestroy: testAccCheckReplicationGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicationGroupConfig_versionAndTag(rName, "5.0.4", "key1", "value1"), + Config: testAccReplicationGroupConfig_versionAndTag(rName, "5.0.4", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), resource.TestCheckResourceAttr(resourceName, names.AttrEngineVersion, "5.0.4"), testAccReplicationGroupCheckMemberClusterTags(resourceName, clusterDataSourcePrefix, 2, []kvp{ - {"key1", "value1"}, + {acctest.CtKey1, acctest.CtValue1}, }), ), }, { - Config: testAccReplicationGroupConfig_versionAndTag(rName, "5.0.6", "key1", "value1updated"), + Config: testAccReplicationGroupConfig_versionAndTag(rName, "5.0.6", acctest.CtKey1, "value1updated"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), resource.TestCheckResourceAttr(resourceName, names.AttrEngineVersion, "5.0.6"), testAccReplicationGroupCheckMemberClusterTags(resourceName, clusterDataSourcePrefix, 2, []kvp{ - {"key1", "value1updated"}, + {acctest.CtKey1, "value1updated"}, }), ), }, diff --git a/internal/service/elasticache/serverless_cache_test.go b/internal/service/elasticache/serverless_cache_test.go index 6c306e8de64..9eec2a9a792 100644 --- a/internal/service/elasticache/serverless_cache_test.go +++ b/internal/service/elasticache/serverless_cache_test.go @@ -391,7 +391,7 @@ func TestAccElastiCacheServerlessCache_tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckServerlessCacheExists(ctx, resourceName, &serverlessElasticCache), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -399,8 +399,8 @@ func TestAccElastiCacheServerlessCache_tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckServerlessCacheExists(ctx, resourceName, &serverlessElasticCache), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -408,7 +408,7 @@ func TestAccElastiCacheServerlessCache_tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckServerlessCacheExists(ctx, resourceName, &serverlessElasticCache), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/elasticache/subnet_group_test.go b/internal/service/elasticache/subnet_group_test.go index 3975f76d458..271a1ba5991 100644 --- a/internal/service/elasticache/subnet_group_test.go +++ b/internal/service/elasticache/subnet_group_test.go @@ -89,11 +89,11 @@ func TestAccElastiCacheSubnetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckSubnetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSubnetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &csg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func TestAccElastiCacheSubnetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSubnetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &csg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSubnetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &csg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/elasticache/user_group_test.go b/internal/service/elasticache/user_group_test.go index ba228c30e5a..3845ded2eac 100644 --- a/internal/service/elasticache/user_group_test.go +++ b/internal/service/elasticache/user_group_test.go @@ -105,28 +105,28 @@ func TestAccElastiCacheUserGroup_tags(t *testing.T) { CheckDestroy: testAccCheckUserGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUserGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccUserGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUserGroupExists(ctx, resourceName, &userGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccUserGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUserGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserGroupExists(ctx, resourceName, &userGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUserGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccUserGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserGroupExists(ctx, resourceName, &userGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/elasticache/user_test.go b/internal/service/elasticache/user_test.go index 48fd42d6298..0adb5624a5b 100644 --- a/internal/service/elasticache/user_test.go +++ b/internal/service/elasticache/user_test.go @@ -319,16 +319,16 @@ func TestAccElastiCacheUser_oobModify(t *testing.T) { CheckDestroy: testAccCheckUserDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUserConfig_tags(rName, "key1", "value1"), + Config: testAccUserConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &user), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, // Start to update the user out-of-band. { - Config: testAccUserConfig_tags(rName, "key1", "value1"), + Config: testAccUserConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUserUpdateOOB(ctx, &user), ), @@ -336,7 +336,7 @@ func TestAccElastiCacheUser_oobModify(t *testing.T) { }, // Update tags. { - Config: testAccUserConfig_tags(rName, "key1", "value1updated"), + Config: testAccUserConfig_tags(rName, acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &user), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), From 1075997e8fc63babc7fef61ca291fa98a5ff1c6d Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:41 -0400 Subject: [PATCH 074/180] elasticbeanstalk: Use constants for test strings --- .../service/elasticbeanstalk/application_test.go | 12 ++++++------ .../service/elasticbeanstalk/environment_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/elasticbeanstalk/application_test.go b/internal/service/elasticbeanstalk/application_test.go index bba27716c74..0e2669d7b04 100644 --- a/internal/service/elasticbeanstalk/application_test.go +++ b/internal/service/elasticbeanstalk/application_test.go @@ -88,11 +88,11 @@ func TestAccElasticBeanstalkApplication_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -101,20 +101,20 @@ func TestAccElasticBeanstalkApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/elasticbeanstalk/environment_test.go b/internal/service/elasticbeanstalk/environment_test.go index 9dc3b8a0371..03d7cb6f906 100644 --- a/internal/service/elasticbeanstalk/environment_test.go +++ b/internal/service/elasticbeanstalk/environment_test.go @@ -250,11 +250,11 @@ func TestAccElasticBeanstalkEnvironment_tags(t *testing.T) { CheckDestroy: testAccCheckEnvironmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEnvironmentConfig_tags1(rName, "key1", "value1"), + Config: testAccEnvironmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -267,20 +267,20 @@ func TestAccElasticBeanstalkEnvironment_tags(t *testing.T) { }, }, { - Config: testAccEnvironmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEnvironmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEnvironmentConfig_tags1(rName, "key2", "value2"), + Config: testAccEnvironmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From bf2c09ad2cc9bbf7e23a0b5c7496fbe910256ffa Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:41 -0400 Subject: [PATCH 075/180] elasticsearch: Use constants for test strings --- internal/service/elasticsearch/domain_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/elasticsearch/domain_test.go b/internal/service/elasticsearch/domain_test.go index c38a800f6f3..78cd95d4391 100644 --- a/internal/service/elasticsearch/domain_test.go +++ b/internal/service/elasticsearch/domain_test.go @@ -1354,11 +1354,11 @@ func TestAccElasticsearchDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1368,20 +1368,20 @@ func TestAccElasticsearchDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags1(rName, "key2", "value2"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 8594883b8a8840f8e149a4fefddef92f4be6ece3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:41 -0400 Subject: [PATCH 076/180] elb: Use constants for test strings --- internal/service/elb/load_balancer_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/elb/load_balancer_test.go b/internal/service/elb/load_balancer_test.go index 7ee69bd1456..6a23be6aac0 100644 --- a/internal/service/elb/load_balancer_test.go +++ b/internal/service/elb/load_balancer_test.go @@ -387,12 +387,12 @@ func TestAccELBLoadBalancer_tags(t *testing.T) { CheckDestroy: testAccCheckLoadBalancerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", "value1"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), testAccCheckLoadBalancerAttributes(&conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -401,22 +401,22 @@ func TestAccELBLoadBalancer_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLoadBalancerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLoadBalancerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), testAccCheckLoadBalancerAttributes(&conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLoadBalancerConfig_tags1(rName, "key2", "value2"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), testAccCheckLoadBalancerAttributes(&conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From a4f6febd0ed8b444e64ff898e56f8e3cc73e8122 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:41 -0400 Subject: [PATCH 077/180] elbv2: Use constants for test strings --- internal/service/elbv2/listener_rule_test.go | 12 ++++----- internal/service/elbv2/listener_test.go | 12 ++++----- internal/service/elbv2/load_balancer_test.go | 28 ++++++++++---------- internal/service/elbv2/target_group_test.go | 12 ++++----- internal/service/elbv2/trust_store_test.go | 12 ++++----- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/internal/service/elbv2/listener_rule_test.go b/internal/service/elbv2/listener_rule_test.go index 6ed12681486..e4425ad2fb0 100644 --- a/internal/service/elbv2/listener_rule_test.go +++ b/internal/service/elbv2/listener_rule_test.go @@ -153,28 +153,28 @@ func TestAccELBV2ListenerRule_tags(t *testing.T) { CheckDestroy: testAccCheckListenerRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccListenerRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccListenerRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckListenerRuleExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccListenerRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccListenerRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckListenerRuleExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccListenerRuleConfig_tags1(rName, "key2", "value2"), + Config: testAccListenerRuleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckListenerRuleExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/elbv2/listener_test.go b/internal/service/elbv2/listener_test.go index 4d1ba29e2f7..aa36bb5c69e 100644 --- a/internal/service/elbv2/listener_test.go +++ b/internal/service/elbv2/listener_test.go @@ -220,11 +220,11 @@ func TestAccELBV2Listener_tags(t *testing.T) { CheckDestroy: testAccCheckListenerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccListenerConfig_tags1(rName, "key1", "value1"), + Config: testAccListenerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckListenerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -236,12 +236,12 @@ func TestAccELBV2Listener_tags(t *testing.T) { }, }, { - Config: testAccListenerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccListenerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckListenerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -253,11 +253,11 @@ func TestAccELBV2Listener_tags(t *testing.T) { }, }, { - Config: testAccListenerConfig_tags1(rName, "key2", "value2"), + Config: testAccListenerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckListenerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/elbv2/load_balancer_test.go b/internal/service/elbv2/load_balancer_test.go index 2f5ddd3b804..6e960118938 100644 --- a/internal/service/elbv2/load_balancer_test.go +++ b/internal/service/elbv2/load_balancer_test.go @@ -344,28 +344,28 @@ func TestAccELBV2LoadBalancer_tags(t *testing.T) { CheckDestroy: testAccCheckLoadBalancerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", "value1"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccLoadBalancerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLoadBalancerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLoadBalancerConfig_tags1(rName, "key2", "value2"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -385,7 +385,7 @@ func TestAccELBV2LoadBalancer_Tags_EmptyTag_OnCreate(t *testing.T) { CheckDestroy: testAccCheckLoadBalancerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", ""), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -414,19 +414,19 @@ func TestAccELBV2LoadBalancer_Tags_EmptyTag_OnUpdate_Add(t *testing.T) { CheckDestroy: testAccCheckLoadBalancerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", "value1"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccLoadBalancerConfig_tags2(rName, "key1", "value1", "key2", ""), + Config: testAccLoadBalancerConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -452,15 +452,15 @@ func TestAccELBV2LoadBalancer_Tags_EmptyTag_OnUpdate_Replace(t *testing.T) { CheckDestroy: testAccCheckLoadBalancerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", "value1"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", ""), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), diff --git a/internal/service/elbv2/target_group_test.go b/internal/service/elbv2/target_group_test.go index dc7aa253123..61301980a88 100644 --- a/internal/service/elbv2/target_group_test.go +++ b/internal/service/elbv2/target_group_test.go @@ -283,28 +283,28 @@ func TestAccELBV2TargetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckTargetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTargetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccTargetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckTargetGroupExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccTargetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTargetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckTargetGroupExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTargetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccTargetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckTargetGroupExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/elbv2/trust_store_test.go b/internal/service/elbv2/trust_store_test.go index 7c2d6b584b7..c1c38e62ad8 100644 --- a/internal/service/elbv2/trust_store_test.go +++ b/internal/service/elbv2/trust_store_test.go @@ -146,11 +146,11 @@ func TestAccELBV2TrustStore_tags(t *testing.T) { CheckDestroy: testAccCheckTrustStoreDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTrustStoreConfig_tags1(rName, "key1", "value1"), + Config: testAccTrustStoreConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrustStoreExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -159,20 +159,20 @@ func TestAccELBV2TrustStore_tags(t *testing.T) { ImportStateVerify: false, }, { - Config: testAccTrustStoreConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTrustStoreConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrustStoreExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTrustStoreConfig_tags1(rName, "key2", "value2"), + Config: testAccTrustStoreConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrustStoreExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f83b7a14e347c74cb3e95c99a42e18ee121937b2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:41 -0400 Subject: [PATCH 078/180] emr: Use constants for test strings --- internal/service/emr/studio_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/emr/studio_test.go b/internal/service/emr/studio_test.go index c218e44594b..fa1e55c91c2 100644 --- a/internal/service/emr/studio_test.go +++ b/internal/service/emr/studio_test.go @@ -150,11 +150,11 @@ func TestAccEMRStudio_tags(t *testing.T) { CheckDestroy: testAccCheckStudioDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStudioConfig_tags1(rName, "key1", "value1"), + Config: testAccStudioConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStudioExists(ctx, resourceName, &studio), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -163,20 +163,20 @@ func TestAccEMRStudio_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStudioConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStudioConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStudioExists(ctx, resourceName, &studio), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStudioConfig_tags1(rName, "key2", "value2"), + Config: testAccStudioConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStudioExists(ctx, resourceName, &studio), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 61b992d5ea6d4ab0b7809afee38ad7e434d35cf2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:41 -0400 Subject: [PATCH 079/180] emrcontainers: Use constants for test strings --- internal/service/emrcontainers/job_template_test.go | 4 ++-- .../service/emrcontainers/virtual_cluster_test.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/service/emrcontainers/job_template_test.go b/internal/service/emrcontainers/job_template_test.go index 8b95caf8613..6e9a417e53a 100644 --- a/internal/service/emrcontainers/job_template_test.go +++ b/internal/service/emrcontainers/job_template_test.go @@ -97,11 +97,11 @@ func TestAccEMRContainersJobTemplate_tags(t *testing.T) { CheckDestroy: testAccCheckJobTemplateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccJobTemplateConfig_tags1(rName, "key1", "value1"), + Config: testAccJobTemplateConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckJobTemplateExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { diff --git a/internal/service/emrcontainers/virtual_cluster_test.go b/internal/service/emrcontainers/virtual_cluster_test.go index 8b9dd9b9e4d..8aaa403a1ea 100644 --- a/internal/service/emrcontainers/virtual_cluster_test.go +++ b/internal/service/emrcontainers/virtual_cluster_test.go @@ -132,28 +132,28 @@ func TestAccEMRContainersVirtualCluster_tags(t *testing.T) { CheckDestroy: testAccCheckVirtualClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVirtualClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccVirtualClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVirtualClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVirtualClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVirtualClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccVirtualClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVirtualClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 59439fc3ef8d5afaa87575d28e8b2d389492ecb5 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:42 -0400 Subject: [PATCH 080/180] emrserverless: Use constants for test strings --- internal/service/emrserverless/application_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/emrserverless/application_test.go b/internal/service/emrserverless/application_test.go index d8ec5ec8954..56860fd1ee5 100644 --- a/internal/service/emrserverless/application_test.go +++ b/internal/service/emrserverless/application_test.go @@ -336,11 +336,11 @@ func TestAccEMRServerlessApplication_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -349,20 +349,20 @@ func TestAccEMRServerlessApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From eecab0c0e5730f182c41f1f541e289fbda0abacb Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:42 -0400 Subject: [PATCH 081/180] events: Use constants for test strings --- internal/service/events/bus_test.go | 12 ++++++------ internal/service/events/rule_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/events/bus_test.go b/internal/service/events/bus_test.go index e6161036a43..025992d06e0 100644 --- a/internal/service/events/bus_test.go +++ b/internal/service/events/bus_test.go @@ -87,11 +87,11 @@ func TestAccEventsBus_tags(t *testing.T) { CheckDestroy: testAccCheckBusDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBusConfig_tags1(busName, "key1", "value1"), + Config: testAccBusConfig_tags1(busName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBusExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,22 +100,22 @@ func TestAccEventsBus_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBusConfig_tags2(busName, "key1", "value1updated", "key2", "value2"), + Config: testAccBusConfig_tags2(busName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBusExists(ctx, resourceName, &v2), testAccCheckBusNotRecreated(&v1, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBusConfig_tags1(busName, "key2", "value2"), + Config: testAccBusConfig_tags1(busName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBusExists(ctx, resourceName, &v3), testAccCheckBusNotRecreated(&v2, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/events/rule_test.go b/internal/service/events/rule_test.go index c58f8bb057d..59cc3c68e77 100644 --- a/internal/service/events/rule_test.go +++ b/internal/service/events/rule_test.go @@ -558,11 +558,11 @@ func TestAccEventsRule_tags(t *testing.T) { CheckDestroy: testAccCheckRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -572,20 +572,20 @@ func TestAccEventsRule_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrForceDestroy}, }, { - Config: testAccRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleConfig_tags1(rName, "key2", "value2"), + Config: testAccRuleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 74a04418949aacf8ef32ba42f6fb983c9a551b71 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:42 -0400 Subject: [PATCH 082/180] evidently: Use constants for test strings --- internal/service/evidently/feature_test.go | 12 ++++++------ internal/service/evidently/launch_test.go | 12 ++++++------ internal/service/evidently/segment_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/evidently/feature_test.go b/internal/service/evidently/feature_test.go index 2c2d35c40dd..ab1fe304d04 100644 --- a/internal/service/evidently/feature_test.go +++ b/internal/service/evidently/feature_test.go @@ -559,11 +559,11 @@ func TestAccEvidentlyFeature_tags(t *testing.T) { CheckDestroy: testAccCheckFeatureDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFeatureConfig_tags1(rName, rName2, "key1", "value1"), + Config: testAccFeatureConfig_tags1(rName, rName2, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFeatureExists(ctx, resourceName, &feature), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -572,20 +572,20 @@ func TestAccEvidentlyFeature_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFeatureConfig_tags2(rName, rName2, "key1", "value1updated", "key2", "value2"), + Config: testAccFeatureConfig_tags2(rName, rName2, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFeatureExists(ctx, resourceName, &feature), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFeatureConfig_tags1(rName, rName2, "key2", "value2"), + Config: testAccFeatureConfig_tags1(rName, rName2, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFeatureExists(ctx, resourceName, &feature), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/evidently/launch_test.go b/internal/service/evidently/launch_test.go index 15ee6072204..1346ffabfa0 100644 --- a/internal/service/evidently/launch_test.go +++ b/internal/service/evidently/launch_test.go @@ -556,11 +556,11 @@ func TestAccEvidentlyLaunch_tags(t *testing.T) { CheckDestroy: testAccCheckLaunchDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLaunchConfig_tags1(rName, rName2, rName3, startTime, "key1", "value1"), + Config: testAccLaunchConfig_tags1(rName, rName2, rName3, startTime, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLaunchExists(ctx, resourceName, &launch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -569,20 +569,20 @@ func TestAccEvidentlyLaunch_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLaunchConfig_tags2(rName, rName2, rName3, startTime, "key1", "value1updated", "key2", "value2"), + Config: testAccLaunchConfig_tags2(rName, rName2, rName3, startTime, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLaunchExists(ctx, resourceName, &launch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLaunchConfig_tags1(rName, rName2, rName3, startTime, "key2", "value2"), + Config: testAccLaunchConfig_tags1(rName, rName2, rName3, startTime, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLaunchExists(ctx, resourceName, &launch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/evidently/segment_test.go b/internal/service/evidently/segment_test.go index a659e6dd080..c4698c95e29 100644 --- a/internal/service/evidently/segment_test.go +++ b/internal/service/evidently/segment_test.go @@ -142,11 +142,11 @@ func TestAccEvidentlySegment_tags(t *testing.T) { CheckDestroy: testAccCheckSegmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSegmentConfig_tags1(rName, "key1", "value1"), + Config: testAccSegmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSegmentExists(ctx, resourceName, &segment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -155,12 +155,12 @@ func TestAccEvidentlySegment_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSegmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSegmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSegmentExists(ctx, resourceName, &segment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -169,11 +169,11 @@ func TestAccEvidentlySegment_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSegmentConfig_tags1(rName, "key2", "value2"), + Config: testAccSegmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSegmentExists(ctx, resourceName, &segment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 8aa80969606e80a1b2e2c606047942902876c181 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:42 -0400 Subject: [PATCH 083/180] finspace: Use constants for test strings --- internal/service/finspace/kx_cluster_test.go | 20 +++++++++---------- internal/service/finspace/kx_database_test.go | 14 ++++++------- internal/service/finspace/kx_dataview_test.go | 12 +++++------ .../service/finspace/kx_environment_test.go | 14 ++++++------- .../service/finspace/kx_scaling_group_test.go | 12 +++++------ internal/service/finspace/kx_user_test.go | 14 ++++++------- internal/service/finspace/kx_volume_test.go | 12 +++++------ 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/internal/service/finspace/kx_cluster_test.go b/internal/service/finspace/kx_cluster_test.go index 3a6a58f4a3f..f0a2bc6cab2 100644 --- a/internal/service/finspace/kx_cluster_test.go +++ b/internal/service/finspace/kx_cluster_test.go @@ -506,20 +506,20 @@ func TestAccFinSpaceKxCluster_commandLineArgs(t *testing.T) { CheckDestroy: testAccCheckKxClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxClusterConfig_commandLineArgs(rName, "arg1", "value1", codePath), + Config: testAccKxClusterConfig_commandLineArgs(rName, "arg1", acctest.CtValue1, codePath), Check: resource.ComposeTestCheckFunc( testAccCheckKxClusterExists(ctx, resourceName, &kxcluster), resource.TestCheckResourceAttr(resourceName, "command_line_arguments.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "command_line_arguments.arg1", "value1"), + resource.TestCheckResourceAttr(resourceName, "command_line_arguments.arg1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, string(types.KxClusterStatusRunning)), ), }, { - Config: testAccKxClusterConfig_commandLineArgs(rName, "arg1", "value2", codePath), + Config: testAccKxClusterConfig_commandLineArgs(rName, "arg1", acctest.CtValue2, codePath), Check: resource.ComposeTestCheckFunc( testAccCheckKxClusterExists(ctx, resourceName, &kxcluster), resource.TestCheckResourceAttr(resourceName, "command_line_arguments.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "command_line_arguments.arg1", "value2"), + resource.TestCheckResourceAttr(resourceName, "command_line_arguments.arg1", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, string(types.KxClusterStatusRunning)), ), }, @@ -548,28 +548,28 @@ func TestAccFinSpaceKxCluster_tags(t *testing.T) { CheckDestroy: testAccCheckKxClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccKxClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxClusterExists(ctx, resourceName, &kxcluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccKxClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccKxClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxClusterExists(ctx, resourceName, &kxcluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccKxClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxClusterExists(ctx, resourceName, &kxcluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/finspace/kx_database_test.go b/internal/service/finspace/kx_database_test.go index 81b2fadb5c5..61bc6858e35 100644 --- a/internal/service/finspace/kx_database_test.go +++ b/internal/service/finspace/kx_database_test.go @@ -145,28 +145,28 @@ func TestAccFinSpaceKxDatabase_tags(t *testing.T) { CheckDestroy: testAccCheckKxDatabaseDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxDatabaseConfig_tags1(rName, "key1", "value1"), + Config: testAccKxDatabaseConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxDatabaseExists(ctx, resourceName, &kxdatabase), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccKxDatabaseConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccKxDatabaseConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxDatabaseExists(ctx, resourceName, &kxdatabase), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxDatabaseConfig_tags1(rName, "key2", "value2"), + Config: testAccKxDatabaseConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxDatabaseExists(ctx, resourceName, &kxdatabase), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/finspace/kx_dataview_test.go b/internal/service/finspace/kx_dataview_test.go index 399ea82f0dc..d1fc03059b1 100644 --- a/internal/service/finspace/kx_dataview_test.go +++ b/internal/service/finspace/kx_dataview_test.go @@ -168,12 +168,12 @@ func TestAccFinSpaceKxDataview_tags(t *testing.T) { CheckDestroy: testAccCheckKxDataviewDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxDataviewConfig_tags1(rName, "key1", "value1"), + Config: testAccKxDataviewConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxDataviewExists(ctx, resourceName, &dataview), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, @@ -183,22 +183,22 @@ func TestAccFinSpaceKxDataview_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccKxDataviewConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccKxDataviewConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxDataviewExists(ctx, resourceName, &dataview), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxDataviewConfig_tags1(rName, "key2", "value2"), + Config: testAccKxDataviewConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxDataviewExists(ctx, resourceName, &dataview), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/finspace/kx_environment_test.go b/internal/service/finspace/kx_environment_test.go index c793abfd390..4e9dbfcad8f 100644 --- a/internal/service/finspace/kx_environment_test.go +++ b/internal/service/finspace/kx_environment_test.go @@ -337,28 +337,28 @@ func TestAccFinSpaceKxEnvironment_tags(t *testing.T) { CheckDestroy: testAccCheckKxEnvironmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxEnvironmentConfig_tags1(rName, "key1", "value1"), + Config: testAccKxEnvironmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxEnvironmentExists(ctx, resourceName, &kxenvironment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccKxEnvironmentConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccKxEnvironmentConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxEnvironmentExists(ctx, resourceName, &kxenvironment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxEnvironmentConfig_tags1(rName, "key2", "value2"), + Config: testAccKxEnvironmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxEnvironmentExists(ctx, resourceName, &kxenvironment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/finspace/kx_scaling_group_test.go b/internal/service/finspace/kx_scaling_group_test.go index 8a27582762e..d071676d1ac 100644 --- a/internal/service/finspace/kx_scaling_group_test.go +++ b/internal/service/finspace/kx_scaling_group_test.go @@ -108,12 +108,12 @@ func TestAccFinSpaceKxScalingGroup_tags(t *testing.T) { CheckDestroy: testAccCheckKxScalingGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxScalingGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccKxScalingGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxScalingGroupExists(ctx, resourceName, &scalingGroup), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -122,22 +122,22 @@ func TestAccFinSpaceKxScalingGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccKxScalingGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccKxScalingGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxScalingGroupExists(ctx, resourceName, &scalingGroup), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxScalingGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccKxScalingGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxScalingGroupExists(ctx, resourceName, &scalingGroup), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/finspace/kx_user_test.go b/internal/service/finspace/kx_user_test.go index 5257a4edd1e..f3419dacce0 100644 --- a/internal/service/finspace/kx_user_test.go +++ b/internal/service/finspace/kx_user_test.go @@ -147,28 +147,28 @@ func TestAccFinSpaceKxUser_tags(t *testing.T) { CheckDestroy: testAccCheckKxUserDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxUserConfig_tags1(rName, userName, "key1", "value1"), + Config: testAccKxUserConfig_tags1(rName, userName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxUserExists(ctx, resourceName, &kxuser), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccKxUserConfig_tags2(rName, userName, "key1", "value1", "key2", "value2"), + Config: testAccKxUserConfig_tags2(rName, userName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxUserExists(ctx, resourceName, &kxuser), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxUserConfig_tags1(rName, userName, "key2", "value2"), + Config: testAccKxUserConfig_tags1(rName, userName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxUserExists(ctx, resourceName, &kxuser), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/finspace/kx_volume_test.go b/internal/service/finspace/kx_volume_test.go index 351e0ffb106..613e2320749 100644 --- a/internal/service/finspace/kx_volume_test.go +++ b/internal/service/finspace/kx_volume_test.go @@ -108,12 +108,12 @@ func TestAccFinSpaceKxVolume_tags(t *testing.T) { CheckDestroy: testAccCheckKxVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKxVolumeConfig_tags1(rName, "key1", "value1"), + Config: testAccKxVolumeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKxVolumeExists(ctx, resourceName, &volume), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -122,22 +122,22 @@ func TestAccFinSpaceKxVolume_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccKxVolumeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccKxVolumeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxVolumeExists(ctx, resourceName, &volume), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKxVolumeConfig_tags1(rName, "key2", "value2"), + Config: testAccKxVolumeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKxVolumeExists(ctx, resourceName, &volume), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 9051ce0c6b04cb3c01f12c03d487f13ae1959df9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:42 -0400 Subject: [PATCH 084/180] firehose: Use constants for test strings --- internal/service/firehose/delivery_stream_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/firehose/delivery_stream_test.go b/internal/service/firehose/delivery_stream_test.go index dfc45179066..74445abccd4 100644 --- a/internal/service/firehose/delivery_stream_test.go +++ b/internal/service/firehose/delivery_stream_test.go @@ -155,28 +155,28 @@ func TestAccFirehoseDeliveryStream_tags(t *testing.T) { CheckDestroy: testAccCheckDeliveryStreamDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDeliveryStreamConfig_tags1(rName, "key1", "value1"), + Config: testAccDeliveryStreamConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeliveryStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccDeliveryStreamConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDeliveryStreamConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeliveryStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDeliveryStreamConfig_tags1(rName, "key2", "value2"), + Config: testAccDeliveryStreamConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeliveryStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 3046ad2b742a24e2790fc3c04e72732ab0a3e7ee Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:42 -0400 Subject: [PATCH 085/180] fms: Use constants for test strings --- internal/service/fms/policy_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/service/fms/policy_test.go b/internal/service/fms/policy_test.go index 3bb4b661614..adc8ed0a8c1 100644 --- a/internal/service/fms/policy_test.go +++ b/internal/service/fms/policy_test.go @@ -244,19 +244,19 @@ func testAccPolicy_resourceTags(t *testing.T) { CheckDestroy: testAccCheckPolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPolicyConfig_resourceTags1(rName, "key1", "value1"), + Config: testAccPolicyConfig_resourceTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "resource_tags.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "resource_tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "resource_tags.key1", acctest.CtValue1), ), }, { - Config: testAccPolicyConfig_resourceTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPolicyConfig_resourceTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "resource_tags.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "resource_tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "resource_tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "resource_tags.key2", acctest.CtValue2), ), }, }, @@ -280,19 +280,19 @@ func testAccPolicy_tags(t *testing.T) { CheckDestroy: testAccCheckPolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPolicyConfig_tags1(rName, "key1", "value1"), + Config: testAccPolicyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccPolicyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPolicyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 8556b6aae3de83d82e81e288a1cab00254fcbd85 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:43 -0400 Subject: [PATCH 086/180] fsx: Use constants for test strings --- internal/service/fsx/backup_test.go | 12 +++++------ internal/service/fsx/file_cache_test.go | 10 +++++----- .../service/fsx/lustre_file_system_test.go | 12 +++++------ .../service/fsx/ontap_file_system_test.go | 12 +++++------ .../fsx/ontap_storage_virtual_machine_test.go | 12 +++++------ internal/service/fsx/ontap_volume_test.go | 12 +++++------ .../service/fsx/openzfs_file_system_test.go | 20 +++++++++---------- internal/service/fsx/openzfs_snapshot_test.go | 12 +++++------ internal/service/fsx/openzfs_volume_test.go | 20 +++++++++---------- .../service/fsx/windows_file_system_test.go | 12 +++++------ 10 files changed, 67 insertions(+), 67 deletions(-) diff --git a/internal/service/fsx/backup_test.go b/internal/service/fsx/backup_test.go index b077274d387..58c6dd73a66 100644 --- a/internal/service/fsx/backup_test.go +++ b/internal/service/fsx/backup_test.go @@ -205,11 +205,11 @@ func TestAccFSxBackup_tags(t *testing.T) { CheckDestroy: testAccCheckBackupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBackupConfig_tags1(rName, "key1", "value1"), + Config: testAccBackupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBackupExists(ctx, resourceName, &backup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -218,20 +218,20 @@ func TestAccFSxBackup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBackupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccBackupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBackupExists(ctx, resourceName, &backup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBackupConfig_tags1(rName, "key2", "value2"), + Config: testAccBackupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBackupExists(ctx, resourceName, &backup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/fsx/file_cache_test.go b/internal/service/fsx/file_cache_test.go index e69897536d5..b6b3e03e61d 100644 --- a/internal/service/fsx/file_cache_test.go +++ b/internal/service/fsx/file_cache_test.go @@ -137,7 +137,7 @@ func testAccFileCache_copyTagsToDataRepositoryAssociations(t *testing.T) { CheckDestroy: testAccCheckFileCacheDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFileCacheConfig_copyTagsToDataRepositoryAssociations(rName, "key1", "value1", "key2", "value2"), + Config: testAccFileCacheConfig_copyTagsToDataRepositoryAssociations(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFileCacheExists(ctx, resourceName, &filecache1), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_data_repository_associations", "true"), @@ -358,11 +358,11 @@ func testAccFileCache_tags(t *testing.T) { CheckDestroy: testAccCheckFileCacheDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFileCacheConfig_tags1(rName, "key1", "value1"), + Config: testAccFileCacheConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFileCacheExists(ctx, resourceName, &filecache1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -372,13 +372,13 @@ func testAccFileCache_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"copy_tags_to_data_repository_associations"}, }, { - Config: testAccFileCacheConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFileCacheConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFileCacheExists(ctx, resourceName, &filecache2), testAccCheckFileCacheNotRecreated(&filecache1, &filecache2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/fsx/lustre_file_system_test.go b/internal/service/fsx/lustre_file_system_test.go index 5cde9a24fe7..cc9bc07ae79 100644 --- a/internal/service/fsx/lustre_file_system_test.go +++ b/internal/service/fsx/lustre_file_system_test.go @@ -426,11 +426,11 @@ func TestAccFSxLustreFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckLustreFileSystemDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLustreFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccLustreFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLustreFileSystemExists(ctx, resourceName, &filesystem1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -440,22 +440,22 @@ func TestAccFSxLustreFileSystem_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrSecurityGroupIDs}, }, { - Config: testAccLustreFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLustreFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLustreFileSystemExists(ctx, resourceName, &filesystem2), testAccCheckLustreFileSystemNotRecreated(&filesystem1, &filesystem2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLustreFileSystemConfig_tags1(rName, "key2", "value2"), + Config: testAccLustreFileSystemConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLustreFileSystemExists(ctx, resourceName, &filesystem3), testAccCheckLustreFileSystemNotRecreated(&filesystem2, &filesystem3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/fsx/ontap_file_system_test.go b/internal/service/fsx/ontap_file_system_test.go index 34f9acbf86f..73158be30fc 100644 --- a/internal/service/fsx/ontap_file_system_test.go +++ b/internal/service/fsx/ontap_file_system_test.go @@ -378,11 +378,11 @@ func TestAccFSxONTAPFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckONTAPFileSystemDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccONTAPFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccONTAPFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPFileSystemExists(ctx, resourceName, &filesystem1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -392,22 +392,22 @@ func TestAccFSxONTAPFileSystem_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrSecurityGroupIDs}, }, { - Config: testAccONTAPFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccONTAPFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPFileSystemExists(ctx, resourceName, &filesystem2), testAccCheckONTAPFileSystemNotRecreated(&filesystem1, &filesystem2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccONTAPFileSystemConfig_tags1(rName, "key2", "value2"), + Config: testAccONTAPFileSystemConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPFileSystemExists(ctx, resourceName, &filesystem3), testAccCheckONTAPFileSystemNotRecreated(&filesystem2, &filesystem3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/fsx/ontap_storage_virtual_machine_test.go b/internal/service/fsx/ontap_storage_virtual_machine_test.go index 180d8ff2476..22b4fecd92b 100644 --- a/internal/service/fsx/ontap_storage_virtual_machine_test.go +++ b/internal/service/fsx/ontap_storage_virtual_machine_test.go @@ -213,11 +213,11 @@ func TestAccFSxONTAPStorageVirtualMachine_tags(t *testing.T) { CheckDestroy: testAccCheckONTAPStorageVirtualMachineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccONTAPStorageVirtualMachineConfig_tags1(rName, "key1", "value1"), + Config: testAccONTAPStorageVirtualMachineConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPStorageVirtualMachineExists(ctx, resourceName, &storageVirtualMachine1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -226,22 +226,22 @@ func TestAccFSxONTAPStorageVirtualMachine_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccONTAPStorageVirtualMachineConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccONTAPStorageVirtualMachineConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPStorageVirtualMachineExists(ctx, resourceName, &storageVirtualMachine2), testAccCheckONTAPStorageVirtualMachineNotRecreated(&storageVirtualMachine1, &storageVirtualMachine2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccONTAPStorageVirtualMachineConfig_tags1(rName, "key2", "value2"), + Config: testAccONTAPStorageVirtualMachineConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPStorageVirtualMachineExists(ctx, resourceName, &storageVirtualMachine3), testAccCheckONTAPStorageVirtualMachineNotRecreated(&storageVirtualMachine2, &storageVirtualMachine3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/fsx/ontap_volume_test.go b/internal/service/fsx/ontap_volume_test.go index 30615f0b934..879894f3575 100644 --- a/internal/service/fsx/ontap_volume_test.go +++ b/internal/service/fsx/ontap_volume_test.go @@ -561,11 +561,11 @@ func TestAccFSxONTAPVolume_tags(t *testing.T) { CheckDestroy: testAccCheckONTAPVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccONTAPVolumeConfig_tags1(rName, "key1", "value1"), + Config: testAccONTAPVolumeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPVolumeExists(ctx, resourceName, &volume1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -575,22 +575,22 @@ func TestAccFSxONTAPVolume_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"bypass_snaplock_enterprise_retention", "skip_final_backup"}, }, { - Config: testAccONTAPVolumeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccONTAPVolumeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPVolumeExists(ctx, resourceName, &volume2), testAccCheckONTAPVolumeNotRecreated(&volume1, &volume2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccONTAPVolumeConfig_tags1(rName, "key2", "value2"), + Config: testAccONTAPVolumeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckONTAPVolumeExists(ctx, resourceName, &volume3), testAccCheckONTAPVolumeNotRecreated(&volume2, &volume3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/fsx/openzfs_file_system_test.go b/internal/service/fsx/openzfs_file_system_test.go index c659e523b0f..dbf570c298b 100644 --- a/internal/service/fsx/openzfs_file_system_test.go +++ b/internal/service/fsx/openzfs_file_system_test.go @@ -407,11 +407,11 @@ func TestAccFSxOpenZFSFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckOpenZFSFileSystemDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOpenZFSFileSystemConfig_tags1(rName, "key1", "value1"), + Config: testAccOpenZFSFileSystemConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSFileSystemExists(ctx, resourceName, &filesystem1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -424,22 +424,22 @@ func TestAccFSxOpenZFSFileSystem_tags(t *testing.T) { }, }, { - Config: testAccOpenZFSFileSystemConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOpenZFSFileSystemConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSFileSystemExists(ctx, resourceName, &filesystem2), testAccCheckOpenZFSFileSystemNotRecreated(&filesystem1, &filesystem2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOpenZFSFileSystemConfig_tags1(rName, "key2", "value2"), + Config: testAccOpenZFSFileSystemConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSFileSystemExists(ctx, resourceName, &filesystem3), testAccCheckOpenZFSFileSystemNotRecreated(&filesystem2, &filesystem3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -459,11 +459,11 @@ func TestAccFSxOpenZFSFileSystem_copyTags(t *testing.T) { CheckDestroy: testAccCheckOpenZFSFileSystemDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOpenZFSFileSystemConfig_copyTags(rName, "key1", "value1", "true"), + Config: testAccOpenZFSFileSystemConfig_copyTags(rName, acctest.CtKey1, acctest.CtValue1, "true"), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSFileSystemExists(ctx, resourceName, &filesystem1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_backups", "true"), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_volumes", "true"), ), @@ -478,11 +478,11 @@ func TestAccFSxOpenZFSFileSystem_copyTags(t *testing.T) { }, }, { - Config: testAccOpenZFSFileSystemConfig_copyTags(rName, "key1", "value1", "false"), + Config: testAccOpenZFSFileSystemConfig_copyTags(rName, acctest.CtKey1, acctest.CtValue1, "false"), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSFileSystemExists(ctx, resourceName, &filesystem2), testAccCheckOpenZFSFileSystemNotRecreated(&filesystem1, &filesystem2), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_backups", "false"), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_volumes", "false"), ), diff --git a/internal/service/fsx/openzfs_snapshot_test.go b/internal/service/fsx/openzfs_snapshot_test.go index 265beb1949d..a1aa0ab6dc8 100644 --- a/internal/service/fsx/openzfs_snapshot_test.go +++ b/internal/service/fsx/openzfs_snapshot_test.go @@ -90,11 +90,11 @@ func TestAccFSxOpenZFSSnapshot_tags(t *testing.T) { CheckDestroy: testAccCheckOpenZFSSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOpenZFSSnapshotConfig_tags1(rName, "key1", "value1"), + Config: testAccOpenZFSSnapshotConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSSnapshotExists(ctx, resourceName, &snapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -103,20 +103,20 @@ func TestAccFSxOpenZFSSnapshot_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOpenZFSSnapshotConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOpenZFSSnapshotConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSSnapshotExists(ctx, resourceName, &snapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOpenZFSSnapshotConfig_tags1(rName, "key2", "value2"), + Config: testAccOpenZFSSnapshotConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSSnapshotExists(ctx, resourceName, &snapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/fsx/openzfs_volume_test.go b/internal/service/fsx/openzfs_volume_test.go index b13c9fd7361..4599f2eb80b 100644 --- a/internal/service/fsx/openzfs_volume_test.go +++ b/internal/service/fsx/openzfs_volume_test.go @@ -132,11 +132,11 @@ func TestAccFSxOpenZFSVolume_tags(t *testing.T) { CheckDestroy: testAccCheckOpenZFSVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOpenZFSVolumeConfig_tags1(rName, "key1", "value1"), + Config: testAccOpenZFSVolumeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSVolumeExists(ctx, resourceName, &volume1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -145,22 +145,22 @@ func TestAccFSxOpenZFSVolume_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOpenZFSVolumeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOpenZFSVolumeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSVolumeExists(ctx, resourceName, &volume2), testAccCheckOpenZFSVolumeNotRecreated(&volume1, &volume2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOpenZFSVolumeConfig_tags1(rName, "key2", "value2"), + Config: testAccOpenZFSVolumeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSVolumeExists(ctx, resourceName, &volume3), testAccCheckOpenZFSVolumeNotRecreated(&volume2, &volume3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -180,14 +180,14 @@ func TestAccFSxOpenZFSVolume_copyTags(t *testing.T) { CheckDestroy: testAccCheckOpenZFSVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOpenZFSVolumeConfig_copyTags(rName, "key1", "value1", "true"), + Config: testAccOpenZFSVolumeConfig_copyTags(rName, acctest.CtKey1, acctest.CtValue1, "true"), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSVolumeExists(ctx, resourceName, &volume1), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_snapshots", "true"), resource.TestCheckResourceAttr(resourceName, "delete_volume_options.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "delete_volume_options.0", "DELETE_CHILD_VOLUMES_AND_SNAPSHOTS"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -199,7 +199,7 @@ func TestAccFSxOpenZFSVolume_copyTags(t *testing.T) { }, }, { - Config: testAccOpenZFSVolumeConfig_copyTags(rName, "key1", "value1", "false"), + Config: testAccOpenZFSVolumeConfig_copyTags(rName, acctest.CtKey1, acctest.CtValue1, "false"), Check: resource.ComposeTestCheckFunc( testAccCheckOpenZFSVolumeExists(ctx, resourceName, &volume2), testAccCheckOpenZFSVolumeRecreated(&volume1, &volume2), @@ -207,7 +207,7 @@ func TestAccFSxOpenZFSVolume_copyTags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "delete_volume_options.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "delete_volume_options.0", "DELETE_CHILD_VOLUMES_AND_SNAPSHOTS"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/fsx/windows_file_system_test.go b/internal/service/fsx/windows_file_system_test.go index 07f9ba1f1a3..fac4fdce7c8 100644 --- a/internal/service/fsx/windows_file_system_test.go +++ b/internal/service/fsx/windows_file_system_test.go @@ -632,11 +632,11 @@ func TestAccFSxWindowsFileSystem_tags(t *testing.T) { CheckDestroy: testAccCheckWindowsFileSystemDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWindowsFileSystemConfig_tags1(rName, domainName, "key1", "value1"), + Config: testAccWindowsFileSystemConfig_tags1(rName, domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWindowsFileSystemExists(ctx, resourceName, &filesystem1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -649,22 +649,22 @@ func TestAccFSxWindowsFileSystem_tags(t *testing.T) { }, }, { - Config: testAccWindowsFileSystemConfig_tags2(rName, domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccWindowsFileSystemConfig_tags2(rName, domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWindowsFileSystemExists(ctx, resourceName, &filesystem2), testAccCheckWindowsFileSystemNotRecreated(&filesystem1, &filesystem2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWindowsFileSystemConfig_tags1(rName, domainName, "key2", "value2"), + Config: testAccWindowsFileSystemConfig_tags1(rName, domainName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWindowsFileSystemExists(ctx, resourceName, &filesystem3), testAccCheckWindowsFileSystemNotRecreated(&filesystem2, &filesystem3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 315b974987f2e0d71a27bc1040f02d7d89f725f4 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:43 -0400 Subject: [PATCH 087/180] gamelift: Use constants for test strings --- internal/service/gamelift/alias_test.go | 12 ++++++------ internal/service/gamelift/build_test.go | 12 ++++++------ internal/service/gamelift/fleet_test.go | 12 ++++++------ internal/service/gamelift/game_session_queue_test.go | 12 ++++++------ internal/service/gamelift/script_test.go | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/internal/service/gamelift/alias_test.go b/internal/service/gamelift/alias_test.go index 882c3106238..e5df1d38d97 100644 --- a/internal/service/gamelift/alias_test.go +++ b/internal/service/gamelift/alias_test.go @@ -99,11 +99,11 @@ func TestAccGameLiftAlias_tags(t *testing.T) { CheckDestroy: testAccCheckAliasDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAliasConfig_basicTags1(aliasName, "key1", "value1"), + Config: testAccAliasConfig_basicTags1(aliasName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAliasExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -112,20 +112,20 @@ func TestAccGameLiftAlias_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAliasConfig_basicTags2(aliasName, "key1", "value1updated", "key2", "value2"), + Config: testAccAliasConfig_basicTags2(aliasName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAliasExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAliasConfig_basicTags1(aliasName, "key2", "value2"), + Config: testAccAliasConfig_basicTags1(aliasName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAliasExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/gamelift/build_test.go b/internal/service/gamelift/build_test.go index 7fe25f0bdeb..bd80ec51269 100644 --- a/internal/service/gamelift/build_test.go +++ b/internal/service/gamelift/build_test.go @@ -127,11 +127,11 @@ func TestAccGameLiftBuild_tags(t *testing.T) { CheckDestroy: testAccCheckBuildDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBuildConfig_basicTags1(rName, bucketName, key, roleArn, "key1", "value1"), + Config: testAccBuildConfig_basicTags1(rName, bucketName, key, roleArn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBuildExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -141,20 +141,20 @@ func TestAccGameLiftBuild_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"storage_location"}, }, { - Config: testAccBuildConfig_basicTags2(rName, bucketName, key, roleArn, "key1", "value1updated", "key2", "value2"), + Config: testAccBuildConfig_basicTags2(rName, bucketName, key, roleArn, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBuildExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBuildConfig_basicTags1(rName, bucketName, key, roleArn, "key2", "value2"), + Config: testAccBuildConfig_basicTags1(rName, bucketName, key, roleArn, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBuildExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/gamelift/fleet_test.go b/internal/service/gamelift/fleet_test.go index 515a3cb552d..a0487e44b9c 100644 --- a/internal/service/gamelift/fleet_test.go +++ b/internal/service/gamelift/fleet_test.go @@ -292,11 +292,11 @@ func TestAccGameLiftFleet_tags(t *testing.T) { CheckDestroy: testAccCheckFleetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFleetConfig_basicTags1(rName, launchPath, params, bucketName, key, roleArn, "key1", "value1"), + Config: testAccFleetConfig_basicTags1(rName, launchPath, params, bucketName, key, roleArn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFleetExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -306,20 +306,20 @@ func TestAccGameLiftFleet_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"runtime_configuration"}, }, { - Config: testAccFleetConfig_basicTags2(rName, launchPath, params, bucketName, key, roleArn, "key1", "value1updated", "key2", "value2"), + Config: testAccFleetConfig_basicTags2(rName, launchPath, params, bucketName, key, roleArn, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFleetExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFleetConfig_basicTags1(rName, launchPath, params, bucketName, key, roleArn, "key2", "value2"), + Config: testAccFleetConfig_basicTags1(rName, launchPath, params, bucketName, key, roleArn, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFleetExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/gamelift/game_session_queue_test.go b/internal/service/gamelift/game_session_queue_test.go index 893c3f8bf72..e2370df8469 100644 --- a/internal/service/gamelift/game_session_queue_test.go +++ b/internal/service/gamelift/game_session_queue_test.go @@ -134,11 +134,11 @@ func TestAccGameLiftGameSessionQueue_tags(t *testing.T) { CheckDestroy: testAccCheckGameSessionQueueDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGameSessionQueueConfig_basicTags1(queueName, "key1", "value1"), + Config: testAccGameSessionQueueConfig_basicTags1(queueName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGameSessionQueueExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -147,20 +147,20 @@ func TestAccGameLiftGameSessionQueue_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGameSessionQueueConfig_basicTags2(queueName, "key1", "value1updated", "key2", "value2"), + Config: testAccGameSessionQueueConfig_basicTags2(queueName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGameSessionQueueExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGameSessionQueueConfig_basicTags1(queueName, "key2", "value2"), + Config: testAccGameSessionQueueConfig_basicTags1(queueName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGameSessionQueueExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/gamelift/script_test.go b/internal/service/gamelift/script_test.go index b573e37141b..012a7749b7c 100644 --- a/internal/service/gamelift/script_test.go +++ b/internal/service/gamelift/script_test.go @@ -90,11 +90,11 @@ func TestAccGameLiftScript_tags(t *testing.T) { CheckDestroy: testAccCheckScriptDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccScriptConfig_basicTags1(rName, "key1", "value1"), + Config: testAccScriptConfig_basicTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckScriptExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -104,20 +104,20 @@ func TestAccGameLiftScript_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"zip_file"}, }, { - Config: testAccScriptConfig_basicTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccScriptConfig_basicTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScriptExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccScriptConfig_basicTags1(rName, "key2", "value2"), + Config: testAccScriptConfig_basicTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScriptExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 7686ae09825e1cf7c40cd7ab43e10aec12ecd315 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:43 -0400 Subject: [PATCH 088/180] glacier: Use constants for test strings --- internal/service/glacier/vault_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/glacier/vault_test.go b/internal/service/glacier/vault_test.go index 85705b2d5dd..6c9eb9bcb5e 100644 --- a/internal/service/glacier/vault_test.go +++ b/internal/service/glacier/vault_test.go @@ -156,11 +156,11 @@ func TestAccGlacierVault_tags(t *testing.T) { CheckDestroy: testAccCheckVaultDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVaultConfig_tags1(rName, "key1", "value1"), + Config: testAccVaultConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVaultExists(ctx, resourceName, &vault), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -169,20 +169,20 @@ func TestAccGlacierVault_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVaultConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVaultConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVaultExists(ctx, resourceName, &vault), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVaultConfig_tags1(rName, "key2", "value2"), + Config: testAccVaultConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVaultExists(ctx, resourceName, &vault), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 75ea1d78b7c39df03c327de88cad484a3f8fc179 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:43 -0400 Subject: [PATCH 089/180] globalaccelerator: Use constants for test strings --- .../service/globalaccelerator/accelerator_test.go | 12 ++++++------ .../cross_account_attachment_test.go | 12 ++++++------ .../custom_routing_accelerator_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/globalaccelerator/accelerator_test.go b/internal/service/globalaccelerator/accelerator_test.go index e12873be3f0..e614bb847c2 100644 --- a/internal/service/globalaccelerator/accelerator_test.go +++ b/internal/service/globalaccelerator/accelerator_test.go @@ -298,12 +298,12 @@ func TestAccGlobalAcceleratorAccelerator_tags(t *testing.T) { CheckDestroy: testAccCheckAcceleratorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAcceleratorConfig_tags1(rName, "key1", "value1"), + Config: testAccAcceleratorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAcceleratorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -312,20 +312,20 @@ func TestAccGlobalAcceleratorAccelerator_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAcceleratorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAcceleratorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAcceleratorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAcceleratorConfig_tags1(rName, "key2", "value2"), + Config: testAccAcceleratorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAcceleratorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/globalaccelerator/cross_account_attachment_test.go b/internal/service/globalaccelerator/cross_account_attachment_test.go index c8c15ae0f2c..64417f1586a 100644 --- a/internal/service/globalaccelerator/cross_account_attachment_test.go +++ b/internal/service/globalaccelerator/cross_account_attachment_test.go @@ -168,12 +168,12 @@ func TestAccGlobalAcceleratorCrossAccountAttachment_tags(t *testing.T) { CheckDestroy: testAccCheckAcceleratorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCrossAccountAttachmentConfig_tags1(rName, "key1", "value1"), + Config: testAccCrossAccountAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCrossAccountAttachmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -182,20 +182,20 @@ func TestAccGlobalAcceleratorCrossAccountAttachment_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCrossAccountAttachmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCrossAccountAttachmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCrossAccountAttachmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCrossAccountAttachmentConfig_tags1(rName, "key2", "value2"), + Config: testAccCrossAccountAttachmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCrossAccountAttachmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/globalaccelerator/custom_routing_accelerator_test.go b/internal/service/globalaccelerator/custom_routing_accelerator_test.go index 244735bb619..fe75a481793 100644 --- a/internal/service/globalaccelerator/custom_routing_accelerator_test.go +++ b/internal/service/globalaccelerator/custom_routing_accelerator_test.go @@ -97,12 +97,12 @@ func TestAccGlobalAcceleratorCustomRoutingAccelerator_tags(t *testing.T) { CheckDestroy: testAccCheckCustomRoutingAcceleratorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCustomRoutingAcceleratorConfig_tags1(rName, "key1", "value1"), + Config: testAccCustomRoutingAcceleratorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCustomRoutingAcceleratorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -111,20 +111,20 @@ func TestAccGlobalAcceleratorCustomRoutingAccelerator_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCustomRoutingAcceleratorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCustomRoutingAcceleratorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCustomRoutingAcceleratorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCustomRoutingAcceleratorConfig_tags1(rName, "key2", "value2"), + Config: testAccCustomRoutingAcceleratorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCustomRoutingAcceleratorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From df2007b03000dea0dc532c8085f02a58f4fcdcb2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:43 -0400 Subject: [PATCH 090/180] glue: Use constants for test strings --- .../service/glue/catalog_database_test.go | 16 ++++++------- internal/service/glue/connection_test.go | 12 +++++----- internal/service/glue/crawler_test.go | 12 +++++----- .../service/glue/data_quality_ruleset_test.go | 12 +++++----- internal/service/glue/dev_endpoint_test.go | 24 +++++++++---------- internal/service/glue/job_test.go | 12 +++++----- internal/service/glue/ml_transform_test.go | 12 +++++----- internal/service/glue/partition_test.go | 12 +++++----- internal/service/glue/registry_test.go | 12 +++++----- internal/service/glue/resource_policy_test.go | 12 +++++----- internal/service/glue/schema_test.go | 12 +++++----- internal/service/glue/trigger_test.go | 12 +++++----- internal/service/glue/workflow_test.go | 12 +++++----- 13 files changed, 86 insertions(+), 86 deletions(-) diff --git a/internal/service/glue/catalog_database_test.go b/internal/service/glue/catalog_database_test.go index 65850064013..eee707312fa 100644 --- a/internal/service/glue/catalog_database_test.go +++ b/internal/service/glue/catalog_database_test.go @@ -57,7 +57,7 @@ func TestAccGlueCatalogDatabase_full(t *testing.T) { testAccCheckCatalogDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "A test catalog from terraform"), resource.TestCheckResourceAttr(resourceName, "location_uri", "my-location"), - resource.TestCheckResourceAttr(resourceName, "parameters.param1", "value1"), + resource.TestCheckResourceAttr(resourceName, "parameters.param1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "parameters.param2", "true"), resource.TestCheckResourceAttr(resourceName, "parameters.param3", "50"), ), @@ -68,7 +68,7 @@ func TestAccGlueCatalogDatabase_full(t *testing.T) { testAccCheckCatalogDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "An updated test catalog from terraform"), resource.TestCheckResourceAttr(resourceName, "location_uri", "my-location"), - resource.TestCheckResourceAttr(resourceName, "parameters.param1", "value1"), + resource.TestCheckResourceAttr(resourceName, "parameters.param1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "parameters.param2", "true"), resource.TestCheckResourceAttr(resourceName, "parameters.param3", "50"), ), @@ -239,12 +239,12 @@ func TestAccGlueCatalogDatabase_tags(t *testing.T) { CheckDestroy: testAccCheckDatabaseDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCatalogDatabaseConfig_tags1(rName, "key1", "value1"), + Config: testAccCatalogDatabaseConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Destroy: false, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCatalogDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -253,22 +253,22 @@ func TestAccGlueCatalogDatabase_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCatalogDatabaseConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCatalogDatabaseConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Destroy: false, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCatalogDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCatalogDatabaseConfig_tags1(rName, "key2", "value2"), + Config: testAccCatalogDatabaseConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Destroy: false, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCatalogDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/connection_test.go b/internal/service/glue/connection_test.go index 56b740ce890..f7689e2621c 100644 --- a/internal/service/glue/connection_test.go +++ b/internal/service/glue/connection_test.go @@ -74,11 +74,11 @@ func TestAccGlueConnection_tags(t *testing.T) { CheckDestroy: testAccCheckConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectionConfig_tags1(rName, jdbcConnectionUrl, "key1", "value1"), + Config: testAccConnectionConfig_tags1(rName, jdbcConnectionUrl, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &connection), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -87,20 +87,20 @@ func TestAccGlueConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConnectionConfig_tags2(rName, jdbcConnectionUrl, "key1", "value1updated", "key2", "value2"), + Config: testAccConnectionConfig_tags2(rName, jdbcConnectionUrl, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &connection), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConnectionConfig_tags1(rName, jdbcConnectionUrl, "key2", "value2"), + Config: testAccConnectionConfig_tags1(rName, jdbcConnectionUrl, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName, &connection), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/crawler_test.go b/internal/service/glue/crawler_test.go index df037b11ebf..2cfee603c88 100644 --- a/internal/service/glue/crawler_test.go +++ b/internal/service/glue/crawler_test.go @@ -1533,11 +1533,11 @@ func TestAccGlueCrawler_tags(t *testing.T) { CheckDestroy: testAccCheckCrawlerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCrawlerConfig_tags1(rName, "key1", "value1"), + Config: testAccCrawlerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCrawlerExists(ctx, resourceName, &crawler1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1546,20 +1546,20 @@ func TestAccGlueCrawler_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCrawlerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCrawlerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCrawlerExists(ctx, resourceName, &crawler2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCrawlerConfig_tags1(rName, "key2", "value2"), + Config: testAccCrawlerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCrawlerExists(ctx, resourceName, &crawler3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/data_quality_ruleset_test.go b/internal/service/glue/data_quality_ruleset_test.go index b683958680d..6c6b6f580aa 100644 --- a/internal/service/glue/data_quality_ruleset_test.go +++ b/internal/service/glue/data_quality_ruleset_test.go @@ -214,12 +214,12 @@ func TestAccGlueDataQualityRuleset_tags(t *testing.T) { CheckDestroy: testAccCheckDataQualityRulesetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataQualityRulesetConfig_tags1(rName, ruleset, "key1", "value1"), + Config: testAccDataQualityRulesetConfig_tags1(rName, ruleset, acctest.CtKey1, acctest.CtValue1), Destroy: false, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDataQualityRulesetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -228,22 +228,22 @@ func TestAccGlueDataQualityRuleset_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDataQualityRulesetConfig_tags2(rName, ruleset, "key1", "value1updated", "key2", "value2"), + Config: testAccDataQualityRulesetConfig_tags2(rName, ruleset, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Destroy: false, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDataQualityRulesetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataQualityRulesetConfig_tags1(rName, ruleset, "key2", "value2"), + Config: testAccDataQualityRulesetConfig_tags1(rName, ruleset, acctest.CtKey2, acctest.CtValue2), Destroy: false, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDataQualityRulesetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/dev_endpoint_test.go b/internal/service/glue/dev_endpoint_test.go index 257a1069e17..dcda03e50c4 100644 --- a/internal/service/glue/dev_endpoint_test.go +++ b/internal/service/glue/dev_endpoint_test.go @@ -69,11 +69,11 @@ func TestAccGlueDevEndpoint_arguments(t *testing.T) { CheckDestroy: testAccCheckDevEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDevEndpointConfig_arguments(rName, "--arg1", "value1"), + Config: testAccDevEndpointConfig_arguments(rName, "--arg1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDevEndpointExists(ctx, resourceName, &endpoint), resource.TestCheckResourceAttr(resourceName, "arguments.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "arguments.--arg1", "value1"), + resource.TestCheckResourceAttr(resourceName, "arguments.--arg1", acctest.CtValue1), ), }, { @@ -82,20 +82,20 @@ func TestAccGlueDevEndpoint_arguments(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDevEndpointConfig_arguments2(rName, "--arg1", "value1updated", "--arg2", "value2"), + Config: testAccDevEndpointConfig_arguments2(rName, "--arg1", "value1updated", "--arg2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDevEndpointExists(ctx, resourceName, &endpoint), resource.TestCheckResourceAttr(resourceName, "arguments.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "arguments.--arg1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "arguments.--arg2", "value2"), + resource.TestCheckResourceAttr(resourceName, "arguments.--arg2", acctest.CtValue2), ), }, { - Config: testAccDevEndpointConfig_arguments(rName, "--arg2", "value2"), + Config: testAccDevEndpointConfig_arguments(rName, "--arg2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDevEndpointExists(ctx, resourceName, &endpoint), resource.TestCheckResourceAttr(resourceName, "arguments.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "arguments.--arg2", "value2"), + resource.TestCheckResourceAttr(resourceName, "arguments.--arg2", acctest.CtValue2), ), }, }, @@ -479,11 +479,11 @@ func TestAccGlueDevEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckDevEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDevEndpointConfig_tags1(rName, "key1", "value1"), + Config: testAccDevEndpointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDevEndpointExists(ctx, resourceName, &endpoint1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -492,20 +492,20 @@ func TestAccGlueDevEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDevEndpointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDevEndpointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDevEndpointExists(ctx, resourceName, &endpoint2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDevEndpointConfig_tags1(rName, "key2", "value2"), + Config: testAccDevEndpointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDevEndpointExists(ctx, resourceName, &endpoint3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/job_test.go b/internal/service/glue/job_test.go index c3f82d230c8..7cfff29d492 100644 --- a/internal/service/glue/job_test.go +++ b/internal/service/glue/job_test.go @@ -481,11 +481,11 @@ func TestAccGlueJob_tags(t *testing.T) { CheckDestroy: testAccCheckJobDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccJobConfig_tags1(rName, "key1", "value1"), + Config: testAccJobConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckJobExists(ctx, resourceName, &job), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -494,20 +494,20 @@ func TestAccGlueJob_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccJobConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccJobConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckJobExists(ctx, resourceName, &job), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccJobConfig_tags1(rName, "key2", "value2"), + Config: testAccJobConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckJobExists(ctx, resourceName, &job), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/ml_transform_test.go b/internal/service/glue/ml_transform_test.go index 5f28bb939de..1be9a71d1cd 100644 --- a/internal/service/glue/ml_transform_test.go +++ b/internal/service/glue/ml_transform_test.go @@ -259,11 +259,11 @@ func TestAccGlueMlTransform_tags(t *testing.T) { CheckDestroy: testAccCheckMLTransformDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMLTransformConfig_tags1(rName, "key1", "value1"), + Config: testAccMLTransformConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMLTransformExists(ctx, resourceName, &transform1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -272,20 +272,20 @@ func TestAccGlueMlTransform_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMLTransformConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMLTransformConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMLTransformExists(ctx, resourceName, &transform2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMLTransformConfig_tags1(rName, "key2", "value2"), + Config: testAccMLTransformConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMLTransformExists(ctx, resourceName, &transform3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/partition_test.go b/internal/service/glue/partition_test.go index 91a25d7f42a..5ae74cf5b1d 100644 --- a/internal/service/glue/partition_test.go +++ b/internal/service/glue/partition_test.go @@ -96,11 +96,11 @@ func TestAccGluePartition_parameters(t *testing.T) { CheckDestroy: testAccCheckPartitionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPartitionConfig_parameters1(rName, parValue, "key1", "value1"), + Config: testAccPartitionConfig_parameters1(rName, parValue, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPartitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "parameters.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "parameters.key1", acctest.CtValue1), ), }, { @@ -109,20 +109,20 @@ func TestAccGluePartition_parameters(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPartitionConfig_parameters2(rName, parValue, "key1", "valueUpdated1", "key2", "value2"), + Config: testAccPartitionConfig_parameters2(rName, parValue, acctest.CtKey1, "valueUpdated1", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPartitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "parameters.key1", "valueUpdated1"), - resource.TestCheckResourceAttr(resourceName, "parameters.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "parameters.key2", acctest.CtValue2), ), }, { - Config: testAccPartitionConfig_parameters1(rName, parValue, "key2", "value2"), + Config: testAccPartitionConfig_parameters1(rName, parValue, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPartitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "parameters.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "parameters.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "parameters.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/registry_test.go b/internal/service/glue/registry_test.go index 668297da2eb..7e6437955f2 100644 --- a/internal/service/glue/registry_test.go +++ b/internal/service/glue/registry_test.go @@ -101,11 +101,11 @@ func TestAccGlueRegistry_tags(t *testing.T) { CheckDestroy: testAccCheckRegistryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRegistryConfig_tags1(rName, "key1", "value1"), + Config: testAccRegistryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRegistryExists(ctx, resourceName, ®istry), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -114,20 +114,20 @@ func TestAccGlueRegistry_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRegistryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRegistryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRegistryExists(ctx, resourceName, ®istry), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRegistryConfig_tags1(rName, "key2", "value2"), + Config: testAccRegistryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRegistryExists(ctx, resourceName, ®istry), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/resource_policy_test.go b/internal/service/glue/resource_policy_test.go index 238f664ae7f..7d270442ffe 100644 --- a/internal/service/glue/resource_policy_test.go +++ b/internal/service/glue/resource_policy_test.go @@ -54,9 +54,9 @@ func testAccResourcePolicy_hybrid(t *testing.T) { CheckDestroy: testAccCheckResourcePolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccResourcePolicyConfig_hybrid("glue:CreateTable", "TRUE"), + Config: testAccResourcePolicyConfig_hybrid("glue:CreateTable", acctest.CtTrueCaps), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "enable_hybrid", "TRUE"), + resource.TestCheckResourceAttr(resourceName, "enable_hybrid", acctest.CtTrueCaps), ), }, { @@ -66,15 +66,15 @@ func testAccResourcePolicy_hybrid(t *testing.T) { ImportStateVerifyIgnore: []string{"enable_hybrid"}, }, { - Config: testAccResourcePolicyConfig_hybrid("glue:CreateTable", "FALSE"), + Config: testAccResourcePolicyConfig_hybrid("glue:CreateTable", acctest.CtFalseCaps), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "enable_hybrid", "FALSE"), + resource.TestCheckResourceAttr(resourceName, "enable_hybrid", acctest.CtFalseCaps), ), }, { - Config: testAccResourcePolicyConfig_hybrid("glue:CreateTable", "TRUE"), + Config: testAccResourcePolicyConfig_hybrid("glue:CreateTable", acctest.CtTrueCaps), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "enable_hybrid", "TRUE"), + resource.TestCheckResourceAttr(resourceName, "enable_hybrid", acctest.CtTrueCaps), ), }, }, diff --git a/internal/service/glue/schema_test.go b/internal/service/glue/schema_test.go index ec6206a3045..f2eebe9a703 100644 --- a/internal/service/glue/schema_test.go +++ b/internal/service/glue/schema_test.go @@ -206,11 +206,11 @@ func TestAccGlueSchema_tags(t *testing.T) { CheckDestroy: testAccCheckSchemaDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSchemaConfig_tags1(rName, "key1", "value1"), + Config: testAccSchemaConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSchemaExists(ctx, resourceName, &schema), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -219,20 +219,20 @@ func TestAccGlueSchema_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSchemaConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSchemaConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSchemaExists(ctx, resourceName, &schema), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSchemaConfig_tags1(rName, "key2", "value2"), + Config: testAccSchemaConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSchemaExists(ctx, resourceName, &schema), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/trigger_test.go b/internal/service/glue/trigger_test.go index 2489978b2eb..34f79e045f0 100644 --- a/internal/service/glue/trigger_test.go +++ b/internal/service/glue/trigger_test.go @@ -318,11 +318,11 @@ func TestAccGlueTrigger_tags(t *testing.T) { CheckDestroy: testAccCheckTriggerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTriggerConfig_tags1(rName, "key1", "value1"), + Config: testAccTriggerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTriggerExists(ctx, resourceName, &trigger1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -332,20 +332,20 @@ func TestAccGlueTrigger_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrEnabled}, }, { - Config: testAccTriggerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTriggerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTriggerExists(ctx, resourceName, &trigger2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTriggerConfig_tags1(rName, "key2", "value2"), + Config: testAccTriggerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTriggerExists(ctx, resourceName, &trigger3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/glue/workflow_test.go b/internal/service/glue/workflow_test.go index 68d32d87f2c..6d604694da7 100644 --- a/internal/service/glue/workflow_test.go +++ b/internal/service/glue/workflow_test.go @@ -174,11 +174,11 @@ func TestAccGlueWorkflow_tags(t *testing.T) { CheckDestroy: testAccCheckWorkflowDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkflowConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkflowConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName, &workflow), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -187,20 +187,20 @@ func TestAccGlueWorkflow_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWorkflowConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkflowConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName, &workflow), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkflowConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkflowConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName, &workflow), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 9b267aeab29367feaa75bdc5fd8be10ee2a01fad Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:44 -0400 Subject: [PATCH 091/180] grafana: Use constants for test strings --- internal/service/grafana/workspace_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/grafana/workspace_test.go b/internal/service/grafana/workspace_test.go index 5ac2bec3e1f..49b0cc4bf9b 100644 --- a/internal/service/grafana/workspace_test.go +++ b/internal/service/grafana/workspace_test.go @@ -238,11 +238,11 @@ func testAccWorkspace_tags(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccWorkspaceConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkspaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkspaceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -251,20 +251,20 @@ func testAccWorkspace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWorkspaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkspaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkspaceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkspaceConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkspaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkspaceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From cb18ce49530d60e37c039ed6ea035414aff44b84 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:44 -0400 Subject: [PATCH 092/180] guardduty: Use constants for test strings --- internal/service/guardduty/detector_test.go | 12 ++++++------ internal/service/guardduty/ipset_test.go | 12 ++++++------ internal/service/guardduty/threatintelset_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/guardduty/detector_test.go b/internal/service/guardduty/detector_test.go index cca00608112..0a5f29041bc 100644 --- a/internal/service/guardduty/detector_test.go +++ b/internal/service/guardduty/detector_test.go @@ -89,11 +89,11 @@ func testAccDetector_tags(t *testing.T) { CheckDestroy: testAccCheckDetectorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDetectorConfig_tags1("key1", "value1"), + Config: testAccDetectorConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDetectorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func testAccDetector_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDetectorConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccDetectorConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDetectorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDetectorConfig_tags1("key2", "value2"), + Config: testAccDetectorConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDetectorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/guardduty/ipset_test.go b/internal/service/guardduty/ipset_test.go index 864c336d0e5..5e0f7e28ccb 100644 --- a/internal/service/guardduty/ipset_test.go +++ b/internal/service/guardduty/ipset_test.go @@ -83,11 +83,11 @@ func testAccIPSet_tags(t *testing.T) { CheckDestroy: testAccCheckIPSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPSetConfig_tags1(rName, "key1", "value1"), + Config: testAccIPSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIPSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -96,20 +96,20 @@ func testAccIPSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPSetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccIPSetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPSetConfig_tags1(rName, "key2", "value2"), + Config: testAccIPSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIPSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/guardduty/threatintelset_test.go b/internal/service/guardduty/threatintelset_test.go index f4eaf53c501..c15777511ed 100644 --- a/internal/service/guardduty/threatintelset_test.go +++ b/internal/service/guardduty/threatintelset_test.go @@ -83,11 +83,11 @@ func testAccThreatIntelSet_tags(t *testing.T) { CheckDestroy: testAccCheckThreatIntelSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccThreatIntelSetConfig_tags1(rName, "key1", "value1"), + Config: testAccThreatIntelSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckThreatIntelSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -96,20 +96,20 @@ func testAccThreatIntelSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccThreatIntelSetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccThreatIntelSetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThreatIntelSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccThreatIntelSetConfig_tags1(rName, "key2", "value2"), + Config: testAccThreatIntelSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThreatIntelSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 0352a2ad85e23bd159e8f6780325dadb0cbb5b04 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:44 -0400 Subject: [PATCH 093/180] iam: Use constants for test strings --- .../iam/instance_profile_tags_gen_test.go | 148 +++++++++--------- .../openid_connect_provider_tags_gen_test.go | 148 +++++++++--------- internal/service/iam/policy_tags_gen_test.go | 148 +++++++++--------- internal/service/iam/role_tags_gen_test.go | 148 +++++++++--------- internal/service/iam/saml_provider_test.go | 12 +- .../service/iam/server_certificate_test.go | 12 +- .../iam/service_linked_role_tags_gen_test.go | 148 +++++++++--------- internal/service/iam/user_tags_gen_test.go | 148 +++++++++--------- .../iam/virtual_mfa_device_tags_gen_test.go | 148 +++++++++--------- 9 files changed, 530 insertions(+), 530 deletions(-) diff --git a/internal/service/iam/instance_profile_tags_gen_test.go b/internal/service/iam/instance_profile_tags_gen_test.go index dbac5134414..a43ebe3d23a 100644 --- a/internal/service/iam/instance_profile_tags_gen_test.go +++ b/internal/service/iam/instance_profile_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccIAMInstanceProfile_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccIAMInstanceProfile_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccIAMInstanceProfile_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccIAMInstanceProfile_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccIAMInstanceProfile_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccIAMInstanceProfile_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccIAMInstanceProfile_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccIAMInstanceProfile_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccIAMInstanceProfile_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccIAMInstanceProfile_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccIAMInstanceProfile_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToProviderOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToProviderOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToProviderOnly(t *testing. testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToProviderOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToResourceOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToResourceOnly(t *testing. testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToResourceOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_updateToResourceOnly(t *testing. ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_nullOverlappingResourceTag(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccIAMInstanceProfile_tags_DefaultTags_nullOverlappingResourceTag(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccIAMInstanceProfile_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccIAMInstanceProfile_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccIAMInstanceProfile_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccIAMInstanceProfile_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccIAMInstanceProfile_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/InstanceProfile/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceProfileExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccIAMInstanceProfile_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/InstanceProfile/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/iam/openid_connect_provider_tags_gen_test.go b/internal/service/iam/openid_connect_provider_tags_gen_test.go index 586e073e2c6..e967114a946 100644 --- a/internal/service/iam/openid_connect_provider_tags_gen_test.go +++ b/internal/service/iam/openid_connect_provider_tags_gen_test.go @@ -30,13 +30,13 @@ func TestAccIAMOpenIDConnectProvider_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -44,7 +44,7 @@ func TestAccIAMOpenIDConnectProvider_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -56,15 +56,15 @@ func TestAccIAMOpenIDConnectProvider_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -72,8 +72,8 @@ func TestAccIAMOpenIDConnectProvider_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -85,13 +85,13 @@ func TestAccIAMOpenIDConnectProvider_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -99,7 +99,7 @@ func TestAccIAMOpenIDConnectProvider_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -147,7 +147,7 @@ func TestAccIAMOpenIDConnectProvider_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -160,7 +160,7 @@ func TestAccIAMOpenIDConnectProvider_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -207,13 +207,13 @@ func TestAccIAMOpenIDConnectProvider_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -221,7 +221,7 @@ func TestAccIAMOpenIDConnectProvider_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -248,7 +248,7 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -262,7 +262,7 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -310,13 +310,13 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -324,14 +324,14 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -340,8 +340,8 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -353,13 +353,13 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -367,7 +367,7 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -394,13 +394,13 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Replace(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -408,7 +408,7 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Replace(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -422,7 +422,7 @@ func TestAccIAMOpenIDConnectProvider_tags_EmptyTag_OnUpdate_Replace(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -449,7 +449,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -457,7 +457,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -466,7 +466,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -480,8 +480,8 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -490,7 +490,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -499,8 +499,8 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -514,7 +514,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -531,7 +531,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -827,15 +827,15 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToProviderOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -844,7 +844,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToProviderOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -852,7 +852,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToProviderOnly(t *te testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -861,7 +861,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToProviderOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -889,7 +889,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToResourceOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -897,7 +897,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToResourceOnly(t *te testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -906,15 +906,15 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToResourceOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -923,7 +923,7 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_updateToResourceOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -950,10 +950,10 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_emptyResourceTag(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -970,10 +970,10 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_emptyResourceTag(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1000,10 +1000,10 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_nullOverlappingResourceTag ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1019,10 +1019,10 @@ func TestAccIAMOpenIDConnectProvider_tags_DefaultTags_nullOverlappingResourceTag ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1148,13 +1148,13 @@ func TestAccIAMOpenIDConnectProvider_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1163,13 +1163,13 @@ func TestAccIAMOpenIDConnectProvider_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1191,8 +1191,8 @@ func TestAccIAMOpenIDConnectProvider_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1218,13 +1218,13 @@ func TestAccIAMOpenIDConnectProvider_tags_ComputedTag_OnUpdate_Replace(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1232,7 +1232,7 @@ func TestAccIAMOpenIDConnectProvider_tags_ComputedTag_OnUpdate_Replace(t *testin ConfigDirectory: config.StaticDirectory("testdata/OpenIDConnectProvider/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckOpenIDConnectProviderExists(ctx, resourceName), @@ -1257,7 +1257,7 @@ func TestAccIAMOpenIDConnectProvider_tags_ComputedTag_OnUpdate_Replace(t *testin ConfigDirectory: config.StaticDirectory("testdata/OpenIDConnectProvider/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/iam/policy_tags_gen_test.go b/internal/service/iam/policy_tags_gen_test.go index 9897caf223a..56136fe3922 100644 --- a/internal/service/iam/policy_tags_gen_test.go +++ b/internal/service/iam/policy_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccIAMPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccIAMPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccIAMPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccIAMPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccIAMPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccIAMPolicy_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccIAMPolicy_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccIAMPolicy_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccIAMPolicy_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccIAMPolicy_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccIAMPolicy_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccIAMPolicy_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccIAMPolicy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccIAMPolicy_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToProviderOnly(t *testing.T) { testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToResourceOnly(t *testing.T) { testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccIAMPolicy_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccIAMPolicy_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccIAMPolicy_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccIAMPolicy_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccIAMPolicy_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccIAMPolicy_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccIAMPolicy_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccIAMPolicy_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccIAMPolicy_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccIAMPolicy_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/Policy/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccIAMPolicy_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/Policy/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/iam/role_tags_gen_test.go b/internal/service/iam/role_tags_gen_test.go index 42886222d30..a50abf5791a 100644 --- a/internal/service/iam/role_tags_gen_test.go +++ b/internal/service/iam/role_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccIAMRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccIAMRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccIAMRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccIAMRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccIAMRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccIAMRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccIAMRole_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccIAMRole_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccIAMRole_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccIAMRole_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccIAMRole_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccIAMRole_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccIAMRole_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccIAMRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccIAMRole_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccIAMRole_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccIAMRole_tags_DefaultTags_updateToProviderOnly(t *testing.T) { testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccIAMRole_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccIAMRole_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccIAMRole_tags_DefaultTags_updateToResourceOnly(t *testing.T) { testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccIAMRole_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccIAMRole_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccIAMRole_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccIAMRole_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccIAMRole_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccIAMRole_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccIAMRole_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccIAMRole_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/Role/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRoleExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccIAMRole_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/Role/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/iam/saml_provider_test.go b/internal/service/iam/saml_provider_test.go index 6e116120b61..32893832662 100644 --- a/internal/service/iam/saml_provider_test.go +++ b/internal/service/iam/saml_provider_test.go @@ -72,11 +72,11 @@ func TestAccIAMSAMLProvider_tags(t *testing.T) { CheckDestroy: testAccCheckSAMLProviderDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSAMLProviderConfig_tags1(rName, idpEntityId, "key1", "value1"), + Config: testAccSAMLProviderConfig_tags1(rName, idpEntityId, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSAMLProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -85,20 +85,20 @@ func TestAccIAMSAMLProvider_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSAMLProviderConfig_tags2(rName, idpEntityId, "key1", "value1updated", "key2", "value2"), + Config: testAccSAMLProviderConfig_tags2(rName, idpEntityId, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSAMLProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSAMLProviderConfig_tags1(rName, idpEntityId, "key2", "value2"), + Config: testAccSAMLProviderConfig_tags1(rName, idpEntityId, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSAMLProviderExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iam/server_certificate_test.go b/internal/service/iam/server_certificate_test.go index 16dd25c2ddd..92201ad9e9b 100644 --- a/internal/service/iam/server_certificate_test.go +++ b/internal/service/iam/server_certificate_test.go @@ -151,11 +151,11 @@ func TestAccIAMServerCertificate_tags(t *testing.T) { CheckDestroy: testAccCheckServerCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServerCertificateConfig_tags1(rName, key, certificate, "key1", "value1"), + Config: testAccServerCertificateConfig_tags1(rName, key, certificate, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCertExists(ctx, resourceName, &cert), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -166,20 +166,20 @@ func TestAccIAMServerCertificate_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPrivateKey}, }, { - Config: testAccServerCertificateConfig_tags2(rName, key, certificate, "key1", "value1updated", "key2", "value2"), + Config: testAccServerCertificateConfig_tags2(rName, key, certificate, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCertExists(ctx, resourceName, &cert), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServerCertificateConfig_tags1(rName, key, certificate, "key2", "value2"), + Config: testAccServerCertificateConfig_tags1(rName, key, certificate, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCertExists(ctx, resourceName, &cert), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iam/service_linked_role_tags_gen_test.go b/internal/service/iam/service_linked_role_tags_gen_test.go index 4c5f4e16820..1e1afad4327 100644 --- a/internal/service/iam/service_linked_role_tags_gen_test.go +++ b/internal/service/iam/service_linked_role_tags_gen_test.go @@ -30,13 +30,13 @@ func TestAccIAMServiceLinkedRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -44,7 +44,7 @@ func TestAccIAMServiceLinkedRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -56,15 +56,15 @@ func TestAccIAMServiceLinkedRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -72,8 +72,8 @@ func TestAccIAMServiceLinkedRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -85,13 +85,13 @@ func TestAccIAMServiceLinkedRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -99,7 +99,7 @@ func TestAccIAMServiceLinkedRole_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -147,7 +147,7 @@ func TestAccIAMServiceLinkedRole_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -160,7 +160,7 @@ func TestAccIAMServiceLinkedRole_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -207,13 +207,13 @@ func TestAccIAMServiceLinkedRole_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -221,7 +221,7 @@ func TestAccIAMServiceLinkedRole_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -248,7 +248,7 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -262,7 +262,7 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -310,13 +310,13 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -324,14 +324,14 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -340,8 +340,8 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -353,13 +353,13 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -367,7 +367,7 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -394,13 +394,13 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -408,7 +408,7 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -422,7 +422,7 @@ func TestAccIAMServiceLinkedRole_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -449,7 +449,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -457,7 +457,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -466,7 +466,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -480,8 +480,8 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -490,7 +490,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -499,8 +499,8 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -514,7 +514,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -531,7 +531,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -827,15 +827,15 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToProviderOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -844,7 +844,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToProviderOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -852,7 +852,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToProviderOnly(t *testin testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -861,7 +861,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToProviderOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -889,7 +889,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToResourceOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -897,7 +897,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToResourceOnly(t *testin testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -906,15 +906,15 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToResourceOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -923,7 +923,7 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_updateToResourceOnly(t *testin ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -950,10 +950,10 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_emptyResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -970,10 +970,10 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_emptyResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1000,10 +1000,10 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_nullOverlappingResourceTag(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1019,10 +1019,10 @@ func TestAccIAMServiceLinkedRole_tags_DefaultTags_nullOverlappingResourceTag(t * ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1148,13 +1148,13 @@ func TestAccIAMServiceLinkedRole_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1163,13 +1163,13 @@ func TestAccIAMServiceLinkedRole_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1191,8 +1191,8 @@ func TestAccIAMServiceLinkedRole_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1218,13 +1218,13 @@ func TestAccIAMServiceLinkedRole_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1232,7 +1232,7 @@ func TestAccIAMServiceLinkedRole_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigDirectory: config.StaticDirectory("testdata/ServiceLinkedRole/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServiceLinkedRoleExists(ctx, resourceName), @@ -1257,7 +1257,7 @@ func TestAccIAMServiceLinkedRole_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigDirectory: config.StaticDirectory("testdata/ServiceLinkedRole/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/iam/user_tags_gen_test.go b/internal/service/iam/user_tags_gen_test.go index 121b0f4b182..d7ecb5a15ee 100644 --- a/internal/service/iam/user_tags_gen_test.go +++ b/internal/service/iam/user_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccIAMUser_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccIAMUser_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -61,15 +61,15 @@ func TestAccIAMUser_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -77,8 +77,8 @@ func TestAccIAMUser_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -93,13 +93,13 @@ func TestAccIAMUser_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -107,7 +107,7 @@ func TestAccIAMUser_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -162,7 +162,7 @@ func TestAccIAMUser_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -175,7 +175,7 @@ func TestAccIAMUser_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -226,13 +226,13 @@ func TestAccIAMUser_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -240,7 +240,7 @@ func TestAccIAMUser_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -271,7 +271,7 @@ func TestAccIAMUser_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -285,7 +285,7 @@ func TestAccIAMUser_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -340,13 +340,13 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -354,14 +354,14 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -370,8 +370,8 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -386,13 +386,13 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -400,7 +400,7 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -431,13 +431,13 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -445,7 +445,7 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -459,7 +459,7 @@ func TestAccIAMUser_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -490,7 +490,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -507,7 +507,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -524,8 +524,8 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -534,7 +534,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -543,8 +543,8 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -561,7 +561,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -569,7 +569,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -578,7 +578,7 @@ func TestAccIAMUser_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -901,15 +901,15 @@ func TestAccIAMUser_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,7 +918,7 @@ func TestAccIAMUser_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -926,7 +926,7 @@ func TestAccIAMUser_tags_DefaultTags_updateToProviderOnly(t *testing.T) { testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccIAMUser_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -967,7 +967,7 @@ func TestAccIAMUser_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -975,7 +975,7 @@ func TestAccIAMUser_tags_DefaultTags_updateToResourceOnly(t *testing.T) { testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -984,15 +984,15 @@ func TestAccIAMUser_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1001,7 +1001,7 @@ func TestAccIAMUser_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -1032,10 +1032,10 @@ func TestAccIAMUser_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1052,10 +1052,10 @@ func TestAccIAMUser_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1086,10 +1086,10 @@ func TestAccIAMUser_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1105,10 +1105,10 @@ func TestAccIAMUser_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1246,13 +1246,13 @@ func TestAccIAMUser_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1261,13 +1261,13 @@ func TestAccIAMUser_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1289,8 +1289,8 @@ func TestAccIAMUser_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1320,13 +1320,13 @@ func TestAccIAMUser_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1334,7 +1334,7 @@ func TestAccIAMUser_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/User/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &v), @@ -1359,7 +1359,7 @@ func TestAccIAMUser_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/User/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/iam/virtual_mfa_device_tags_gen_test.go b/internal/service/iam/virtual_mfa_device_tags_gen_test.go index 3e3b677e1c3..767ac1a26bf 100644 --- a/internal/service/iam/virtual_mfa_device_tags_gen_test.go +++ b/internal/service/iam/virtual_mfa_device_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccIAMVirtualMFADevice_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccIAMVirtualMFADevice_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -61,15 +61,15 @@ func TestAccIAMVirtualMFADevice_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -77,8 +77,8 @@ func TestAccIAMVirtualMFADevice_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -93,13 +93,13 @@ func TestAccIAMVirtualMFADevice_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -107,7 +107,7 @@ func TestAccIAMVirtualMFADevice_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -162,7 +162,7 @@ func TestAccIAMVirtualMFADevice_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -175,7 +175,7 @@ func TestAccIAMVirtualMFADevice_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -226,13 +226,13 @@ func TestAccIAMVirtualMFADevice_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -240,7 +240,7 @@ func TestAccIAMVirtualMFADevice_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -271,7 +271,7 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -285,7 +285,7 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -340,13 +340,13 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -354,14 +354,14 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -370,8 +370,8 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -386,13 +386,13 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -400,7 +400,7 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -431,13 +431,13 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -445,7 +445,7 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -459,7 +459,7 @@ func TestAccIAMVirtualMFADevice_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -490,7 +490,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -507,7 +507,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -524,8 +524,8 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -534,7 +534,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -543,8 +543,8 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -561,7 +561,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -569,7 +569,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -578,7 +578,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -901,15 +901,15 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToProviderOnly(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,7 +918,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToProviderOnly(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -926,7 +926,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToProviderOnly(t *testing testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToProviderOnly(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -967,7 +967,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToResourceOnly(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -975,7 +975,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToResourceOnly(t *testing testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -984,15 +984,15 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToResourceOnly(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1001,7 +1001,7 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_updateToResourceOnly(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -1032,10 +1032,10 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_emptyResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1052,10 +1052,10 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_emptyResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1086,10 +1086,10 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_nullOverlappingResourceTag(t *t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1105,10 +1105,10 @@ func TestAccIAMVirtualMFADevice_tags_DefaultTags_nullOverlappingResourceTag(t *t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1246,13 +1246,13 @@ func TestAccIAMVirtualMFADevice_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1261,13 +1261,13 @@ func TestAccIAMVirtualMFADevice_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1289,8 +1289,8 @@ func TestAccIAMVirtualMFADevice_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1320,13 +1320,13 @@ func TestAccIAMVirtualMFADevice_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1334,7 +1334,7 @@ func TestAccIAMVirtualMFADevice_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigDirectory: config.StaticDirectory("testdata/VirtualMFADevice/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVirtualMFADeviceExists(ctx, resourceName, &v), @@ -1359,7 +1359,7 @@ func TestAccIAMVirtualMFADevice_tags_ComputedTag_OnUpdate_Replace(t *testing.T) ConfigDirectory: config.StaticDirectory("testdata/VirtualMFADevice/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, From f9ed9a3f397228ceb3fff3895afe0ba5a4f3b665 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:44 -0400 Subject: [PATCH 094/180] imagebuilder: Use constants for test strings --- .../service/imagebuilder/component_test.go | 12 +++++------ .../imagebuilder/container_recipe_test.go | 12 +++++------ .../distribution_configuration_test.go | 20 +++++++++---------- .../imagebuilder/image_pipeline_test.go | 12 +++++------ .../service/imagebuilder/image_recipe_test.go | 12 +++++------ internal/service/imagebuilder/image_test.go | 12 +++++------ .../infrastructure_configuration_test.go | 20 +++++++++---------- .../service/imagebuilder/workflow_test.go | 12 +++++------ 8 files changed, 56 insertions(+), 56 deletions(-) diff --git a/internal/service/imagebuilder/component_test.go b/internal/service/imagebuilder/component_test.go index 8f475a0db75..2307d302036 100644 --- a/internal/service/imagebuilder/component_test.go +++ b/internal/service/imagebuilder/component_test.go @@ -238,11 +238,11 @@ func TestAccImageBuilderComponent_tags(t *testing.T) { CheckDestroy: testAccCheckComponentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccComponentConfig_tags1(rName, "key1", "value1"), + Config: testAccComponentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckComponentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -252,20 +252,20 @@ func TestAccImageBuilderComponent_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrSkipDestroy}, }, { - Config: testAccComponentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccComponentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckComponentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccComponentConfig_tags1(rName, "key2", "value2"), + Config: testAccComponentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckComponentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/container_recipe_test.go b/internal/service/imagebuilder/container_recipe_test.go index 32106eca427..b3d37e6ebf4 100644 --- a/internal/service/imagebuilder/container_recipe_test.go +++ b/internal/service/imagebuilder/container_recipe_test.go @@ -605,11 +605,11 @@ func TestAccImageBuilderContainerRecipe_tags(t *testing.T) { CheckDestroy: testAccCheckContainerRecipeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccContainerRecipeConfig_tags1(rName, "key1", "value1"), + Config: testAccContainerRecipeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckContainerRecipeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -618,20 +618,20 @@ func TestAccImageBuilderContainerRecipe_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerRecipeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccContainerRecipeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckContainerRecipeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccContainerRecipeConfig_tags1(rName, "key2", "value2"), + Config: testAccContainerRecipeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckContainerRecipeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/distribution_configuration_test.go b/internal/service/imagebuilder/distribution_configuration_test.go index 712d024115c..9a6d21a0ad9 100644 --- a/internal/service/imagebuilder/distribution_configuration_test.go +++ b/internal/service/imagebuilder/distribution_configuration_test.go @@ -163,14 +163,14 @@ func TestAccImageBuilderDistributionConfiguration_DistributionAMIDistribution_am CheckDestroy: testAccCheckDistributionConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDistributionConfigurationConfig_amiTags(rName, "key1", "value1"), + Config: testAccDistributionConfigurationConfig_amiTags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "distribution.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "distribution.*", map[string]string{ "ami_distribution_configuration.#": acctest.CtOne, "ami_distribution_configuration.0.ami_tags.%": acctest.CtOne, - "ami_distribution_configuration.0.ami_tags.key1": "value1", + "ami_distribution_configuration.0.ami_tags.key1": acctest.CtValue1, }), ), }, @@ -180,7 +180,7 @@ func TestAccImageBuilderDistributionConfiguration_DistributionAMIDistribution_am ImportStateVerify: true, }, { - Config: testAccDistributionConfigurationConfig_amiTags(rName, "key2", "value2"), + Config: testAccDistributionConfigurationConfig_amiTags(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionConfigurationExists(ctx, resourceName), acctest.CheckResourceAttrRFC3339(resourceName, "date_updated"), @@ -188,7 +188,7 @@ func TestAccImageBuilderDistributionConfiguration_DistributionAMIDistribution_am resource.TestCheckTypeSetElemNestedAttrs(resourceName, "distribution.*", map[string]string{ "ami_distribution_configuration.#": acctest.CtOne, "ami_distribution_configuration.0.ami_tags.%": acctest.CtOne, - "ami_distribution_configuration.0.ami_tags.key2": "value2", + "ami_distribution_configuration.0.ami_tags.key2": acctest.CtValue2, }), ), }, @@ -891,11 +891,11 @@ func TestAccImageBuilderDistributionConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckDistributionConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDistributionConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccDistributionConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -904,20 +904,20 @@ func TestAccImageBuilderDistributionConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDistributionConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDistributionConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDistributionConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccDistributionConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/image_pipeline_test.go b/internal/service/imagebuilder/image_pipeline_test.go index d45974f1d10..53c8a40cfb3 100644 --- a/internal/service/imagebuilder/image_pipeline_test.go +++ b/internal/service/imagebuilder/image_pipeline_test.go @@ -611,11 +611,11 @@ func TestAccImageBuilderImagePipeline_tags(t *testing.T) { CheckDestroy: testAccCheckImagePipelineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccImagePipelineConfig_tags1(rName, "key1", "value1"), + Config: testAccImagePipelineConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckImagePipelineExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -624,20 +624,20 @@ func TestAccImageBuilderImagePipeline_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccImagePipelineConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccImagePipelineConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImagePipelineExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccImagePipelineConfig_tags1(rName, "key2", "value2"), + Config: testAccImagePipelineConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImagePipelineExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/image_recipe_test.go b/internal/service/imagebuilder/image_recipe_test.go index 5cf93b7968e..8d5ab32f75e 100644 --- a/internal/service/imagebuilder/image_recipe_test.go +++ b/internal/service/imagebuilder/image_recipe_test.go @@ -536,11 +536,11 @@ func TestAccImageBuilderImageRecipe_tags(t *testing.T) { CheckDestroy: testAccCheckImageRecipeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccImageRecipeConfig_tags1(rName, "key1", "value1"), + Config: testAccImageRecipeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckImageRecipeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -549,20 +549,20 @@ func TestAccImageBuilderImageRecipe_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccImageRecipeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccImageRecipeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageRecipeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccImageRecipeConfig_tags1(rName, "key2", "value2"), + Config: testAccImageRecipeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageRecipeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/image_test.go b/internal/service/imagebuilder/image_test.go index 402ef454d36..869f067ce78 100644 --- a/internal/service/imagebuilder/image_test.go +++ b/internal/service/imagebuilder/image_test.go @@ -211,11 +211,11 @@ func TestAccImageBuilderImage_tags(t *testing.T) { CheckDestroy: testAccCheckImageDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccImageConfig_tags1(rName, "key1", "value1"), + Config: testAccImageConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckImageExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -224,20 +224,20 @@ func TestAccImageBuilderImage_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccImageConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccImageConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccImageConfig_tags1(rName, "key2", "value2"), + Config: testAccImageConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/infrastructure_configuration_test.go b/internal/service/imagebuilder/infrastructure_configuration_test.go index 7e5f4a3bdb6..06a7279a5c8 100644 --- a/internal/service/imagebuilder/infrastructure_configuration_test.go +++ b/internal/service/imagebuilder/infrastructure_configuration_test.go @@ -360,11 +360,11 @@ func TestAccImageBuilderInfrastructureConfiguration_resourceTags(t *testing.T) { CheckDestroy: testAccCheckInfrastructureConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInfrastructureConfigurationConfig_resourceTags(rName, "key1", "value1"), + Config: testAccInfrastructureConfigurationConfig_resourceTags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInfrastructureConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "resource_tags.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "resource_tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "resource_tags.key1", acctest.CtValue1), ), }, { @@ -373,12 +373,12 @@ func TestAccImageBuilderInfrastructureConfiguration_resourceTags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccInfrastructureConfigurationConfig_resourceTags(rName, "key2", "value2"), + Config: testAccInfrastructureConfigurationConfig_resourceTags(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInfrastructureConfigurationExists(ctx, resourceName), acctest.CheckResourceAttrRFC3339(resourceName, "date_updated"), resource.TestCheckResourceAttr(resourceName, "resource_tags.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "resource_tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "resource_tags.key2", acctest.CtValue2), ), }, }, @@ -510,11 +510,11 @@ func TestAccImageBuilderInfrastructureConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckInfrastructureConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInfrastructureConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccInfrastructureConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInfrastructureConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -523,20 +523,20 @@ func TestAccImageBuilderInfrastructureConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccInfrastructureConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccInfrastructureConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInfrastructureConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInfrastructureConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccInfrastructureConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInfrastructureConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/imagebuilder/workflow_test.go b/internal/service/imagebuilder/workflow_test.go index 9dcd169c8d6..7a5407052e6 100644 --- a/internal/service/imagebuilder/workflow_test.go +++ b/internal/service/imagebuilder/workflow_test.go @@ -175,11 +175,11 @@ func TestAccImageBuilderWorkflow_tags(t *testing.T) { CheckDestroy: testAccCheckWorkflowDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkflowConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkflowConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -188,20 +188,20 @@ func TestAccImageBuilderWorkflow_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWorkflowConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkflowConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkflowConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkflowConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 92033a588e501cef2d2ec9c65ca20ae576569da3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:45 -0400 Subject: [PATCH 095/180] inspector: Use constants for test strings --- .../service/inspector/assessment_template_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/inspector/assessment_template_test.go b/internal/service/inspector/assessment_template_test.go index 37a2989e33a..7f307e79d6d 100644 --- a/internal/service/inspector/assessment_template_test.go +++ b/internal/service/inspector/assessment_template_test.go @@ -90,11 +90,11 @@ func TestAccInspectorAssessmentTemplate_tags(t *testing.T) { CheckDestroy: testAccCheckTemplateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAssessmentTemplateConfig_tags1(rName, "key1", "value1"), + Config: testAccAssessmentTemplateConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTemplateExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -103,20 +103,20 @@ func TestAccInspectorAssessmentTemplate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAssessmentTemplateConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAssessmentTemplateConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTemplateExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAssessmentTemplateConfig_tags1(rName, "key2", "value2"), + Config: testAccAssessmentTemplateConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTemplateExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { From 841c646611d688107854c7759faf257e762b48ca Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:45 -0400 Subject: [PATCH 096/180] internetmonitor: Use constants for test strings --- internal/service/internetmonitor/monitor_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/internetmonitor/monitor_test.go b/internal/service/internetmonitor/monitor_test.go index c9917ad7128..7052169cc07 100644 --- a/internal/service/internetmonitor/monitor_test.go +++ b/internal/service/internetmonitor/monitor_test.go @@ -96,11 +96,11 @@ func TestAccInternetMonitorMonitor_tags(t *testing.T) { CheckDestroy: testAccCheckMonitorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMonitorConfig_tags1(rName, "key1", "value1"), + Config: testAccMonitorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMonitorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -109,20 +109,20 @@ func TestAccInternetMonitorMonitor_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMonitorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMonitorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMonitorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMonitorConfig_tags1(rName, "key2", "value2"), + Config: testAccMonitorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMonitorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 837c0012985392957bd421f08863f2a925975d8e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:45 -0400 Subject: [PATCH 097/180] iot: Use constants for test strings --- internal/service/iot/billing_group_test.go | 12 ++++++------ internal/service/iot/ca_certificate_test.go | 12 ++++++------ internal/service/iot/domain_configuration_test.go | 12 ++++++------ internal/service/iot/policy_test.go | 12 ++++++------ internal/service/iot/provisioning_template_test.go | 12 ++++++------ internal/service/iot/role_alias_test.go | 12 ++++++------ internal/service/iot/thing_group_test.go | 12 ++++++------ internal/service/iot/thing_type_test.go | 12 ++++++------ internal/service/iot/topic_rule_test.go | 12 ++++++------ 9 files changed, 54 insertions(+), 54 deletions(-) diff --git a/internal/service/iot/billing_group_test.go b/internal/service/iot/billing_group_test.go index 6546e9b5806..eebc3ad9db0 100644 --- a/internal/service/iot/billing_group_test.go +++ b/internal/service/iot/billing_group_test.go @@ -91,11 +91,11 @@ func TestAccIoTBillingGroup_tags(t *testing.T) { CheckDestroy: testAccCheckBillingGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBillingGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccBillingGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBillingGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -104,20 +104,20 @@ func TestAccIoTBillingGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBillingGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccBillingGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBillingGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBillingGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccBillingGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBillingGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/ca_certificate_test.go b/internal/service/iot/ca_certificate_test.go index 95a7515d0ac..67fd0dd6b1f 100644 --- a/internal/service/iot/ca_certificate_test.go +++ b/internal/service/iot/ca_certificate_test.go @@ -88,28 +88,28 @@ func TestAccIoTCACertificate_tags(t *testing.T) { CheckDestroy: testAccCheckCACertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCACertificateConfig_tags1(caCertificate, "key1", "value1"), + Config: testAccCACertificateConfig_tags1(caCertificate, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCACertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccCACertificateConfig_tags2(caCertificate, "key1", "value1updated", "key2", "value2"), + Config: testAccCACertificateConfig_tags2(caCertificate, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCACertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCACertificateConfig_tags1(caCertificate, "key2", "value2"), + Config: testAccCACertificateConfig_tags1(caCertificate, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCACertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/domain_configuration_test.go b/internal/service/iot/domain_configuration_test.go index 1d5eee89ff0..9fbb153370d 100644 --- a/internal/service/iot/domain_configuration_test.go +++ b/internal/service/iot/domain_configuration_test.go @@ -98,11 +98,11 @@ func TestAccIoTDomainConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckDomainConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfigurationConfig_tags1(rName, rootDomain, domain, "key1", "value1"), + Config: testAccDomainConfigurationConfig_tags1(rName, rootDomain, domain, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -111,20 +111,20 @@ func TestAccIoTDomainConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfigurationConfig_tags2(rName, rootDomain, domain, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfigurationConfig_tags2(rName, rootDomain, domain, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfigurationConfig_tags1(rName, rootDomain, domain, "key2", "value2"), + Config: testAccDomainConfigurationConfig_tags1(rName, rootDomain, domain, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/policy_test.go b/internal/service/iot/policy_test.go index 72ad826571d..2afb961db33 100644 --- a/internal/service/iot/policy_test.go +++ b/internal/service/iot/policy_test.go @@ -93,11 +93,11 @@ func TestAccIoTPolicy_tags(t *testing.T) { CheckDestroy: testAccCheckPolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPolicyConfig_tags1(rName, "key1", "value1"), + Config: testAccPolicyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccIoTPolicy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPolicyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPolicyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPolicyConfig_tags1(rName, "key2", "value2"), + Config: testAccPolicyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/provisioning_template_test.go b/internal/service/iot/provisioning_template_test.go index cd39145b962..176a5738116 100644 --- a/internal/service/iot/provisioning_template_test.go +++ b/internal/service/iot/provisioning_template_test.go @@ -91,11 +91,11 @@ func TestAccIoTProvisioningTemplate_tags(t *testing.T) { CheckDestroy: testAccCheckProvisioningTemplateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProvisioningTemplateConfig_tags1(rName, "key1", "value1"), + Config: testAccProvisioningTemplateConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisioningTemplateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), testAccCheckProvisioningTemplateNumVersions(ctx, rName, 1), ), }, @@ -105,21 +105,21 @@ func TestAccIoTProvisioningTemplate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProvisioningTemplateConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProvisioningTemplateConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisioningTemplateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), testAccCheckProvisioningTemplateNumVersions(ctx, rName, 1), ), }, { - Config: testAccProvisioningTemplateConfig_tags1(rName, "key2", "value2"), + Config: testAccProvisioningTemplateConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisioningTemplateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), testAccCheckProvisioningTemplateNumVersions(ctx, rName, 1), ), }, diff --git a/internal/service/iot/role_alias_test.go b/internal/service/iot/role_alias_test.go index b93a0bbabd6..a3dcdfc1ad2 100644 --- a/internal/service/iot/role_alias_test.go +++ b/internal/service/iot/role_alias_test.go @@ -146,11 +146,11 @@ func TestAccIoTRoleAlias_tags(t *testing.T) { CheckDestroy: testAccCheckPolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRoleAliasConfig_tags1(rName, "key1", "value1"), + Config: testAccRoleAliasConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRoleAliasExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -159,20 +159,20 @@ func TestAccIoTRoleAlias_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRoleAliasConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRoleAliasConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRoleAliasExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRoleAliasConfig_tags1(rName, "key2", "value2"), + Config: testAccRoleAliasConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRoleAliasExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/thing_group_test.go b/internal/service/iot/thing_group_test.go index c7357769b02..0562bbeb5fb 100644 --- a/internal/service/iot/thing_group_test.go +++ b/internal/service/iot/thing_group_test.go @@ -94,11 +94,11 @@ func TestAccIoTThingGroup_tags(t *testing.T) { CheckDestroy: testAccCheckThingGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccThingGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccThingGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckThingGroupExists(ctx, resourceName, &thingGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -107,20 +107,20 @@ func TestAccIoTThingGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccThingGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccThingGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThingGroupExists(ctx, resourceName, &thingGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccThingGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccThingGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThingGroupExists(ctx, resourceName, &thingGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/thing_type_test.go b/internal/service/iot/thing_type_test.go index 7efd45f4108..80638543f4f 100644 --- a/internal/service/iot/thing_type_test.go +++ b/internal/service/iot/thing_type_test.go @@ -122,11 +122,11 @@ func TestAccIoTThingType_tags(t *testing.T) { CheckDestroy: testAccCheckThingTypeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccThingTypeConfig_tags1(rName, "key1", "value1"), + Config: testAccThingTypeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckThingTypeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -135,20 +135,20 @@ func TestAccIoTThingType_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccThingTypeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccThingTypeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThingTypeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccThingTypeConfig_tags1(rName, "key2", "value2"), + Config: testAccThingTypeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThingTypeExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/iot/topic_rule_test.go b/internal/service/iot/topic_rule_test.go index 029542bd3d2..fe5690b88c1 100644 --- a/internal/service/iot/topic_rule_test.go +++ b/internal/service/iot/topic_rule_test.go @@ -116,11 +116,11 @@ func TestAccIoTTopicRule_tags(t *testing.T) { CheckDestroy: testAccCheckTopicRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTopicRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccTopicRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTopicRuleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -129,20 +129,20 @@ func TestAccIoTTopicRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTopicRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTopicRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTopicRuleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTopicRuleConfig_tags1(rName, "key2", "value2"), + Config: testAccTopicRuleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTopicRuleExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 11ee94c06973465c2a3c62a9a7a50435fc37e542 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:45 -0400 Subject: [PATCH 098/180] ivs: Use constants for test strings --- internal/service/ivs/channel_test.go | 12 ++++++------ internal/service/ivs/playback_key_pair_test.go | 12 ++++++------ internal/service/ivs/recording_configuration_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/ivs/channel_test.go b/internal/service/ivs/channel_test.go index 81946550e76..927da1b0203 100644 --- a/internal/service/ivs/channel_test.go +++ b/internal/service/ivs/channel_test.go @@ -76,11 +76,11 @@ func TestAccIVSChannel_tags(t *testing.T) { CheckDestroy: testAccCheckChannelDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccChannelConfig_tags1("key1", "value1"), + Config: testAccChannelConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckChannelExists(ctx, resourceName, &channel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -89,20 +89,20 @@ func TestAccIVSChannel_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccChannelConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccChannelConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckChannelExists(ctx, resourceName, &channel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccChannelConfig_tags1("key2", "value2"), + Config: testAccChannelConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckChannelExists(ctx, resourceName, &channel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ivs/playback_key_pair_test.go b/internal/service/ivs/playback_key_pair_test.go index 34e57c3a8a6..cc4f158fb91 100644 --- a/internal/service/ivs/playback_key_pair_test.go +++ b/internal/service/ivs/playback_key_pair_test.go @@ -127,11 +127,11 @@ func testAccPlaybackKeyPair_tags(t *testing.T) { CheckDestroy: testAccCheckPlaybackKeyPairDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPlaybackKeyPairConfig_tags1(rName, publicKeyPEM, "key1", "value1"), + Config: testAccPlaybackKeyPairConfig_tags1(rName, publicKeyPEM, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPlaybackKeyPairExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -141,20 +141,20 @@ func testAccPlaybackKeyPair_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPublicKey}, }, { - Config: testAccPlaybackKeyPairConfig_tags2(rName, publicKeyPEM, "key1", "value1updated", "key2", "value2"), + Config: testAccPlaybackKeyPairConfig_tags2(rName, publicKeyPEM, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPlaybackKeyPairExists(ctx, resourceName, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPlaybackKeyPairConfig_tags1(rName, publicKeyPEM, "key2", "value2"), + Config: testAccPlaybackKeyPairConfig_tags1(rName, publicKeyPEM, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPlaybackKeyPairExists(ctx, resourceName, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ivs/recording_configuration_test.go b/internal/service/ivs/recording_configuration_test.go index f8e36267aa8..89822499361 100644 --- a/internal/service/ivs/recording_configuration_test.go +++ b/internal/service/ivs/recording_configuration_test.go @@ -185,11 +185,11 @@ func TestAccIVSRecordingConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckRecordingConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRecordingConfigurationConfig_tags1(bucketName, "key1", "value1"), + Config: testAccRecordingConfigurationConfig_tags1(bucketName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRecordingConfigurationExists(ctx, resourceName, &recordingConfiguration), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -198,20 +198,20 @@ func TestAccIVSRecordingConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRecordingConfigurationConfig_tags2(bucketName, "key1", "value1updated", "key2", "value2"), + Config: testAccRecordingConfigurationConfig_tags2(bucketName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRecordingConfigurationExists(ctx, resourceName, &recordingConfiguration), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRecordingConfigurationConfig_tags1(bucketName, "key2", "value2"), + Config: testAccRecordingConfigurationConfig_tags1(bucketName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRecordingConfigurationExists(ctx, resourceName, &recordingConfiguration), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 51e8d3aef7becdc9560013e8b850fc4382d1dea5 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:45 -0400 Subject: [PATCH 099/180] ivschat: Use constants for test strings --- .../service/ivschat/logging_configuration_test.go | 12 ++++++------ internal/service/ivschat/room_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/ivschat/logging_configuration_test.go b/internal/service/ivschat/logging_configuration_test.go index aae74042257..62ae942cc90 100644 --- a/internal/service/ivschat/logging_configuration_test.go +++ b/internal/service/ivschat/logging_configuration_test.go @@ -187,11 +187,11 @@ func TestAccIVSChatLoggingConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckLoggingConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoggingConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccLoggingConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLoggingConfigurationExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -200,22 +200,22 @@ func TestAccIVSChatLoggingConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLoggingConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLoggingConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLoggingConfigurationExists(ctx, resourceName, &v2), testAccCheckLoggingConfigurationNotRecreated(&v1, &v2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLoggingConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccLoggingConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLoggingConfigurationExists(ctx, resourceName, &v3), testAccCheckLoggingConfigurationNotRecreated(&v2, &v3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ivschat/room_test.go b/internal/service/ivschat/room_test.go index 6e50c8d3b74..83371ff2c0f 100644 --- a/internal/service/ivschat/room_test.go +++ b/internal/service/ivschat/room_test.go @@ -73,11 +73,11 @@ func TestAccIVSChatRoom_tags(t *testing.T) { CheckDestroy: testAccCheckRoomDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRoomConfig_tags1("key1", "value1"), + Config: testAccRoomConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRoomExists(ctx, resourceName, &room), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -86,20 +86,20 @@ func TestAccIVSChatRoom_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRoomConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccRoomConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRoomExists(ctx, resourceName, &room), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRoomConfig_tags1("key2", "value2"), + Config: testAccRoomConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRoomExists(ctx, resourceName, &room), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From a9b8098c8a07dfefb27bbf5836723300353c5e6d Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:46 -0400 Subject: [PATCH 100/180] kafka: Use constants for test strings --- internal/service/kafka/cluster_test.go | 12 ++++++------ internal/service/kafka/replicator_test.go | 12 ++++++------ internal/service/kafka/serverless_cluster_test.go | 12 ++++++------ internal/service/kafka/vpc_connection_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/kafka/cluster_test.go b/internal/service/kafka/cluster_test.go index 2cf3719bf89..4c88cba825a 100644 --- a/internal/service/kafka/cluster_test.go +++ b/internal/service/kafka/cluster_test.go @@ -168,11 +168,11 @@ func TestAccKafkaCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -184,20 +184,20 @@ func TestAccKafkaCluster_tags(t *testing.T) { }, }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/kafka/replicator_test.go b/internal/service/kafka/replicator_test.go index 304c0760777..1250a8f56b2 100644 --- a/internal/service/kafka/replicator_test.go +++ b/internal/service/kafka/replicator_test.go @@ -166,11 +166,11 @@ func TestAccKafkaReplicator_tags(t *testing.T) { CheckDestroy: testAccCheckReplicatorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicatorConfig_tags1(rName, "key1", "value1", sourceCluster, targetCluster), + Config: testAccReplicatorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1, sourceCluster, targetCluster), Check: resource.ComposeTestCheckFunc( testAccCheckReplicatorExists(ctx, resourceName, &replicator), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -179,20 +179,20 @@ func TestAccKafkaReplicator_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccReplicatorConfig_tags2(rName, "key1", "value1updated", "key2", "value2", sourceCluster, targetCluster), + Config: testAccReplicatorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2, sourceCluster, targetCluster), Check: resource.ComposeTestCheckFunc( testAccCheckReplicatorExists(ctx, resourceName, &replicator), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReplicatorConfig_tags1(rName, "key2", "value2", sourceCluster, targetCluster), + Config: testAccReplicatorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2, sourceCluster, targetCluster), Check: resource.ComposeTestCheckFunc( testAccCheckReplicatorExists(ctx, resourceName, &replicator), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/kafka/serverless_cluster_test.go b/internal/service/kafka/serverless_cluster_test.go index b2b3ca76dd8..afc4ee6039d 100644 --- a/internal/service/kafka/serverless_cluster_test.go +++ b/internal/service/kafka/serverless_cluster_test.go @@ -95,11 +95,11 @@ func TestAccKafkaServerlessCluster_tags(t *testing.T) { CheckDestroy: testAccCheckServerlessClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServerlessClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccServerlessClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServerlessClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -108,20 +108,20 @@ func TestAccKafkaServerlessCluster_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccServerlessClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServerlessClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServerlessClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServerlessClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccServerlessClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckServerlessClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/kafka/vpc_connection_test.go b/internal/service/kafka/vpc_connection_test.go index e86270d27c8..2bb590bf2c8 100644 --- a/internal/service/kafka/vpc_connection_test.go +++ b/internal/service/kafka/vpc_connection_test.go @@ -64,11 +64,11 @@ func TestAccKafkaVPCConnection_tags(t *testing.T) { CheckDestroy: testAccCheckVPCConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccVPCConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVPCConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -77,20 +77,20 @@ func TestAccKafkaVPCConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVPCConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccVPCConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVPCConnectionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 12f439ba98bafd01c2bd70c1e8bbede28efa06f1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:46 -0400 Subject: [PATCH 101/180] kendra: Use constants for test strings --- internal/service/kendra/data_source_test.go | 12 ++++++------ internal/service/kendra/faq_test.go | 12 ++++++------ .../kendra/query_suggestions_block_list_test.go | 12 ++++++------ internal/service/kendra/thesaurus_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/kendra/data_source_test.go b/internal/service/kendra/data_source_test.go index bf9708fcb42..ce637f297db 100644 --- a/internal/service/kendra/data_source_test.go +++ b/internal/service/kendra/data_source_test.go @@ -348,11 +348,11 @@ func TestAccKendraDataSource_tags(t *testing.T) { CheckDestroy: testAccCheckDataSourceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataSourceConfig_tags1(rName, rName2, rName3, rName4, "key1", "value1"), + Config: testAccDataSourceConfig_tags1(rName, rName2, rName3, rName4, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataSourceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -361,20 +361,20 @@ func TestAccKendraDataSource_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDataSourceConfig_tags2(rName, rName2, rName3, rName4, "key1", "value1updated", "key2", "value2"), + Config: testAccDataSourceConfig_tags2(rName, rName2, rName3, rName4, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSourceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataSourceConfig_tags1(rName, rName2, rName3, rName4, "key2", "value2"), + Config: testAccDataSourceConfig_tags1(rName, rName2, rName3, rName4, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSourceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/kendra/faq_test.go b/internal/service/kendra/faq_test.go index 9f87f8b3b04..dc9c3ec9aa8 100644 --- a/internal/service/kendra/faq_test.go +++ b/internal/service/kendra/faq_test.go @@ -194,11 +194,11 @@ func TestAccKendraFaq_tags(t *testing.T) { CheckDestroy: testAccCheckFaqDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFaqConfig_tags1(rName, rName2, rName3, rName4, rName5, "key1", "value1"), + Config: testAccFaqConfig_tags1(rName, rName2, rName3, rName4, rName5, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFaqExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -207,20 +207,20 @@ func TestAccKendraFaq_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFaqConfig_tags2(rName, rName2, rName3, rName4, rName5, "key1", "value1updated", "key2", "value2"), + Config: testAccFaqConfig_tags2(rName, rName2, rName3, rName4, rName5, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFaqExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFaqConfig_tags1(rName, rName2, rName3, rName4, rName5, "key2", "value2"), + Config: testAccFaqConfig_tags1(rName, rName2, rName3, rName4, rName5, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFaqExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/kendra/query_suggestions_block_list_test.go b/internal/service/kendra/query_suggestions_block_list_test.go index e9ad327b91f..39f5d2e7586 100644 --- a/internal/service/kendra/query_suggestions_block_list_test.go +++ b/internal/service/kendra/query_suggestions_block_list_test.go @@ -290,11 +290,11 @@ func TestAccKendraQuerySuggestionsBlockList_tags(t *testing.T) { CheckDestroy: testAccCheckQuerySuggestionsBlockListDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccQuerySuggestionsBlockListConfig_tags1(rName, "key1", "value1"), + Config: testAccQuerySuggestionsBlockListConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckQuerySuggestionsBlockListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -303,20 +303,20 @@ func TestAccKendraQuerySuggestionsBlockList_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccQuerySuggestionsBlockListConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccQuerySuggestionsBlockListConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQuerySuggestionsBlockListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccQuerySuggestionsBlockListConfig_tags1(rName, "key2", "value2"), + Config: testAccQuerySuggestionsBlockListConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQuerySuggestionsBlockListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/kendra/thesaurus_test.go b/internal/service/kendra/thesaurus_test.go index 0ec5609cb01..899fe05b50b 100644 --- a/internal/service/kendra/thesaurus_test.go +++ b/internal/service/kendra/thesaurus_test.go @@ -113,11 +113,11 @@ func TestAccKendraThesaurus_tags(t *testing.T) { CheckDestroy: testAccCheckThesaurusDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccThesaurusConfig_tags1(rName, "key1", "value1"), + Config: testAccThesaurusConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckThesaurusExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -126,20 +126,20 @@ func TestAccKendraThesaurus_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccThesaurusConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccThesaurusConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThesaurusExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccThesaurusConfig_tags1(rName, "key2", "value2"), + Config: testAccThesaurusConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckThesaurusExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From bfdc1b47b5f6c668e24e9e0457279b04fd30f207 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:46 -0400 Subject: [PATCH 102/180] keyspaces: Use constants for test strings --- internal/service/keyspaces/keyspace_test.go | 12 ++++++------ internal/service/keyspaces/table_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/keyspaces/keyspace_test.go b/internal/service/keyspaces/keyspace_test.go index b59fe451ea8..7d1a11fcd4d 100644 --- a/internal/service/keyspaces/keyspace_test.go +++ b/internal/service/keyspaces/keyspace_test.go @@ -87,11 +87,11 @@ func TestAccKeyspacesKeyspace_tags(t *testing.T) { CheckDestroy: testAccCheckKeyspaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKeyspaceConfig_tags1(rName, "key1", "value1"), + Config: testAccKeyspaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKeyspaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,20 +100,20 @@ func TestAccKeyspacesKeyspace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccKeyspaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccKeyspaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyspaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKeyspaceConfig_tags1(rName, "key2", "value2"), + Config: testAccKeyspaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyspaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/keyspaces/table_test.go b/internal/service/keyspaces/table_test.go index b1eec544878..d5fa5aa9c8d 100644 --- a/internal/service/keyspaces/table_test.go +++ b/internal/service/keyspaces/table_test.go @@ -115,11 +115,11 @@ func TestAccKeyspacesTable_tags(t *testing.T) { CheckDestroy: testAccCheckTableDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTableConfig_tags1(rName1, rName2, "key1", "value1"), + Config: testAccTableConfig_tags1(rName1, rName2, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckTableExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -128,20 +128,20 @@ func TestAccKeyspacesTable_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTableConfig_tags2(rName1, rName2, "key1", "value1updated", "key2", "value2"), + Config: testAccTableConfig_tags2(rName1, rName2, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckTableExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTableConfig_tags1(rName1, rName2, "key2", "value2"), + Config: testAccTableConfig_tags1(rName1, rName2, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckTableExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From b2c05f20014eff746ee813d9be32318964f8ddce Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:46 -0400 Subject: [PATCH 103/180] kinesis: Use constants for test strings --- internal/service/kinesis/migrate_test.go | 2 +- internal/service/kinesis/stream_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/kinesis/migrate_test.go b/internal/service/kinesis/migrate_test.go index 6c5b269dd24..2955d2ed556 100644 --- a/internal/service/kinesis/migrate_test.go +++ b/internal/service/kinesis/migrate_test.go @@ -21,7 +21,7 @@ func testResourceStreamStateDataV0() map[string]interface{} { names.AttrRetentionPeriod: 24, "shard_count": 1, "shard_level_metrics": []interface{}{}, - names.AttrTags: map[string]interface{}{"key1": "value1"}, + names.AttrTags: map[string]interface{}{acctest.CtKey1: acctest.CtValue1}, } } diff --git a/internal/service/kinesis/stream_test.go b/internal/service/kinesis/stream_test.go index 640efc7fb28..61e2dbcf0dc 100644 --- a/internal/service/kinesis/stream_test.go +++ b/internal/service/kinesis/stream_test.go @@ -386,11 +386,11 @@ func TestAccKinesisStream_tags(t *testing.T) { CheckDestroy: testAccCheckStreamDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStreamConfig_tags1(rName, "key1", "value1"), + Config: testAccStreamConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -401,20 +401,20 @@ func TestAccKinesisStream_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"enforce_consumer_deletion"}, }, { - Config: testAccStreamConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStreamConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStreamConfig_tags1(rName, "key2", "value2"), + Config: testAccStreamConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From d312d94f72cfed1ea10e69d4c4ea12bab307fb82 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:46 -0400 Subject: [PATCH 104/180] kinesisanalytics: Use constants for test strings --- .../service/kinesisanalytics/application_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/kinesisanalytics/application_test.go b/internal/service/kinesisanalytics/application_test.go index d62fb1e1097..ae9bb838639 100644 --- a/internal/service/kinesisanalytics/application_test.go +++ b/internal/service/kinesisanalytics/application_test.go @@ -98,11 +98,11 @@ func TestAccKinesisAnalyticsApplication_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, names.AttrVersion, acctest.CtOne), ), }, @@ -112,21 +112,21 @@ func TestAccKinesisAnalyticsApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, names.AttrVersion, acctest.CtOne), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, names.AttrVersion, acctest.CtOne), ), }, From 8d773ae1c198849623f1dd5337accdb5fa308028 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:46 -0400 Subject: [PATCH 105/180] kinesisanalyticsv2: Use constants for test strings --- .../service/kinesisanalyticsv2/application_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/kinesisanalyticsv2/application_test.go b/internal/service/kinesisanalyticsv2/application_test.go index 9889a613b3b..b1c066687e0 100644 --- a/internal/service/kinesisanalyticsv2/application_test.go +++ b/internal/service/kinesisanalyticsv2/application_test.go @@ -373,11 +373,11 @@ func TestAccKinesisAnalyticsV2Application_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "version_id", acctest.CtOne), ), }, @@ -387,21 +387,21 @@ func TestAccKinesisAnalyticsV2Application_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "version_id", acctest.CtOne), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "version_id", acctest.CtOne), ), }, From e3a30d193b69163c08fe8157a23be80acaa01c84 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 106/180] kinesisvideo: Use constants for test strings --- internal/service/kinesisvideo/stream_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/kinesisvideo/stream_test.go b/internal/service/kinesisvideo/stream_test.go index 290048b79fe..5d8592337e0 100644 --- a/internal/service/kinesisvideo/stream_test.go +++ b/internal/service/kinesisvideo/stream_test.go @@ -123,20 +123,20 @@ func TestAccKinesisVideoStream_tags(t *testing.T) { CheckDestroy: testAccCheckStreamDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStreamConfig_tags1(rInt, "key1", "value1"), + Config: testAccStreamConfig_tags1(rInt, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccStreamConfig_tags2(rInt, "key1", "value1", "key2", "value2"), + Config: testAccStreamConfig_tags2(rInt, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -145,11 +145,11 @@ func TestAccKinesisVideoStream_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStreamConfig_tags1(rInt, "key2", "value2"), + Config: testAccStreamConfig_tags1(rInt, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &stream), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f661901e680063723b1d7def2f0ab047ae2fd7ac Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 107/180] kms: Use constants for test strings --- internal/service/kms/external_key_test.go | 12 +++---- internal/service/kms/key_test.go | 32 +++++++++---------- .../service/kms/replica_external_key_test.go | 12 +++---- internal/service/kms/replica_key_test.go | 12 +++---- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/internal/service/kms/external_key_test.go b/internal/service/kms/external_key_test.go index d6e673d0bcf..e5ea357d1c7 100644 --- a/internal/service/kms/external_key_test.go +++ b/internal/service/kms/external_key_test.go @@ -381,11 +381,11 @@ func TestAccKMSExternalKey_tags(t *testing.T) { CheckDestroy: testAccCheckExternalKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccExternalKeyConfig_tags1(rName, "key1", "value1"), + Config: testAccExternalKeyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckExternalKeyExists(ctx, resourceName, &key1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -398,22 +398,22 @@ func TestAccKMSExternalKey_tags(t *testing.T) { }, }, { - Config: testAccExternalKeyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccExternalKeyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExternalKeyExists(ctx, resourceName, &key2), testAccCheckExternalKeyNotRecreated(&key1, &key2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccExternalKeyConfig_tags1(rName, "key2", "value2"), + Config: testAccExternalKeyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExternalKeyExists(ctx, resourceName, &key3), testAccCheckExternalKeyNotRecreated(&key2, &key3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/kms/key_test.go b/internal/service/kms/key_test.go index abd05c7287d..d6d0e56d297 100644 --- a/internal/service/kms/key_test.go +++ b/internal/service/kms/key_test.go @@ -519,11 +519,11 @@ func TestAccKMSKey_tags(t *testing.T) { CheckDestroy: testAccCheckKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKeyConfig_tags1(rName, "key1", "value1"), + Config: testAccKeyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -533,20 +533,20 @@ func TestAccKMSKey_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"deletion_window_in_days", "bypass_policy_lockout_safety_check"}, }, { - Config: testAccKeyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccKeyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKeyConfig_tags1(rName, "key2", "value2"), + Config: testAccKeyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -580,23 +580,23 @@ func TestAccKMSKey_ignoreTags(t *testing.T) { CheckDestroy: testAccCheckKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKeyConfig_ignoreTags(rName, "key1", "value1", "key2", "value2"), + Config: testAccKeyConfig_ignoreTags(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, // Add an ignored tag. { - Config: testAccKeyConfig_ignoreTags(rName, "key1", "value1", "key2", "value2"), + Config: testAccKeyConfig_ignoreTags(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyAddTag(ctx, &key, "ignkey1", "ignvalue1"), ), }, { - Config: testAccKeyConfig_ignoreTags(rName, "key1", "value1updated", "key3", "value3"), + Config: testAccKeyConfig_ignoreTags(rName, acctest.CtKey1, "value1updated", "key3", "value3"), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), @@ -622,20 +622,20 @@ func TestAccKMSKey_updateTagsEmptyValue(t *testing.T) { CheckDestroy: testAccCheckKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKeyConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccKeyConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKeyConfig_tags2(rName, "key1", "value1", "key2", ""), + Config: testAccKeyConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, diff --git a/internal/service/kms/replica_external_key_test.go b/internal/service/kms/replica_external_key_test.go index 97ddaf68345..3ef5ecd1856 100644 --- a/internal/service/kms/replica_external_key_test.go +++ b/internal/service/kms/replica_external_key_test.go @@ -183,11 +183,11 @@ func TestAccKMSReplicaExternalKey_tags(t *testing.T) { CheckDestroy: testAccCheckKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicaExternalKeyConfig_tags1(rName, "key1", "value1"), + Config: testAccReplicaExternalKeyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -201,20 +201,20 @@ func TestAccKMSReplicaExternalKey_tags(t *testing.T) { }, }, { - Config: testAccReplicaExternalKeyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReplicaExternalKeyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReplicaExternalKeyConfig_tags1(rName, "key2", "value2"), + Config: testAccReplicaExternalKeyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/kms/replica_key_test.go b/internal/service/kms/replica_key_test.go index 351d1631648..9db106abe0a 100644 --- a/internal/service/kms/replica_key_test.go +++ b/internal/service/kms/replica_key_test.go @@ -196,11 +196,11 @@ func TestAccKMSReplicaKey_tags(t *testing.T) { CheckDestroy: testAccCheckKeyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicaKeyConfig_tags1(rName, "key1", "value1"), + Config: testAccReplicaKeyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -213,20 +213,20 @@ func TestAccKMSReplicaKey_tags(t *testing.T) { }, }, { - Config: testAccReplicaKeyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccReplicaKeyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReplicaKeyConfig_tags1(rName, "key2", "value2"), + Config: testAccReplicaKeyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckKeyExists(ctx, resourceName, &key), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { From e20fc2540b125e777d751ee79b4b5289a11deb3b Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 108/180] lakeformation: Use constants for test strings --- internal/service/lakeformation/lf_tag_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/lakeformation/lf_tag_test.go b/internal/service/lakeformation/lf_tag_test.go index 04d2598de60..52a23e526fa 100644 --- a/internal/service/lakeformation/lf_tag_test.go +++ b/internal/service/lakeformation/lf_tag_test.go @@ -165,12 +165,12 @@ func testAccLFTag_Values(t *testing.T) { CheckDestroy: testAccCheckLFTagsDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLFTagConfig_values(rName, []string{"value1", "value2"}), + Config: testAccLFTagConfig_values(rName, []string{acctest.CtValue1, acctest.CtValue2}), Destroy: false, Check: resource.ComposeTestCheckFunc( testAccCheckLFTagExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrKey, rName), - resource.TestCheckResourceAttr(resourceName, "values.0", "value1"), + resource.TestCheckResourceAttr(resourceName, "values.0", acctest.CtValue1), acctest.CheckResourceAttrAccountID(resourceName, names.AttrCatalogID), ), }, @@ -181,11 +181,11 @@ func testAccLFTag_Values(t *testing.T) { }, { // Test an update that adds, removes and retains a tag value - Config: testAccLFTagConfig_values(rName, []string{"value1", "value3"}), + Config: testAccLFTagConfig_values(rName, []string{acctest.CtValue1, "value3"}), Check: resource.ComposeTestCheckFunc( testAccCheckLFTagExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrKey, rName), - resource.TestCheckResourceAttr(resourceName, "values.0", "value1"), + resource.TestCheckResourceAttr(resourceName, "values.0", acctest.CtValue1), resource.TestCheckTypeSetElemAttr(resourceName, "values.*", "value3"), testAccCheckLFTagValuesLen(ctx, resourceName, 2), acctest.CheckResourceAttrAccountID(resourceName, names.AttrCatalogID), @@ -215,7 +215,7 @@ func testAccLFTag_Values_overFifty(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckLFTagExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrKey, rName), - resource.TestCheckResourceAttr(resourceName, "values.0", "value1"), + resource.TestCheckResourceAttr(resourceName, "values.0", acctest.CtValue1), testAccCheckLFTagValuesLen(ctx, resourceName, len(generatedValues)), acctest.CheckResourceAttrAccountID(resourceName, names.AttrCatalogID), ), @@ -225,7 +225,7 @@ func testAccLFTag_Values_overFifty(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckLFTagExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrKey, rName), - resource.TestCheckResourceAttr(resourceName, "values.0", "value1"), + resource.TestCheckResourceAttr(resourceName, "values.0", acctest.CtValue1), testAccCheckLFTagValuesLen(ctx, resourceName, len(generatedValues2)), resource.TestCheckTypeSetElemAttr(resourceName, "values.*", "value59"), acctest.CheckResourceAttrAccountID(resourceName, names.AttrCatalogID), @@ -236,7 +236,7 @@ func testAccLFTag_Values_overFifty(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckLFTagExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, names.AttrKey, rName), - resource.TestCheckResourceAttr(resourceName, "values.0", "value1"), + resource.TestCheckResourceAttr(resourceName, "values.0", acctest.CtValue1), testAccCheckLFTagValuesLen(ctx, resourceName, len(generatedValues)-1), acctest.CheckResourceAttrAccountID(resourceName, names.AttrCatalogID), ), From 96c884ebf1ba4c880af3b08c362e787b5b3c3136 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 109/180] lambda: Use constants for test strings --- internal/service/lambda/function_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/lambda/function_test.go b/internal/service/lambda/function_test.go index a379e2a2768..2434421249d 100644 --- a/internal/service/lambda/function_test.go +++ b/internal/service/lambda/function_test.go @@ -127,11 +127,11 @@ func TestAccLambdaFunction_tags(t *testing.T) { CheckDestroy: testAccCheckFunctionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFunctionConfig_tags1(rName, "key1", "value1"), + Config: testAccFunctionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFunctionExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -141,20 +141,20 @@ func TestAccLambdaFunction_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"filename", "publish"}, }, { - Config: testAccFunctionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFunctionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFunctionExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFunctionConfig_tags1(rName, "key2", "value2"), + Config: testAccFunctionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFunctionExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 2b8c04042edc15da960094c2e8942fd4692ab1ca Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 110/180] lexv2models: Use constants for test strings --- internal/service/lexv2models/bot_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/lexv2models/bot_test.go b/internal/service/lexv2models/bot_test.go index 29019ab2ed4..f7d5f912c12 100644 --- a/internal/service/lexv2models/bot_test.go +++ b/internal/service/lexv2models/bot_test.go @@ -75,12 +75,12 @@ func TestAccLexV2ModelsBot_tags(t *testing.T) { CheckDestroy: testAccCheckBotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBotConfig_tags1(rName, 60, true, "key1", "value1"), + Config: testAccBotConfig_tags1(rName, 60, true, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBotExists(ctx, resourceName, &bot), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -89,22 +89,22 @@ func TestAccLexV2ModelsBot_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBotConfig_tags2(rName, 60, true, "key1", "value1updated", "key2", "value2"), + Config: testAccBotConfig_tags2(rName, 60, true, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBotExists(ctx, resourceName, &bot), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBotConfig_tags1(rName, 60, true, "key2", "value2"), + Config: testAccBotConfig_tags1(rName, 60, true, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBotExists(ctx, resourceName, &bot), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 29007cc0b3a7ba1a97071f53fed41f4540350aa8 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 111/180] licensemanager: Use constants for test strings --- .../licensemanager/license_configuration_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/licensemanager/license_configuration_test.go b/internal/service/licensemanager/license_configuration_test.go index fa789008def..9a3143db492 100644 --- a/internal/service/licensemanager/license_configuration_test.go +++ b/internal/service/licensemanager/license_configuration_test.go @@ -103,11 +103,11 @@ func TestAccLicenseManagerLicenseConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckLicenseConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLicenseConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccLicenseConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLicenseConfigurationExists(ctx, resourceName, &licenseConfiguration), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -116,20 +116,20 @@ func TestAccLicenseManagerLicenseConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLicenseConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLicenseConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLicenseConfigurationExists(ctx, resourceName, &licenseConfiguration), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLicenseConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccLicenseConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckLicenseConfigurationExists(ctx, resourceName, &licenseConfiguration), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 9fcf26ea8f484a71f311e3f7fc6cacaa223d1075 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:47 -0400 Subject: [PATCH 112/180] lightsail: Use constants for test strings --- internal/service/lightsail/bucket_test.go | 12 ++++++------ internal/service/lightsail/certificate_test.go | 12 ++++++------ .../service/lightsail/container_service_test.go | 12 ++++++------ internal/service/lightsail/database_test.go | 12 ++++++------ internal/service/lightsail/disk_test.go | 12 ++++++------ internal/service/lightsail/distribution_test.go | 12 ++++++------ internal/service/lightsail/key_pair_test.go | 14 +++++++------- internal/service/lightsail/lb_test.go | 12 ++++++------ 8 files changed, 49 insertions(+), 49 deletions(-) diff --git a/internal/service/lightsail/bucket_test.go b/internal/service/lightsail/bucket_test.go index d2784258f69..1e8fa8e2936 100644 --- a/internal/service/lightsail/bucket_test.go +++ b/internal/service/lightsail/bucket_test.go @@ -153,11 +153,11 @@ func TestAccLightsailBucket_tags(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketConfig_tags1(rName, "key1", "value1"), + Config: testAccBucketConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -169,20 +169,20 @@ func TestAccLightsailBucket_tags(t *testing.T) { }, }, { - Config: testAccBucketConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccBucketConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBucketConfig_tags1(rName, "key2", "value2"), + Config: testAccBucketConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/certificate_test.go b/internal/service/lightsail/certificate_test.go index 27ded6f8856..91d42cbd9f5 100644 --- a/internal/service/lightsail/certificate_test.go +++ b/internal/service/lightsail/certificate_test.go @@ -144,11 +144,11 @@ func TestAccLightsailCertificate_tags(t *testing.T) { CheckDestroy: testAccCheckCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCertificateConfig_tags1(rName, domainName, "key1", "value1"), + Config: testAccCertificateConfig_tags1(rName, domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -157,20 +157,20 @@ func TestAccLightsailCertificate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCertificateConfig_tags2(rName, domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccCertificateConfig_tags2(rName, domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCertificateConfig_tags1(rName, domainName, "key2", "value2"), + Config: testAccCertificateConfig_tags1(rName, domainName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/container_service_test.go b/internal/service/lightsail/container_service_test.go index 3edc2c95965..0964d433e8b 100644 --- a/internal/service/lightsail/container_service_test.go +++ b/internal/service/lightsail/container_service_test.go @@ -299,11 +299,11 @@ func TestAccLightsailContainerService_tags(t *testing.T) { CheckDestroy: testAccCheckContainerServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccContainerServiceConfig_tags1(rName, "key1", "value1"), + Config: testAccContainerServiceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckContainerServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -312,20 +312,20 @@ func TestAccLightsailContainerService_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerServiceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccContainerServiceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckContainerServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccContainerServiceConfig_tags1(rName, "key2", "value2"), + Config: testAccContainerServiceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckContainerServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/database_test.go b/internal/service/lightsail/database_test.go index 47b012116b3..e7026fc90a0 100644 --- a/internal/service/lightsail/database_test.go +++ b/internal/service/lightsail/database_test.go @@ -599,11 +599,11 @@ func TestAccLightsailDatabase_tags(t *testing.T) { CheckDestroy: testAccCheckDatabaseDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDatabaseConfig_tags1(rName, "key1", "value1"), + Config: testAccDatabaseConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -618,20 +618,20 @@ func TestAccLightsailDatabase_tags(t *testing.T) { }, }, { - Config: testAccDatabaseConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDatabaseConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDatabaseConfig_tags1(rName, "key2", "value2"), + Config: testAccDatabaseConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/disk_test.go b/internal/service/lightsail/disk_test.go index 979bbade3f2..18dbea01b00 100644 --- a/internal/service/lightsail/disk_test.go +++ b/internal/service/lightsail/disk_test.go @@ -75,11 +75,11 @@ func TestAccLightsailDisk_Tags(t *testing.T) { CheckDestroy: testAccCheckDiskDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDiskConfig_tags1(rName, "key1", "value1"), + Config: testAccDiskConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDiskExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -88,20 +88,20 @@ func TestAccLightsailDisk_Tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDiskConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDiskConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDiskExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDiskConfig_tags1(rName, "key2", "value2"), + Config: testAccDiskConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDiskExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/distribution_test.go b/internal/service/lightsail/distribution_test.go index e1d40d2cb64..0148483a86f 100644 --- a/internal/service/lightsail/distribution_test.go +++ b/internal/service/lightsail/distribution_test.go @@ -401,11 +401,11 @@ func testAccDistribution_tags(t *testing.T) { CheckDestroy: testAccCheckDistributionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDistributionConfig_tags1(rName, bucketName, "key1", "value1"), + Config: testAccDistributionConfig_tags1(rName, bucketName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDistributionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -414,20 +414,20 @@ func testAccDistribution_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDistributionConfig_tags2(rName, bucketName, "key1", "value1updated", "key2", "value2"), + Config: testAccDistributionConfig_tags2(rName, bucketName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDistributionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDistributionConfig_tags1(rName, bucketName, "key2", "value2"), + Config: testAccDistributionConfig_tags1(rName, bucketName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDistributionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/key_pair_test.go b/internal/service/lightsail/key_pair_test.go index 53ab66bb400..1f3bd5ab350 100644 --- a/internal/service/lightsail/key_pair_test.go +++ b/internal/service/lightsail/key_pair_test.go @@ -164,28 +164,28 @@ func TestAccLightsailKeyPair_tags(t *testing.T) { CheckDestroy: testAccCheckKeyPairDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccKeyPairConfig_tags1(rName, "key1", "value1"), + Config: testAccKeyPairConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckKeyPairExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccKeyPairConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccKeyPairConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckKeyPairExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccKeyPairConfig_tags1(rName, "key2", "value2"), + Config: testAccKeyPairConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckKeyPairExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/lightsail/lb_test.go b/internal/service/lightsail/lb_test.go index 8b9c163ed2a..f407d2c7634 100644 --- a/internal/service/lightsail/lb_test.go +++ b/internal/service/lightsail/lb_test.go @@ -197,11 +197,11 @@ func testAccLoadBalancer_tags(t *testing.T) { CheckDestroy: testAccCheckLoadBalancerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLoadBalancerConfig_tags1(rName, "key1", "value1"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -210,20 +210,20 @@ func testAccLoadBalancer_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLoadBalancerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLoadBalancerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLoadBalancerConfig_tags1(rName, "key2", "value2"), + Config: testAccLoadBalancerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLoadBalancerExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 024c0f02dd6d91ac8c5a3b8941f881b86702a55e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:48 -0400 Subject: [PATCH 113/180] location: Use constants for test strings --- .../service/location/geofence_collection_test.go | 12 ++++++------ internal/service/location/map_test.go | 12 ++++++------ internal/service/location/place_index_test.go | 12 ++++++------ internal/service/location/route_calculator_test.go | 12 ++++++------ internal/service/location/tracker_test.go | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/internal/service/location/geofence_collection_test.go b/internal/service/location/geofence_collection_test.go index 7fa408ff403..52f617951e9 100644 --- a/internal/service/location/geofence_collection_test.go +++ b/internal/service/location/geofence_collection_test.go @@ -151,11 +151,11 @@ func TestAccLocationGeofenceCollection_tags(t *testing.T) { CheckDestroy: testAccCheckGeofenceCollectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGeofenceCollectionConfig_tags1(rName, "key1", "value1"), + Config: testAccGeofenceCollectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGeofenceCollectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -164,20 +164,20 @@ func TestAccLocationGeofenceCollection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGeofenceCollectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccGeofenceCollectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGeofenceCollectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGeofenceCollectionConfig_tags1(rName, "key2", "value2"), + Config: testAccGeofenceCollectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGeofenceCollectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/location/map_test.go b/internal/service/location/map_test.go index 9cb97292155..d03b90c7db5 100644 --- a/internal/service/location/map_test.go +++ b/internal/service/location/map_test.go @@ -123,11 +123,11 @@ func TestAccLocationMap_tags(t *testing.T) { CheckDestroy: testAccCheckMapDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMapConfig_tags1(rName, "key1", "value1"), + Config: testAccMapConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMapExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -136,20 +136,20 @@ func TestAccLocationMap_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMapConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMapConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMapExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMapConfig_tags1(rName, "key2", "value2"), + Config: testAccMapConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMapExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/location/place_index_test.go b/internal/service/location/place_index_test.go index 03af517bf75..5af70a79bdd 100644 --- a/internal/service/location/place_index_test.go +++ b/internal/service/location/place_index_test.go @@ -160,11 +160,11 @@ func TestAccLocationPlaceIndex_tags(t *testing.T) { CheckDestroy: testAccCheckPlaceIndexDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPlaceIndexConfig_tags1(rName, "key1", "value1"), + Config: testAccPlaceIndexConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPlaceIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -173,20 +173,20 @@ func TestAccLocationPlaceIndex_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPlaceIndexConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPlaceIndexConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPlaceIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPlaceIndexConfig_tags1(rName, "key2", "value2"), + Config: testAccPlaceIndexConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPlaceIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/location/route_calculator_test.go b/internal/service/location/route_calculator_test.go index 0da43059d1b..49e4ad2a1bb 100644 --- a/internal/service/location/route_calculator_test.go +++ b/internal/service/location/route_calculator_test.go @@ -122,11 +122,11 @@ func TestAccLocationRouteCalculator_tags(t *testing.T) { CheckDestroy: testAccCheckRouteCalculatorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRouteCalculatorConfig_tags1(rName, "key1", "value1"), + Config: testAccRouteCalculatorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRouteCalculatorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -135,20 +135,20 @@ func TestAccLocationRouteCalculator_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRouteCalculatorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRouteCalculatorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteCalculatorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRouteCalculatorConfig_tags1(rName, "key2", "value2"), + Config: testAccRouteCalculatorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRouteCalculatorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/location/tracker_test.go b/internal/service/location/tracker_test.go index 95d5af01cfd..8bc93908365 100644 --- a/internal/service/location/tracker_test.go +++ b/internal/service/location/tracker_test.go @@ -184,11 +184,11 @@ func TestAccLocationTracker_tags(t *testing.T) { CheckDestroy: testAccCheckTrackerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTrackerConfig_tags1(rName, "key1", "value1"), + Config: testAccTrackerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrackerExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -197,20 +197,20 @@ func TestAccLocationTracker_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTrackerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTrackerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrackerExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTrackerConfig_tags1(rName, "key2", "value2"), + Config: testAccTrackerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrackerExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 31a3133185ee7350192cf70e43e5908edef31edc Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:48 -0400 Subject: [PATCH 114/180] logs: Use constants for test strings --- internal/service/logs/destination_test.go | 22 +++++++++++----------- internal/service/logs/group_test.go | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/internal/service/logs/destination_test.go b/internal/service/logs/destination_test.go index 93b69e1fdb9..bd8159b35a5 100644 --- a/internal/service/logs/destination_test.go +++ b/internal/service/logs/destination_test.go @@ -90,11 +90,11 @@ func TestAccLogsDestination_tags(t *testing.T) { CheckDestroy: testAccCheckDestinationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDestinationConfig_tags1(rName, "key1", "value1"), + Config: testAccDestinationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDestinationExists(ctx, resourceName, &destination), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -103,20 +103,20 @@ func TestAccLogsDestination_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDestinationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDestinationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDestinationExists(ctx, resourceName, &destination), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDestinationConfig_tags1(rName, "key2", "value2"), + Config: testAccDestinationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDestinationExists(ctx, resourceName, &destination), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -163,27 +163,27 @@ func TestAccLogsDestination_update(t *testing.T) { ), }, { - Config: testAccDestinationConfig_updateWithTag(rName, 0, "key1", "value1"), + Config: testAccDestinationConfig_updateWithTag(rName, 0, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDestinationExists(ctx, resourceName, &destination), resource.TestCheckResourceAttrPair(resourceName, names.AttrRoleARN, roleResource1Name, names.AttrARN), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, names.AttrTargetARN, streamResource1Name, names.AttrARN), ), }, { - Config: testAccDestinationConfig_updateWithTag(rName, 1, "key1", "value1"), + Config: testAccDestinationConfig_updateWithTag(rName, 1, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDestinationExists(ctx, resourceName, &destination), resource.TestCheckResourceAttrPair(resourceName, names.AttrRoleARN, roleResource2Name, names.AttrARN), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, names.AttrTargetARN, streamResource2Name, names.AttrARN), ), }, { - Config: testAccDestinationConfig_updateWithTag(rName, 1, "key1", "value1updated"), + Config: testAccDestinationConfig_updateWithTag(rName, 1, acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckDestinationExists(ctx, resourceName, &destination), resource.TestCheckResourceAttrPair(resourceName, names.AttrRoleARN, roleResource2Name, names.AttrARN), diff --git a/internal/service/logs/group_test.go b/internal/service/logs/group_test.go index 935be5cb4f8..8cfad792548 100644 --- a/internal/service/logs/group_test.go +++ b/internal/service/logs/group_test.go @@ -151,11 +151,11 @@ func TestAccLogsGroup_tags(t *testing.T) { CheckDestroy: testAccCheckGroupDestroy(ctx, t), Steps: []resource.TestStep{ { - Config: testAccGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, t, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -164,20 +164,20 @@ func TestAccLogsGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, t, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, t, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 1957bbefcc253603bfb618672772ba45b0997b46 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:48 -0400 Subject: [PATCH 115/180] m2: Use constants for test strings --- internal/service/m2/application_test.go | 12 ++++++------ internal/service/m2/environment_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/m2/application_test.go b/internal/service/m2/application_test.go index 505342ce893..ea3d22ecf19 100644 --- a/internal/service/m2/application_test.go +++ b/internal/service/m2/application_test.go @@ -115,11 +115,11 @@ func TestAccM2Application_tags(t *testing.T) { ), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -128,20 +128,20 @@ func TestAccM2Application_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccApplicationConfig_tags1(rName, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/m2/environment_test.go b/internal/service/m2/environment_test.go index c26af37c6bc..3ed71447b71 100644 --- a/internal/service/m2/environment_test.go +++ b/internal/service/m2/environment_test.go @@ -119,11 +119,11 @@ func TestAccM2Environment_tags(t *testing.T) { CheckDestroy: testAccCheckEnvironmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEnvironmentConfig_tags1(rName, "key1", "value1"), + Config: testAccEnvironmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -132,20 +132,20 @@ func TestAccM2Environment_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEnvironmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEnvironmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEnvironmentConfig_tags1(rName, "key2", "value2"), + Config: testAccEnvironmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEnvironmentExists(ctx, resourceName, &environment), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From dd33e64e98598f0b151132284896e304d73ccef1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:48 -0400 Subject: [PATCH 116/180] macie2: Use constants for test strings --- internal/service/macie2/custom_data_identifier_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/macie2/custom_data_identifier_test.go b/internal/service/macie2/custom_data_identifier_test.go index 0eb3f8a7202..b00931d7276 100644 --- a/internal/service/macie2/custom_data_identifier_test.go +++ b/internal/service/macie2/custom_data_identifier_test.go @@ -203,11 +203,11 @@ func testAccCustomDataIdentifier_WithTags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrNamePrefix, "terraform-"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "3"), resource.TestCheckResourceAttr(resourceName, "tags.Key", names.AttrValue), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags.Key3", "value3"), resource.TestCheckResourceAttr(resourceName, "tags_all.%", "3"), resource.TestCheckResourceAttr(resourceName, "tags_all.Key", names.AttrValue), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.Key3", "value3"), acctest.CheckResourceAttrRFC3339(resourceName, names.AttrCreatedAt), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "macie2", regexache.MustCompile(`custom-data-identifier/.+`)), From a8f6ed43e0372b4319ed50968002e28c5254bfa1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:48 -0400 Subject: [PATCH 117/180] mediaconvert: Use constants for test strings --- internal/service/mediaconvert/queue_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/mediaconvert/queue_test.go b/internal/service/mediaconvert/queue_test.go index c79918a5f90..d18b6dc7446 100644 --- a/internal/service/mediaconvert/queue_test.go +++ b/internal/service/mediaconvert/queue_test.go @@ -89,11 +89,11 @@ func TestAccMediaConvertQueue_withTags(t *testing.T) { CheckDestroy: testAccCheckQueueDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccQueueConfig_tags1(rName, "key1", "value1"), + Config: testAccQueueConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckQueueExists(ctx, resourceName, &queue), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func TestAccMediaConvertQueue_withTags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccQueueConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccQueueConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQueueExists(ctx, resourceName, &queue), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccQueueConfig_tags1(rName, "key2", "value2"), + Config: testAccQueueConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQueueExists(ctx, resourceName, &queue), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From ad655db0a523673042cbb9daebcc7b08c76cdada Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:48 -0400 Subject: [PATCH 118/180] medialive: Use constants for test strings --- internal/service/medialive/channel_test.go | 14 +++++++------- .../service/medialive/input_security_group_test.go | 14 +++++++------- internal/service/medialive/input_test.go | 14 +++++++------- internal/service/medialive/multiplex_test.go | 14 +++++++------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/internal/service/medialive/channel_test.go b/internal/service/medialive/channel_test.go index bb3b141ac78..9bd8a229346 100644 --- a/internal/service/medialive/channel_test.go +++ b/internal/service/medialive/channel_test.go @@ -828,28 +828,28 @@ func TestAccMediaLiveChannel_updateTags(t *testing.T) { CheckDestroy: testAccCheckChannelDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccChannelConfig_tags1(rName, "key1", "value1"), + Config: testAccChannelConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckChannelExists(ctx, resourceName, &channel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccChannelConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccChannelConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckChannelExists(ctx, resourceName, &channel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccChannelConfig_tags1(rName, "key2", "value2"), + Config: testAccChannelConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckChannelExists(ctx, resourceName, &channel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/medialive/input_security_group_test.go b/internal/service/medialive/input_security_group_test.go index 4f531dbe435..ba572fe10b3 100644 --- a/internal/service/medialive/input_security_group_test.go +++ b/internal/service/medialive/input_security_group_test.go @@ -124,28 +124,28 @@ func TestAccMediaLiveInputSecurityGroup_updateTags(t *testing.T) { CheckDestroy: testAccCheckInputSecurityGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInputSecurityGroupConfig_tags1("key1", "value1"), + Config: testAccInputSecurityGroupConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInputSecurityGroupExists(ctx, resourceName, &inputSecurityGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccInputSecurityGroupConfig_tags2("key1", "value1", "key2", "value2"), + Config: testAccInputSecurityGroupConfig_tags2(acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInputSecurityGroupExists(ctx, resourceName, &inputSecurityGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInputSecurityGroupConfig_tags1("key2", "value2"), + Config: testAccInputSecurityGroupConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInputSecurityGroupExists(ctx, resourceName, &inputSecurityGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/medialive/input_test.go b/internal/service/medialive/input_test.go index 1f132234ab3..852505966d2 100644 --- a/internal/service/medialive/input_test.go +++ b/internal/service/medialive/input_test.go @@ -126,28 +126,28 @@ func TestAccMediaLiveInput_updateTags(t *testing.T) { CheckDestroy: testAccCheckInputDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInputConfig_tags1(rName, "key1", "value1"), + Config: testAccInputConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckInputExists(ctx, resourceName, &input), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccInputConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccInputConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInputExists(ctx, resourceName, &input), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInputConfig_tags1(rName, "key2", "value2"), + Config: testAccInputConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckInputExists(ctx, resourceName, &input), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/medialive/multiplex_test.go b/internal/service/medialive/multiplex_test.go index 31e837265eb..6103fa0e10e 100644 --- a/internal/service/medialive/multiplex_test.go +++ b/internal/service/medialive/multiplex_test.go @@ -172,28 +172,28 @@ func testAccMultiplex_updateTags(t *testing.T) { CheckDestroy: testAccCheckMultiplexDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMultiplexConfig_tags1(rName, "key1", "value1"), + Config: testAccMultiplexConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMultiplexExists(ctx, resourceName, &multiplex), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccMultiplexConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccMultiplexConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMultiplexExists(ctx, resourceName, &multiplex), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMultiplexConfig_tags1(rName, "key2", "value2"), + Config: testAccMultiplexConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMultiplexExists(ctx, resourceName, &multiplex), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From fe1d5d2813893106ac9909a3199973547aaa9421 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:49 -0400 Subject: [PATCH 119/180] memorydb: Use constants for test strings --- internal/service/memorydb/acl_test.go | 16 ++++++++-------- internal/service/memorydb/cluster_test.go | 16 ++++++++-------- .../service/memorydb/parameter_group_test.go | 16 ++++++++-------- internal/service/memorydb/snapshot_test.go | 16 ++++++++-------- internal/service/memorydb/subnet_group_test.go | 16 ++++++++-------- internal/service/memorydb/user_test.go | 12 ++++++------ 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/internal/service/memorydb/acl_test.go b/internal/service/memorydb/acl_test.go index e3dac34317a..b4a0e76c39c 100644 --- a/internal/service/memorydb/acl_test.go +++ b/internal/service/memorydb/acl_test.go @@ -144,15 +144,15 @@ func TestAccMemoryDBACL_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccACLConfig_tags2(rName, "Key1", "value1", "Key2", "value2"), + Config: testAccACLConfig_tags2(rName, "Key1", acctest.CtValue1, "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckACLExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", acctest.CtValue2), ), }, { @@ -161,13 +161,13 @@ func TestAccMemoryDBACL_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccACLConfig_tags1(rName, "Key1", "value1"), + Config: testAccACLConfig_tags1(rName, "Key1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckACLExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), ), }, { diff --git a/internal/service/memorydb/cluster_test.go b/internal/service/memorydb/cluster_test.go index 9a531075d53..8d22486dcbb 100644 --- a/internal/service/memorydb/cluster_test.go +++ b/internal/service/memorydb/cluster_test.go @@ -1012,15 +1012,15 @@ func TestAccMemoryDBCluster_Update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterConfig_tags2(rName, "Key1", "value1", "Key2", "value2"), + Config: testAccClusterConfig_tags2(rName, "Key1", acctest.CtValue1, "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", acctest.CtValue2), ), }, { @@ -1029,13 +1029,13 @@ func TestAccMemoryDBCluster_Update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterConfig_tags1(rName, "Key1", "value1"), + Config: testAccClusterConfig_tags1(rName, "Key1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), ), }, { diff --git a/internal/service/memorydb/parameter_group_test.go b/internal/service/memorydb/parameter_group_test.go index 02725fd6b67..61a68d09b24 100644 --- a/internal/service/memorydb/parameter_group_test.go +++ b/internal/service/memorydb/parameter_group_test.go @@ -222,15 +222,15 @@ func TestAccMemoryDBParameterGroup_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccParameterGroupConfig_tags2(rName, "Key1", "value1", "Key2", "value2"), + Config: testAccParameterGroupConfig_tags2(rName, "Key1", acctest.CtValue1, "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", acctest.CtValue2), ), }, { @@ -239,13 +239,13 @@ func TestAccMemoryDBParameterGroup_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccParameterGroupConfig_tags1(rName, "Key1", "value1"), + Config: testAccParameterGroupConfig_tags1(rName, "Key1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), ), }, { diff --git a/internal/service/memorydb/snapshot_test.go b/internal/service/memorydb/snapshot_test.go index 15621db6f41..55d6c4c9171 100644 --- a/internal/service/memorydb/snapshot_test.go +++ b/internal/service/memorydb/snapshot_test.go @@ -184,15 +184,15 @@ func TestAccMemoryDBSnapshot_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSnapshotConfig_tags2(rName, "Key1", "value1", "Key2", "value2"), + Config: testAccSnapshotConfig_tags2(rName, "Key1", acctest.CtValue1, "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", acctest.CtValue2), ), }, { @@ -201,13 +201,13 @@ func TestAccMemoryDBSnapshot_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSnapshotConfig_tags1(rName, "Key1", "value1"), + Config: testAccSnapshotConfig_tags1(rName, "Key1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), ), }, { diff --git a/internal/service/memorydb/subnet_group_test.go b/internal/service/memorydb/subnet_group_test.go index 7ce120bcc97..9c2ec23fa85 100644 --- a/internal/service/memorydb/subnet_group_test.go +++ b/internal/service/memorydb/subnet_group_test.go @@ -248,15 +248,15 @@ func TestAccMemoryDBSubnetGroup_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags2(rName, "Key1", "value1", "Key2", "value2"), + Config: testAccSubnetGroupConfig_tags2(rName, "Key1", acctest.CtValue1, "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key2", acctest.CtValue2), ), }, { @@ -265,13 +265,13 @@ func TestAccMemoryDBSubnetGroup_update_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags1(rName, "Key1", "value1"), + Config: testAccSubnetGroupConfig_tags1(rName, "Key1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.Key1", acctest.CtValue1), ), }, { diff --git a/internal/service/memorydb/user_test.go b/internal/service/memorydb/user_test.go index bd2ae56b897..4b01edbb19c 100644 --- a/internal/service/memorydb/user_test.go +++ b/internal/service/memorydb/user_test.go @@ -214,11 +214,11 @@ func TestAccMemoryDBUser_tags(t *testing.T) { CheckDestroy: testAccCheckUserDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUserConfig_tags1(rName, "key1", "value1"), + Config: testAccUserConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -228,20 +228,20 @@ func TestAccMemoryDBUser_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"authentication_mode.0.passwords"}, }, { - Config: testAccUserConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUserConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUserConfig_tags1(rName, "key2", "value2"), + Config: testAccUserConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From ccfe713e2c4d7ff905eb97da2e26feae296d1549 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:49 -0400 Subject: [PATCH 120/180] mq: Use constants for test strings --- internal/service/mq/broker_test.go | 12 ++++++------ internal/service/mq/configuration_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/mq/broker_test.go b/internal/service/mq/broker_test.go index de396776eeb..8971ab4753d 100644 --- a/internal/service/mq/broker_test.go +++ b/internal/service/mq/broker_test.go @@ -378,11 +378,11 @@ func TestAccMQBroker_tags(t *testing.T) { CheckDestroy: testAccCheckBrokerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBrokerConfig_tags1(rName, testAccBrokerVersionNewer, "key1", "value1"), + Config: testAccBrokerConfig_tags1(rName, testAccBrokerVersionNewer, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBrokerExists(ctx, resourceName, &broker), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -392,20 +392,20 @@ func TestAccMQBroker_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrApplyImmediately, "user"}, }, { - Config: testAccBrokerConfig_tags2(rName, testAccBrokerVersionNewer, "key1", "value1updated", "key2", "value2"), + Config: testAccBrokerConfig_tags2(rName, testAccBrokerVersionNewer, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBrokerExists(ctx, resourceName, &broker), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBrokerConfig_tags1(rName, testAccBrokerVersionNewer, "key2", "value2"), + Config: testAccBrokerConfig_tags1(rName, testAccBrokerVersionNewer, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBrokerExists(ctx, resourceName, &broker), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/mq/configuration_test.go b/internal/service/mq/configuration_test.go index 48966a94eaf..4d14f6248bd 100644 --- a/internal/service/mq/configuration_test.go +++ b/internal/service/mq/configuration_test.go @@ -193,11 +193,11 @@ func TestAccMQConfiguration_tags(t *testing.T) { CheckDestroy: acctest.CheckDestroyNoop, Steps: []resource.TestStep{ { - Config: testAccConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -206,20 +206,20 @@ func TestAccMQConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From eba3c505643101c29f380ee9f6edce1548af8c22 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:49 -0400 Subject: [PATCH 121/180] neptune: Use constants for test strings --- internal/service/neptune/cluster_endpoint_test.go | 12 ++++++------ internal/service/neptune/cluster_instance_test.go | 12 ++++++------ .../service/neptune/cluster_parameter_group_test.go | 12 ++++++------ internal/service/neptune/cluster_test.go | 12 ++++++------ internal/service/neptune/event_subscription_test.go | 12 ++++++------ internal/service/neptune/parameter_group_test.go | 12 ++++++------ internal/service/neptune/subnet_group_test.go | 12 ++++++------ 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/internal/service/neptune/cluster_endpoint_test.go b/internal/service/neptune/cluster_endpoint_test.go index 358c8757f8b..6f3ddb4d081 100644 --- a/internal/service/neptune/cluster_endpoint_test.go +++ b/internal/service/neptune/cluster_endpoint_test.go @@ -67,11 +67,11 @@ func TestAccNeptuneClusterEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckClusterEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterEndpointConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterEndpointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -80,20 +80,20 @@ func TestAccNeptuneClusterEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterEndpointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterEndpointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterEndpointConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterEndpointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterEndpointExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/neptune/cluster_instance_test.go b/internal/service/neptune/cluster_instance_test.go index 8bf6267451a..a78d19ea9a1 100644 --- a/internal/service/neptune/cluster_instance_test.go +++ b/internal/service/neptune/cluster_instance_test.go @@ -176,11 +176,11 @@ func TestAccNeptuneClusterInstance_tags(t *testing.T) { CheckDestroy: testAccCheckClusterInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -189,20 +189,20 @@ func TestAccNeptuneClusterInstance_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/neptune/cluster_parameter_group_test.go b/internal/service/neptune/cluster_parameter_group_test.go index f64159ef97c..681e97c85b3 100644 --- a/internal/service/neptune/cluster_parameter_group_test.go +++ b/internal/service/neptune/cluster_parameter_group_test.go @@ -147,11 +147,11 @@ func TestAccNeptuneClusterParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckClusterParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterParameterGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterParameterGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -160,20 +160,20 @@ func TestAccNeptuneClusterParameterGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterParameterGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterParameterGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterParameterGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterParameterGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/neptune/cluster_test.go b/internal/service/neptune/cluster_test.go index 1275613fb49..e6dccd7dd41 100644 --- a/internal/service/neptune/cluster_test.go +++ b/internal/service/neptune/cluster_test.go @@ -182,29 +182,29 @@ func TestAccNeptuneCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, testAccClusterImportStep(resourceName), { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/neptune/event_subscription_test.go b/internal/service/neptune/event_subscription_test.go index c878d425ec1..81b7c8c493f 100644 --- a/internal/service/neptune/event_subscription_test.go +++ b/internal/service/neptune/event_subscription_test.go @@ -155,11 +155,11 @@ func TestAccNeptuneEventSubscription_tags(t *testing.T) { CheckDestroy: testAccCheckEventSubscriptionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEventSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -168,20 +168,20 @@ func TestAccNeptuneEventSubscription_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEventSubscriptionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEventSubscriptionConfig_tags1(rName, "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/neptune/parameter_group_test.go b/internal/service/neptune/parameter_group_test.go index 8217e491733..cfd19885e61 100644 --- a/internal/service/neptune/parameter_group_test.go +++ b/internal/service/neptune/parameter_group_test.go @@ -227,11 +227,11 @@ func TestAccNeptuneParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccParameterGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -240,20 +240,20 @@ func TestAccNeptuneParameterGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccParameterGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccParameterGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccParameterGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccParameterGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/neptune/subnet_group_test.go b/internal/service/neptune/subnet_group_test.go index 7062cb6d422..f1b80cc911c 100644 --- a/internal/service/neptune/subnet_group_test.go +++ b/internal/service/neptune/subnet_group_test.go @@ -149,11 +149,11 @@ func TestAccNeptuneSubnetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckSubnetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSubnetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -162,20 +162,20 @@ func TestAccNeptuneSubnetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSubnetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSubnetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 27e24e96d63710e23780ec579f30e52dfff99923 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:49 -0400 Subject: [PATCH 122/180] networkfirewall: Use constants for test strings --- .../service/networkfirewall/firewall_policy_test.go | 12 ++++++------ internal/service/networkfirewall/firewall_test.go | 12 ++++++------ internal/service/networkfirewall/rule_group_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/networkfirewall/firewall_policy_test.go b/internal/service/networkfirewall/firewall_policy_test.go index d158ee52372..44ddf1fcc62 100644 --- a/internal/service/networkfirewall/firewall_policy_test.go +++ b/internal/service/networkfirewall/firewall_policy_test.go @@ -975,11 +975,11 @@ func TestAccNetworkFirewallFirewallPolicy_tags(t *testing.T) { CheckDestroy: testAccCheckFirewallPolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFirewallPolicyConfig_tags1(rName, "key1", "value1"), + Config: testAccFirewallPolicyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallPolicyExists(ctx, resourceName, &firewallPolicy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -988,20 +988,20 @@ func TestAccNetworkFirewallFirewallPolicy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFirewallPolicyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFirewallPolicyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallPolicyExists(ctx, resourceName, &firewallPolicy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFirewallPolicyConfig_tags1(rName, "key2", "value2"), + Config: testAccFirewallPolicyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallPolicyExists(ctx, resourceName, &firewallPolicy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkfirewall/firewall_test.go b/internal/service/networkfirewall/firewall_test.go index 905b632dbaf..f851341dcd6 100644 --- a/internal/service/networkfirewall/firewall_test.go +++ b/internal/service/networkfirewall/firewall_test.go @@ -370,11 +370,11 @@ func TestAccNetworkFirewallFirewall_tags(t *testing.T) { CheckDestroy: testAccCheckFirewallDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFirewallConfig_tags1(rName, "key1", "value1"), + Config: testAccFirewallConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -383,20 +383,20 @@ func TestAccNetworkFirewallFirewall_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFirewallConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFirewallConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFirewallConfig_tags1(rName, "key2", "value2"), + Config: testAccFirewallConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkfirewall/rule_group_test.go b/internal/service/networkfirewall/rule_group_test.go index 1be71ee78d7..2843d9d83c2 100644 --- a/internal/service/networkfirewall/rule_group_test.go +++ b/internal/service/networkfirewall/rule_group_test.go @@ -909,11 +909,11 @@ func TestAccNetworkFirewallRuleGroup_tags(t *testing.T) { CheckDestroy: testAccCheckRuleGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccRuleGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &ruleGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -922,19 +922,19 @@ func TestAccNetworkFirewallRuleGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRuleGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &ruleGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccRuleGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 65f42962d028ec08111e6a425992958efa4bfa3e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:49 -0400 Subject: [PATCH 123/180] networkmanager: Use constants for test strings --- internal/service/networkmanager/connection_test.go | 12 ++++++------ internal/service/networkmanager/core_network_test.go | 12 ++++++------ internal/service/networkmanager/device_test.go | 12 ++++++------ .../service/networkmanager/global_network_test.go | 12 ++++++------ internal/service/networkmanager/link_test.go | 12 ++++++------ internal/service/networkmanager/site_test.go | 12 ++++++------ .../networkmanager/transit_gateway_peering_test.go | 12 ++++++------ .../transit_gateway_route_table_attachment_test.go | 12 ++++++------ 8 files changed, 48 insertions(+), 48 deletions(-) diff --git a/internal/service/networkmanager/connection_test.go b/internal/service/networkmanager/connection_test.go index ea4ee5d7a97..cf82b3a8c61 100644 --- a/internal/service/networkmanager/connection_test.go +++ b/internal/service/networkmanager/connection_test.go @@ -98,11 +98,11 @@ func testAccConnection_tags(t *testing.T) { CheckDestroy: testAccCheckConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectionConfig_tags1(rName, "key1", "value1"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -112,20 +112,20 @@ func testAccConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConnectionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConnectionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConnectionConfig_tags1(rName, "key2", "value2"), + Config: testAccConnectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/core_network_test.go b/internal/service/networkmanager/core_network_test.go index 30840051231..5f8b9381653 100644 --- a/internal/service/networkmanager/core_network_test.go +++ b/internal/service/networkmanager/core_network_test.go @@ -84,11 +84,11 @@ func TestAccNetworkManagerCoreNetwork_tags(t *testing.T) { CheckDestroy: testAccCheckCoreNetworkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCoreNetworkConfig_tags1("key1", "value1"), + Config: testAccCoreNetworkConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCoreNetworkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -98,20 +98,20 @@ func TestAccNetworkManagerCoreNetwork_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"create_base_policy"}, }, { - Config: testAccCoreNetworkConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccCoreNetworkConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCoreNetworkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCoreNetworkConfig_tags1("key2", "value2"), + Config: testAccCoreNetworkConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCoreNetworkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/device_test.go b/internal/service/networkmanager/device_test.go index 8ff67d49da5..fde18435b63 100644 --- a/internal/service/networkmanager/device_test.go +++ b/internal/service/networkmanager/device_test.go @@ -90,11 +90,11 @@ func TestAccNetworkManagerDevice_tags(t *testing.T) { CheckDestroy: testAccCheckDeviceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDeviceConfig_tags1(rName, "key1", "value1"), + Config: testAccDeviceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeviceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -104,20 +104,20 @@ func TestAccNetworkManagerDevice_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDeviceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDeviceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeviceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDeviceConfig_tags1(rName, "key2", "value2"), + Config: testAccDeviceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeviceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/global_network_test.go b/internal/service/networkmanager/global_network_test.go index b05368bdb09..cbc6a9c8429 100644 --- a/internal/service/networkmanager/global_network_test.go +++ b/internal/service/networkmanager/global_network_test.go @@ -79,11 +79,11 @@ func TestAccNetworkManagerGlobalNetwork_tags(t *testing.T) { CheckDestroy: testAccCheckGlobalNetworkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGlobalNetworkConfig_tags1("key1", "value1"), + Config: testAccGlobalNetworkConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGlobalNetworkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -92,20 +92,20 @@ func TestAccNetworkManagerGlobalNetwork_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGlobalNetworkConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccGlobalNetworkConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGlobalNetworkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGlobalNetworkConfig_tags1("key2", "value2"), + Config: testAccGlobalNetworkConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGlobalNetworkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/link_test.go b/internal/service/networkmanager/link_test.go index be17dfc6fba..178becb9d29 100644 --- a/internal/service/networkmanager/link_test.go +++ b/internal/service/networkmanager/link_test.go @@ -88,11 +88,11 @@ func TestAccNetworkManagerLink_tags(t *testing.T) { CheckDestroy: testAccCheckLinkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLinkConfig_tags1(rName, "key1", "value1"), + Config: testAccLinkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLinkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func TestAccNetworkManagerLink_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLinkConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLinkConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLinkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLinkConfig_tags1(rName, "key2", "value2"), + Config: testAccLinkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLinkExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/site_test.go b/internal/service/networkmanager/site_test.go index cf3babff11c..c99b3b43a7a 100644 --- a/internal/service/networkmanager/site_test.go +++ b/internal/service/networkmanager/site_test.go @@ -84,11 +84,11 @@ func TestAccNetworkManagerSite_tags(t *testing.T) { CheckDestroy: testAccCheckSiteDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSiteConfig_tags1(rName, "key1", "value1"), + Config: testAccSiteConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSiteExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -98,20 +98,20 @@ func TestAccNetworkManagerSite_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSiteConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSiteConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSiteExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSiteConfig_tags1(rName, "key2", "value2"), + Config: testAccSiteConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSiteExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/transit_gateway_peering_test.go b/internal/service/networkmanager/transit_gateway_peering_test.go index 299042e79a0..96714fe6eb4 100644 --- a/internal/service/networkmanager/transit_gateway_peering_test.go +++ b/internal/service/networkmanager/transit_gateway_peering_test.go @@ -104,11 +104,11 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { CheckDestroy: testAccCheckTransitGatewayPeeringDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayPeeringConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayPeeringConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,20 +117,20 @@ func TestAccNetworkManagerTransitGatewayPeering_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTransitGatewayPeeringConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayPeeringConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayPeeringConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayPeeringConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayPeeringExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go b/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go index a48647e852f..25c71f703c8 100644 --- a/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go +++ b/internal/service/networkmanager/transit_gateway_route_table_attachment_test.go @@ -93,11 +93,11 @@ func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags(t *testing.T) CheckDestroy: testAccCheckTransitGatewayRouteTableAttachmentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, "key1", "value1"), + Config: testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccNetworkManagerTransitGatewayRouteTableAttachment_tags(t *testing.T) ImportStateVerify: true, }, { - Config: testAccTransitGatewayRouteTableAttachmentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTransitGatewayRouteTableAttachmentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, "key2", "value2"), + Config: testAccTransitGatewayRouteTableAttachmentConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTransitGatewayRouteTableAttachmentExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 30b83d8dc6bcfa2630cb4d3fcf6348f84350581e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:50 -0400 Subject: [PATCH 124/180] oam: Use constants for test strings --- internal/service/oam/link_data_source_test.go | 2 +- internal/service/oam/link_test.go | 12 ++++++------ internal/service/oam/sink_data_source_test.go | 2 +- internal/service/oam/sink_test.go | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/internal/service/oam/link_data_source_test.go b/internal/service/oam/link_data_source_test.go index 80128173f6c..fcf545a27c3 100644 --- a/internal/service/oam/link_data_source_test.go +++ b/internal/service/oam/link_data_source_test.go @@ -44,7 +44,7 @@ func TestAccObservabilityAccessManagerLinkDataSource_basic(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, "resource_types.0", "AWS::CloudWatch::Metric"), resource.TestCheckResourceAttrSet(dataSourceName, "sink_arn"), resource.TestCheckResourceAttr(dataSourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/oam/link_test.go b/internal/service/oam/link_test.go index 7610ccab0e8..71d032dc210 100644 --- a/internal/service/oam/link_test.go +++ b/internal/service/oam/link_test.go @@ -181,28 +181,28 @@ func TestAccObservabilityAccessManagerLink_tags(t *testing.T) { CheckDestroy: testAccCheckLinkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLinkConfig_tags1(rName, "key1", "value1"), + Config: testAccLinkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLinkExists(ctx, resourceName, &link), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccLinkConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLinkConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLinkExists(ctx, resourceName, &link), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLinkConfig_tags1(rName, "key2", "value2"), + Config: testAccLinkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLinkExists(ctx, resourceName, &link), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/oam/sink_data_source_test.go b/internal/service/oam/sink_data_source_test.go index 8080b4517a7..3958479604e 100644 --- a/internal/service/oam/sink_data_source_test.go +++ b/internal/service/oam/sink_data_source_test.go @@ -43,7 +43,7 @@ func TestAccObservabilityAccessManagerSinkDataSource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(dataSourceName, "sink_id"), resource.TestCheckResourceAttrSet(dataSourceName, "sink_identifier"), resource.TestCheckResourceAttr(dataSourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(dataSourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.key1", acctest.CtValue1), acctest.MatchResourceAttrRegionalARN(dataSourceName, names.AttrARN, "oam", regexache.MustCompile(`sink/+.`)), ), }, diff --git a/internal/service/oam/sink_test.go b/internal/service/oam/sink_test.go index 744a727ae9d..f504125a838 100644 --- a/internal/service/oam/sink_test.go +++ b/internal/service/oam/sink_test.go @@ -115,11 +115,11 @@ func TestAccObservabilityAccessManagerSink_tags(t *testing.T) { CheckDestroy: testAccCheckSinkDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSinkConfigTags1(rName, "key1", "value1"), + Config: testAccSinkConfigTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSinkExists(ctx, resourceName, &sink), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -128,20 +128,20 @@ func TestAccObservabilityAccessManagerSink_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSinkConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSinkConfigTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSinkExists(ctx, resourceName, &sink), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSinkConfigTags1(rName, "key2", "value2"), + Config: testAccSinkConfigTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSinkExists(ctx, resourceName, &sink), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 0578f0403bb44796476608eb1cd2b70af5f0c01e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:50 -0400 Subject: [PATCH 125/180] opensearch: Use constants for test strings --- internal/service/opensearch/domain_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/opensearch/domain_test.go b/internal/service/opensearch/domain_test.go index b3367ee83f3..e97fd74d363 100644 --- a/internal/service/opensearch/domain_test.go +++ b/internal/service/opensearch/domain_test.go @@ -1664,11 +1664,11 @@ func TestAccOpenSearchDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1678,20 +1678,20 @@ func TestAccOpenSearchDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags1(rName, "key2", "value2"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 3ddacbf1a6955e5fbac44ff7031f26b0e6cb961f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:50 -0400 Subject: [PATCH 126/180] opensearchserverless: Use constants for test strings --- .../opensearchserverless/collection_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/opensearchserverless/collection_test.go b/internal/service/opensearchserverless/collection_test.go index 32d568dafe7..c4432e53fe3 100644 --- a/internal/service/opensearchserverless/collection_test.go +++ b/internal/service/opensearchserverless/collection_test.go @@ -111,28 +111,28 @@ func TestAccOpenSearchServerlessCollection_tags(t *testing.T) { CheckDestroy: testAccCheckCollectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCollectionConfig_tags1(rName, "key1", "value1"), + Config: testAccCollectionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCollectionExists(ctx, resourceName, &collection), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccCollectionConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccCollectionConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCollectionExists(ctx, resourceName, &collection), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCollectionConfig_tags1(rName, "key2", "value2"), + Config: testAccCollectionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCollectionExists(ctx, resourceName, &collection), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 0f86575eadc7e7b4b39627d4ec07509a2578905c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:50 -0400 Subject: [PATCH 127/180] opsworks: Use constants for test strings --- internal/service/opsworks/application_test.go | 22 ++++++++--------- .../service/opsworks/rails_app_layer_test.go | 24 +++++++++---------- internal/service/opsworks/stack_test.go | 24 +++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/internal/service/opsworks/application_test.go b/internal/service/opsworks/application_test.go index 1d9d7f6d3c6..48039ab5e7b 100644 --- a/internal/service/opsworks/application_test.go +++ b/internal/service/opsworks/application_test.go @@ -46,8 +46,8 @@ func TestAccOpsWorksApplication_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "app_source.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "app_source.0.type", "other"), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "environment.*", map[string]string{ - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, "secret": "", }), resource.TestCheckResourceAttr(resourceName, "document_root", "foo"), @@ -79,13 +79,13 @@ func TestAccOpsWorksApplication_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "app_source.0.url", "https://github.com/aws/example.git"), resource.TestCheckResourceAttr(resourceName, "app_source.0.username", ""), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "environment.*", map[string]string{ - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, "secure": "true", }), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "environment.*", map[string]string{ - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, "secret": "", }), resource.TestCheckResourceAttr(resourceName, "document_root", "root"), @@ -151,8 +151,8 @@ func testAccCheckCreateAppAttributes( expectedEnv := []*opsworks.EnvironmentVariable{ { - Key: aws.String("key1"), - Value: aws.String("value1"), + Key: aws.String(acctest.CtKey1), + Value: aws.String(acctest.CtValue1), Secure: aws.Bool(false), }, } @@ -211,13 +211,13 @@ func testAccCheckUpdateAppAttributes( expectedEnv := []*opsworks.EnvironmentVariable{ { - Key: aws.String("key2"), + Key: aws.String(acctest.CtKey2), Value: aws.String("*****FILTERED*****"), Secure: aws.Bool(true), }, { - Key: aws.String("key1"), - Value: aws.String("value1"), + Key: aws.String(acctest.CtKey1), + Value: aws.String(acctest.CtValue1), Secure: aws.Bool(false), }, } diff --git a/internal/service/opsworks/rails_app_layer_test.go b/internal/service/opsworks/rails_app_layer_test.go index 2b96fd6cb52..c323557a33b 100644 --- a/internal/service/opsworks/rails_app_layer_test.go +++ b/internal/service/opsworks/rails_app_layer_test.go @@ -112,28 +112,28 @@ func TestAccOpsWorksRailsAppLayer_tags(t *testing.T) { CheckDestroy: testAccCheckRailsAppLayerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRailsAppLayerConfig_tags1(rName, "key1", "value1"), + Config: testAccRailsAppLayerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLayerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccRailsAppLayerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRailsAppLayerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLayerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRailsAppLayerConfig_tags1(rName, "key2", "value2"), + Config: testAccRailsAppLayerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLayerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -161,28 +161,28 @@ func TestAccOpsWorksRailsAppLayer_tagsAlternateRegion(t *testing.T) { CheckDestroy: testAccCheckRailsAppLayerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRailsAppLayerConfig_tags1AlternateRegion(rName, "key1", "value1"), + Config: testAccRailsAppLayerConfig_tags1AlternateRegion(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLayerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccRailsAppLayerConfig_tags2AlternateRegion(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRailsAppLayerConfig_tags2AlternateRegion(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLayerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRailsAppLayerConfig_tags1AlternateRegion(rName, "key2", "value2"), + Config: testAccRailsAppLayerConfig_tags1AlternateRegion(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLayerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/opsworks/stack_test.go b/internal/service/opsworks/stack_test.go index 4d3c23bf522..9d72a761116 100644 --- a/internal/service/opsworks/stack_test.go +++ b/internal/service/opsworks/stack_test.go @@ -198,11 +198,11 @@ func TestAccOpsWorksStack_tags(t *testing.T) { CheckDestroy: testAccCheckStackDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStackConfig_tags1(rName, "key1", "value1"), + Config: testAccStackConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -211,20 +211,20 @@ func TestAccOpsWorksStack_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStackConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStackConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStackConfig_tags1(rName, "key2", "value2"), + Config: testAccStackConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -253,7 +253,7 @@ func TestAccOpsWorksStack_tagsAlternateRegion(t *testing.T) { CheckDestroy: testAccCheckStackDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStackConfig_tags1AlternateRegion(rName, "key1", "value1"), + Config: testAccStackConfig_tags1AlternateRegion(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &v), resource.TestCheckResourceAttrWith(resourceName, names.AttrARN, func(value string) error { @@ -273,7 +273,7 @@ func TestAccOpsWorksStack_tagsAlternateRegion(t *testing.T) { // "In this case, the actual API endpoint of the stack is in us-east-1." resource.TestCheckResourceAttr(resourceName, "stack_endpoint", endpoints.UsEast1RegionID), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -282,20 +282,20 @@ func TestAccOpsWorksStack_tagsAlternateRegion(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStackConfig_tags2AlternateRegion(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStackConfig_tags2AlternateRegion(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStackConfig_tags1AlternateRegion(rName, "key2", "value2"), + Config: testAccStackConfig_tags1AlternateRegion(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStackExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 4604c93ca412bdc9afb4fd02256881c0450b7eff Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:50 -0400 Subject: [PATCH 128/180] organizations: Use constants for test strings --- internal/service/organizations/account_test.go | 12 ++++++------ .../organizations/organizational_unit_test.go | 12 ++++++------ internal/service/organizations/policy_test.go | 12 ++++++------ .../service/organizations/resource_policy_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/organizations/account_test.go b/internal/service/organizations/account_test.go index f00da11ab5f..063f2bde951 100644 --- a/internal/service/organizations/account_test.go +++ b/internal/service/organizations/account_test.go @@ -174,29 +174,29 @@ func testAccAccount_Tags(t *testing.T) { CheckDestroy: testAccCheckAccountDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccountConfig_tags1(name, email, "key1", "value1"), + Config: testAccAccountConfig_tags1(name, email, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccountExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, testAccAccountImportStep(resourceName), { - Config: testAccAccountConfig_tags2(name, email, "key1", "value1updated", "key2", "value2"), + Config: testAccAccountConfig_tags2(name, email, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccountExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccountConfig_tags1(name, email, "key2", "value2"), + Config: testAccAccountConfig_tags1(name, email, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccountExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/organizations/organizational_unit_test.go b/internal/service/organizations/organizational_unit_test.go index cf1f2e1a128..dabff229477 100644 --- a/internal/service/organizations/organizational_unit_test.go +++ b/internal/service/organizations/organizational_unit_test.go @@ -135,11 +135,11 @@ func testAccOrganizationalUnit_tags(t *testing.T) { CheckDestroy: testAccCheckOrganizationalUnitDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOrganizationalUnitConfig_tags1(rName, "key1", "value1"), + Config: testAccOrganizationalUnitConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationalUnitExists(ctx, resourceName, &unit), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -148,20 +148,20 @@ func testAccOrganizationalUnit_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOrganizationalUnitConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOrganizationalUnitConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationalUnitExists(ctx, resourceName, &unit), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOrganizationalUnitConfig_tags1(rName, "key2", "value2"), + Config: testAccOrganizationalUnitConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOrganizationalUnitExists(ctx, resourceName, &unit), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/organizations/policy_test.go b/internal/service/organizations/policy_test.go index 333b18e98c2..b74a81daf48 100644 --- a/internal/service/organizations/policy_test.go +++ b/internal/service/organizations/policy_test.go @@ -145,11 +145,11 @@ func testAccPolicy_tags(t *testing.T) { CheckDestroy: testAccCheckPolicyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPolicyConfig_tags1(rName, "key1", "value1"), + Config: testAccPolicyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &policy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -159,20 +159,20 @@ func testAccPolicy_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrSkipDestroy}, }, { - Config: testAccPolicyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPolicyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &policy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPolicyConfig_tags1(rName, "key2", "value2"), + Config: testAccPolicyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPolicyExists(ctx, resourceName, &policy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/organizations/resource_policy_test.go b/internal/service/organizations/resource_policy_test.go index 76dd9503d5b..c3f8644d254 100644 --- a/internal/service/organizations/resource_policy_test.go +++ b/internal/service/organizations/resource_policy_test.go @@ -95,11 +95,11 @@ func testAccResourcePolicy_tags(t *testing.T) { ErrorCheck: acctest.ErrorCheck(t, names.OrganizationsServiceID), Steps: []resource.TestStep{ { - Config: testAccResourcePolicyConfig_tags1("key1", "value1"), + Config: testAccResourcePolicyConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckResourcePolicyExists(ctx, resourceName, &policy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -108,20 +108,20 @@ func testAccResourcePolicy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccResourcePolicyConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccResourcePolicyConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourcePolicyExists(ctx, resourceName, &policy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccResourcePolicyConfig_tags1("key2", "value2"), + Config: testAccResourcePolicyConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourcePolicyExists(ctx, resourceName, &policy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 4c07a6ffec06c5b9dfa25a5e48a483f74cdca587 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 129/180] osis: Use constants for test strings --- internal/service/osis/pipeline_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/osis/pipeline_test.go b/internal/service/osis/pipeline_test.go index 073e7aed823..7c08febee4f 100644 --- a/internal/service/osis/pipeline_test.go +++ b/internal/service/osis/pipeline_test.go @@ -259,28 +259,28 @@ func TestAccOpenSearchIngestionPipeline_tags(t *testing.T) { CheckDestroy: testAccCheckPipelineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPipelineConfig_tags1(rName, "key1", "value1"), + Config: testAccPipelineConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &pipeline), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccPipelineConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccPipelineConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &pipeline), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPipelineConfig_tags1(rName, "key2", "value2"), + Config: testAccPipelineConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &pipeline), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 8591aed909192ee6ebd527f17702b23c8170b486 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 130/180] pinpoint: Use constants for test strings --- internal/service/pinpoint/app_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/pinpoint/app_test.go b/internal/service/pinpoint/app_test.go index 64bb4ecebb3..84c99897e5b 100644 --- a/internal/service/pinpoint/app_test.go +++ b/internal/service/pinpoint/app_test.go @@ -138,11 +138,11 @@ func TestAccPinpointApp_tags(t *testing.T) { CheckDestroy: testAccCheckAppDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAppConfig_tags1(rName, "key1", "value1"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -151,20 +151,20 @@ func TestAccPinpointApp_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAppConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAppConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAppConfig_tags1(rName, "key2", "value2"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 22a811f46d9f9a28e788dad177bc0d66d89e7eb6 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 131/180] pipes: Use constants for test strings --- internal/service/pipes/pipe_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/pipes/pipe_test.go b/internal/service/pipes/pipe_test.go index e3a6f4e197e..8a79b99298d 100644 --- a/internal/service/pipes/pipe_test.go +++ b/internal/service/pipes/pipe_test.go @@ -521,11 +521,11 @@ func TestAccPipesPipe_tags(t *testing.T) { CheckDestroy: testAccCheckPipeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPipeConfig_tags1(rName, "key1", "value1"), + Config: testAccPipeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPipeExists(ctx, resourceName, &pipe), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -534,20 +534,20 @@ func TestAccPipesPipe_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPipeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPipeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipeExists(ctx, resourceName, &pipe), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPipeConfig_tags1(rName, "key2", "value2"), + Config: testAccPipeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipeExists(ctx, resourceName, &pipe), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 96d5720d477e2dc951ebdbf1b39fe978f0e8adc0 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 132/180] qldb: Use constants for test strings --- internal/service/qldb/ledger_test.go | 12 ++++++------ internal/service/qldb/stream_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/qldb/ledger_test.go b/internal/service/qldb/ledger_test.go index f7c4434516f..16ef8abd1b4 100644 --- a/internal/service/qldb/ledger_test.go +++ b/internal/service/qldb/ledger_test.go @@ -198,11 +198,11 @@ func TestAccQLDBLedger_tags(t *testing.T) { CheckDestroy: testAccCheckLedgerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLedgerConfig_tags1(rName, "key1", "value1"), + Config: testAccLedgerConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLedgerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -211,20 +211,20 @@ func TestAccQLDBLedger_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccLedgerConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccLedgerConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLedgerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLedgerConfig_tags1(rName, "key2", "value2"), + Config: testAccLedgerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLedgerExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/qldb/stream_test.go b/internal/service/qldb/stream_test.go index 909240d50c9..9e28810f9d2 100644 --- a/internal/service/qldb/stream_test.go +++ b/internal/service/qldb/stream_test.go @@ -89,28 +89,28 @@ func TestAccQLDBStream_tags(t *testing.T) { CheckDestroy: testAccCheckStreamDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStreamConfig_tags1(rName, "key1", "value1"), + Config: testAccStreamConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccStreamConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStreamConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStreamConfig_tags1(rName, "key2", "value2"), + Config: testAccStreamConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStreamExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 85541601f839278de293fbd927601ada7ca0a9ec Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 133/180] quicksight: Use constants for test strings --- internal/service/quicksight/data_set_test.go | 12 ++++++------ internal/service/quicksight/data_source_test.go | 12 ++++++------ internal/service/quicksight/folder_test.go | 12 ++++++------ internal/service/quicksight/namespace_test.go | 12 ++++++------ internal/service/quicksight/template_test.go | 12 ++++++------ internal/service/quicksight/vpc_connection_test.go | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/internal/service/quicksight/data_set_test.go b/internal/service/quicksight/data_set_test.go index fb205cb0e59..3df7ad6b477 100644 --- a/internal/service/quicksight/data_set_test.go +++ b/internal/service/quicksight/data_set_test.go @@ -462,11 +462,11 @@ func TestAccQuickSightDataSet_tags(t *testing.T) { CheckDestroy: testAccCheckDataSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataSetConfigTags1(rId, rName, "key1", "value1"), + Config: testAccDataSetConfigTags1(rId, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataSetExists(ctx, resourceName, &dataSet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -475,20 +475,20 @@ func TestAccQuickSightDataSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDataSetConfigTags2(rId, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDataSetConfigTags2(rId, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSetExists(ctx, resourceName, &dataSet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataSetConfigTags1(rId, rName, "key2", "value2"), + Config: testAccDataSetConfigTags1(rId, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSetExists(ctx, resourceName, &dataSet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/quicksight/data_source_test.go b/internal/service/quicksight/data_source_test.go index d62e0c55260..9e81250ca1e 100644 --- a/internal/service/quicksight/data_source_test.go +++ b/internal/service/quicksight/data_source_test.go @@ -99,11 +99,11 @@ func TestAccQuickSightDataSource_tags(t *testing.T) { CheckDestroy: testAccCheckDataSourceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataSourceConfig_tags1(rId, rName, "key1", "value1"), + Config: testAccDataSourceConfig_tags1(rId, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataSourceExists(ctx, resourceName, &dataSource), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -112,20 +112,20 @@ func TestAccQuickSightDataSource_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDataSourceConfig_tags2(rId, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDataSourceConfig_tags2(rId, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataSourceExists(ctx, resourceName, &dataSource), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataSourceConfig_tags1(rId, rName, "key1", "value1"), + Config: testAccDataSourceConfig_tags1(rId, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataSourceExists(ctx, resourceName, &dataSource), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/quicksight/folder_test.go b/internal/service/quicksight/folder_test.go index c9ff7ae70fc..339e5ab9db3 100644 --- a/internal/service/quicksight/folder_test.go +++ b/internal/service/quicksight/folder_test.go @@ -166,11 +166,11 @@ func TestAccQuickSightFolder_tags(t *testing.T) { CheckDestroy: testAccCheckFolderDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFolderConfig_tags1(rId, rName, "key1", "value1"), + Config: testAccFolderConfig_tags1(rId, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFolderExists(ctx, resourceName, &folder), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -179,20 +179,20 @@ func TestAccQuickSightFolder_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFolderConfig_tags2(rId, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFolderConfig_tags2(rId, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFolderExists(ctx, resourceName, &folder), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFolderConfig_tags1(rId, rName, "key2", "value2"), + Config: testAccFolderConfig_tags1(rId, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFolderExists(ctx, resourceName, &folder), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/quicksight/namespace_test.go b/internal/service/quicksight/namespace_test.go index b4bbbfbccd5..f31da9f1e46 100644 --- a/internal/service/quicksight/namespace_test.go +++ b/internal/service/quicksight/namespace_test.go @@ -87,12 +87,12 @@ func TestAccQuickSightNamespace_tags(t *testing.T) { CheckDestroy: testAccCheckNamespaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNamespaceConfig_tags1(rName, "key1", "value1"), + Config: testAccNamespaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNamespaceExists(ctx, resourceName, &namespace), resource.TestCheckResourceAttr(resourceName, names.AttrNamespace, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -101,22 +101,22 @@ func TestAccQuickSightNamespace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNamespaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNamespaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNamespaceExists(ctx, resourceName, &namespace), resource.TestCheckResourceAttr(resourceName, names.AttrNamespace, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNamespaceConfig_tags1(rName, "key2", "value2"), + Config: testAccNamespaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNamespaceExists(ctx, resourceName, &namespace), resource.TestCheckResourceAttr(resourceName, names.AttrNamespace, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/quicksight/template_test.go b/internal/service/quicksight/template_test.go index 293c2a4e26a..1cd3b8d228c 100644 --- a/internal/service/quicksight/template_test.go +++ b/internal/service/quicksight/template_test.go @@ -221,14 +221,14 @@ func TestAccQuickSightTemplate_tags(t *testing.T) { CheckDestroy: testAccCheckTemplateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTemplateConfig_tags1(rId, rName, "key1", "value1"), + Config: testAccTemplateConfig_tags1(rId, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTemplateExists(ctx, resourceName, &template), resource.TestCheckResourceAttr(resourceName, "template_id", rId), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, quicksight.ResourceStatusCreationSuccessful), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -237,7 +237,7 @@ func TestAccQuickSightTemplate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTemplateConfig_tags2(rId, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTemplateConfig_tags2(rId, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTemplateExists(ctx, resourceName, &template), resource.TestCheckResourceAttr(resourceName, "template_id", rId), @@ -245,18 +245,18 @@ func TestAccQuickSightTemplate_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrStatus, quicksight.ResourceStatusCreationSuccessful), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTemplateConfig_tags1(rId, rName, "key2", "value2"), + Config: testAccTemplateConfig_tags1(rId, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTemplateExists(ctx, resourceName, &template), resource.TestCheckResourceAttr(resourceName, "template_id", rId), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrStatus, quicksight.ResourceStatusCreationSuccessful), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/quicksight/vpc_connection_test.go b/internal/service/quicksight/vpc_connection_test.go index 277c6ebac64..7a4efd8d44f 100644 --- a/internal/service/quicksight/vpc_connection_test.go +++ b/internal/service/quicksight/vpc_connection_test.go @@ -93,13 +93,13 @@ func TestAccQuickSightVPCConnection_tags(t *testing.T) { CheckDestroy: testAccCheckVPCConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVPCConnectionConfig_tags1(rId, rName, "key1", "value1"), + Config: testAccVPCConnectionConfig_tags1(rId, rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVPCConnectionExists(ctx, resourceName, &vpcConnection), resource.TestCheckResourceAttr(resourceName, "vpc_connection_id", rId), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -108,24 +108,24 @@ func TestAccQuickSightVPCConnection_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccVPCConnectionConfig_tags2(rId, rName, "key1", "value1updated", "key2", "value2"), + Config: testAccVPCConnectionConfig_tags2(rId, rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCConnectionExists(ctx, resourceName, &vpcConnection), resource.TestCheckResourceAttr(resourceName, "vpc_connection_id", rId), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVPCConnectionConfig_tags1(rId, rName, "key2", "value2"), + Config: testAccVPCConnectionConfig_tags1(rId, rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVPCConnectionExists(ctx, resourceName, &vpcConnection), resource.TestCheckResourceAttr(resourceName, "vpc_connection_id", rId), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 26558f1d92efefcc03acd3bb0f118d21a325943e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 134/180] ram: Use constants for test strings --- internal/service/ram/resource_share_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/ram/resource_share_test.go b/internal/service/ram/resource_share_test.go index ab94694c9fd..43163ef6400 100644 --- a/internal/service/ram/resource_share_test.go +++ b/internal/service/ram/resource_share_test.go @@ -168,11 +168,11 @@ func TestAccRAMResourceShare_tags(t *testing.T) { CheckDestroy: testAccCheckResourceShareDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccResourceShareConfig_tags1(rName, "key1", "value1"), + Config: testAccResourceShareConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckResourceShareExists(ctx, resourceName, &resourceShare1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -181,20 +181,20 @@ func TestAccRAMResourceShare_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccResourceShareConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccResourceShareConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourceShareExists(ctx, resourceName, &resourceShare2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccResourceShareConfig_tags1(rName, "key2", "value2"), + Config: testAccResourceShareConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourceShareExists(ctx, resourceName, &resourceShare3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From edb9be67486e149d27770b72a96bf459694b8d19 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:51 -0400 Subject: [PATCH 135/180] rbin: Use constants for test strings --- internal/service/rbin/rule_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/rbin/rule_test.go b/internal/service/rbin/rule_test.go index 6f8e62b220d..7008be60709 100644 --- a/internal/service/rbin/rule_test.go +++ b/internal/service/rbin/rule_test.go @@ -126,11 +126,11 @@ func TestAccRBinRule_tags(t *testing.T) { CheckDestroy: testAccCheckRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleConfigTags1(resourceType, "key1", "value1"), + Config: testAccRuleConfigTags1(resourceType, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -139,20 +139,20 @@ func TestAccRBinRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRuleConfigTags2(resourceType, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleConfigTags2(resourceType, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleConfigTags1(resourceType, "key1", "value1"), + Config: testAccRuleConfigTags1(resourceType, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, From 896a657c8dc78d17cbfe60a5a40a1a0eef53fd94 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:52 -0400 Subject: [PATCH 136/180] rds: Use constants for test strings --- internal/service/rds/cluster_endpoint_test.go | 12 +++++----- internal/service/rds/cluster_instance_test.go | 12 +++++----- .../rds/cluster_parameter_group_test.go | 12 +++++----- internal/service/rds/cluster_snapshot_test.go | 12 +++++----- internal/service/rds/cluster_test.go | 16 ++++++------- .../rds/custom_db_engine_version_test.go | 4 ++-- .../service/rds/event_subscription_test.go | 12 +++++----- internal/service/rds/instance_migrate_test.go | 8 +++---- internal/service/rds/instance_test.go | 22 ++++++++--------- internal/service/rds/option_group_test.go | 24 +++++++++---------- internal/service/rds/parameter_group_test.go | 12 +++++----- internal/service/rds/proxy_endpoint_test.go | 12 +++++----- internal/service/rds/proxy_test.go | 12 +++++----- internal/service/rds/snapshot_copy_test.go | 12 +++++----- internal/service/rds/snapshot_test.go | 12 +++++----- internal/service/rds/subnet_group_test.go | 12 +++++----- 16 files changed, 103 insertions(+), 103 deletions(-) diff --git a/internal/service/rds/cluster_endpoint_test.go b/internal/service/rds/cluster_endpoint_test.go index 4cd6cecc604..9db6f81837d 100644 --- a/internal/service/rds/cluster_endpoint_test.go +++ b/internal/service/rds/cluster_endpoint_test.go @@ -87,11 +87,11 @@ func TestAccRDSClusterEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckClusterEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterEndpointConfig_tags1(rInt, "key1", "value1"), + Config: testAccClusterEndpointConfig_tags1(rInt, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterEndpointExists(ctx, resourceName, &customReaderEndpoint), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,20 +100,20 @@ func TestAccRDSClusterEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterEndpointConfig_tags2(rInt, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterEndpointConfig_tags2(rInt, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterEndpointExists(ctx, resourceName, &customReaderEndpoint), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterEndpointConfig_tags1(rInt, "key2", "value2"), + Config: testAccClusterEndpointConfig_tags1(rInt, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterEndpointExists(ctx, resourceName, &customReaderEndpoint), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/cluster_instance_test.go b/internal/service/rds/cluster_instance_test.go index 8ce40194379..c37250c4f93 100644 --- a/internal/service/rds/cluster_instance_test.go +++ b/internal/service/rds/cluster_instance_test.go @@ -194,11 +194,11 @@ func TestAccRDSClusterInstance_tags(t *testing.T) { CheckDestroy: testAccCheckClusterInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -210,20 +210,20 @@ func TestAccRDSClusterInstance_tags(t *testing.T) { }, }, { - Config: testAccClusterInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckClusterInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/cluster_parameter_group_test.go b/internal/service/rds/cluster_parameter_group_test.go index 64b902528ae..aacf52edcdc 100644 --- a/internal/service/rds/cluster_parameter_group_test.go +++ b/internal/service/rds/cluster_parameter_group_test.go @@ -158,11 +158,11 @@ func TestAccRDSClusterParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckClusterParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterParameterGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterParameterGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -171,20 +171,20 @@ func TestAccRDSClusterParameterGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterParameterGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterParameterGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterParameterGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterParameterGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/cluster_snapshot_test.go b/internal/service/rds/cluster_snapshot_test.go index 4b5da098c8f..7ceba9b3477 100644 --- a/internal/service/rds/cluster_snapshot_test.go +++ b/internal/service/rds/cluster_snapshot_test.go @@ -74,11 +74,11 @@ func TestAccRDSClusterSnapshot_tags(t *testing.T) { CheckDestroy: testAccCheckClusterSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterSnapshotConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterSnapshotConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterSnapshotExists(ctx, resourceName, &dbClusterSnapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -94,20 +94,20 @@ func TestAccRDSClusterSnapshot_tags(t *testing.T) { }, }, { - Config: testAccClusterSnapshotConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterSnapshotConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterSnapshotExists(ctx, resourceName, &dbClusterSnapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterSnapshotConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterSnapshotConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterSnapshotExists(ctx, resourceName, &dbClusterSnapshot), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/cluster_test.go b/internal/service/rds/cluster_test.go index dd2feea846d..1d2ea92ac09 100644 --- a/internal/service/rds/cluster_test.go +++ b/internal/service/rds/cluster_test.go @@ -188,29 +188,29 @@ func TestAccRDSCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &dbCluster1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, testAccClusterImportStep(resourceName), { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &dbCluster2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &dbCluster3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -2320,7 +2320,7 @@ func TestAccRDSCluster_SnapshotIdentifier_tags(t *testing.T) { testAccCheckClusterSnapshotExists(ctx, snapshotResourceName, &dbClusterSnapshot), testAccCheckClusterExists(ctx, resourceName, &dbCluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, @@ -2390,7 +2390,7 @@ func TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags(t *testing.T) testAccCheckClusterSnapshotExists(ctx, snapshotResourceName, &dbClusterSnapshot), testAccCheckClusterExists(ctx, resourceName, &dbCluster), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/rds/custom_db_engine_version_test.go b/internal/service/rds/custom_db_engine_version_test.go index f240fc272b6..4073edecf2b 100644 --- a/internal/service/rds/custom_db_engine_version_test.go +++ b/internal/service/rds/custom_db_engine_version_test.go @@ -245,11 +245,11 @@ func TestAccRDSCustomDBEngineVersion_tags(t *testing.T) { CheckDestroy: testAccCheckCustomDBEngineVersionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCustomDBEngineVersionConfig_tags(rName, ami, "key1", "value1"), + Config: testAccCustomDBEngineVersionConfig_tags(rName, ami, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCustomDBEngineVersionExists(ctx, resourceName, &customdbengineversion), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/rds/event_subscription_test.go b/internal/service/rds/event_subscription_test.go index 5aa8fc4a8e9..8f3c7d9bbf7 100644 --- a/internal/service/rds/event_subscription_test.go +++ b/internal/service/rds/event_subscription_test.go @@ -150,11 +150,11 @@ func TestAccRDSEventSubscription_tags(t *testing.T) { CheckDestroy: testAccCheckEventSubscriptionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEventSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -163,20 +163,20 @@ func TestAccRDSEventSubscription_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEventSubscriptionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEventSubscriptionConfig_tags1(rName, "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &eventSubscription), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/instance_migrate_test.go b/internal/service/rds/instance_migrate_test.go index e83add62803..ad5088f67a2 100644 --- a/internal/service/rds/instance_migrate_test.go +++ b/internal/service/rds/instance_migrate_test.go @@ -35,7 +35,7 @@ func TestInstanceStateUpgradeV0(t *testing.T) { "instance_class": "db.t2.micro", names.AttrPassword: "avoid-plaintext-passwords", names.AttrUsername: "tfacctest", - names.AttrTags: map[string]interface{}{"key1": "value1"}, + names.AttrTags: map[string]interface{}{acctest.CtKey1: acctest.CtValue1}, }, ExpectedState: map[string]interface{}{ "allocated_storage": 10, @@ -45,7 +45,7 @@ func TestInstanceStateUpgradeV0(t *testing.T) { "instance_class": "db.t2.micro", names.AttrPassword: "avoid-plaintext-passwords", names.AttrUsername: "tfacctest", - names.AttrTags: map[string]interface{}{"key1": "value1"}, + names.AttrTags: map[string]interface{}{acctest.CtKey1: acctest.CtValue1}, }, }, } @@ -91,7 +91,7 @@ func TestInstanceStateUpgradeV1(t *testing.T) { "instance_class": "db.t2.micro", names.AttrPassword: "avoid-plaintext-passwords", names.AttrResourceID: "db-cnuap2ilnbmok4eunzklfvwjca", - names.AttrTags: map[string]interface{}{"key1": "value1"}, + names.AttrTags: map[string]interface{}{acctest.CtKey1: acctest.CtValue1}, names.AttrUsername: "tfacctest", }, ExpectedState: map[string]interface{}{ @@ -102,7 +102,7 @@ func TestInstanceStateUpgradeV1(t *testing.T) { "instance_class": "db.t2.micro", names.AttrPassword: "avoid-plaintext-passwords", names.AttrResourceID: "db-cnuap2ilnbmok4eunzklfvwjca", - names.AttrTags: map[string]interface{}{"key1": "value1"}, + names.AttrTags: map[string]interface{}{acctest.CtKey1: acctest.CtValue1}, names.AttrUsername: "tfacctest", }, }, diff --git a/internal/service/rds/instance_test.go b/internal/service/rds/instance_test.go index b4ba78bbe8e..e965a8bb230 100644 --- a/internal/service/rds/instance_test.go +++ b/internal/service/rds/instance_test.go @@ -230,11 +230,11 @@ func TestAccRDSInstance_tags(t *testing.T) { CheckDestroy: testAccCheckInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -250,20 +250,20 @@ func TestAccRDSInstance_tags(t *testing.T) { }, }, { - Config: testAccInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -3296,7 +3296,7 @@ func TestAccRDSInstance_SnapshotIdentifier_tags(t *testing.T) { testAccCheckDBSnapshotExists(ctx, snapshotResourceName, &dbSnapshot), testAccCheckInstanceExists(ctx, resourceName, &dbInstance), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -3418,7 +3418,7 @@ func TestAccRDSInstance_SnapshotIdentifier_vpcSecurityGroupIDsTags(t *testing.T) testAccCheckDBSnapshotExists(ctx, snapshotResourceName, &dbSnapshot), testAccCheckInstanceExists(ctx, resourceName, &dbInstance), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, @@ -5284,15 +5284,15 @@ func TestAccRDSInstance_BlueGreenDeployment_tags(t *testing.T) { CheckDestroy: testAccCheckInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccInstanceConfig_BlueGreenDeployment_tags1(rName, "key1", "value1"), + Config: testAccInstanceConfig_BlueGreenDeployment_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccInstanceConfig_BlueGreenDeployment_tags1(rName, "key1", "value1updated"), + Config: testAccInstanceConfig_BlueGreenDeployment_tags1(rName, acctest.CtKey1, "value1updated"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckInstanceExists(ctx, resourceName, &v2), testAccCheckDBInstanceNotRecreated(&v1, &v2), diff --git a/internal/service/rds/option_group_test.go b/internal/service/rds/option_group_test.go index d4176209873..2266c813068 100644 --- a/internal/service/rds/option_group_test.go +++ b/internal/service/rds/option_group_test.go @@ -151,11 +151,11 @@ func TestAccRDSOptionGroup_tags(t *testing.T) { CheckDestroy: testAccCheckOptionGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOptionGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccOptionGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOptionGroupExists(ctx, resourceName, &optionGroup1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -164,20 +164,20 @@ func TestAccRDSOptionGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOptionGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOptionGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOptionGroupExists(ctx, resourceName, &optionGroup2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOptionGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccOptionGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOptionGroupExists(ctx, resourceName, &optionGroup3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -504,12 +504,12 @@ func TestAccRDSOptionGroup_Tags_withOptions(t *testing.T) { CheckDestroy: testAccCheckOptionGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccOptionGroupConfig_tagsOption1(rName, "key1", "value1"), + Config: testAccOptionGroupConfig_tagsOption1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckOptionGroupExists(ctx, resourceName, &optionGroup1), resource.TestCheckResourceAttr(resourceName, "option.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -518,22 +518,22 @@ func TestAccRDSOptionGroup_Tags_withOptions(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccOptionGroupConfig_tagsOption2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccOptionGroupConfig_tagsOption2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOptionGroupExists(ctx, resourceName, &optionGroup2), resource.TestCheckResourceAttr(resourceName, "option.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccOptionGroupConfig_tagsOption1(rName, "key2", "value2"), + Config: testAccOptionGroupConfig_tagsOption1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckOptionGroupExists(ctx, resourceName, &optionGroup3), resource.TestCheckResourceAttr(resourceName, "option.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/parameter_group_test.go b/internal/service/rds/parameter_group_test.go index 60d94ee3c0d..beb9ac9504d 100644 --- a/internal/service/rds/parameter_group_test.go +++ b/internal/service/rds/parameter_group_test.go @@ -154,11 +154,11 @@ func TestAccRDSParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccParameterGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -167,20 +167,20 @@ func TestAccRDSParameterGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccParameterGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccParameterGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccParameterGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccParameterGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/proxy_endpoint_test.go b/internal/service/rds/proxy_endpoint_test.go index 12afa3e3e11..3ac6dbc5952 100644 --- a/internal/service/rds/proxy_endpoint_test.go +++ b/internal/service/rds/proxy_endpoint_test.go @@ -156,11 +156,11 @@ func TestAccRDSProxyEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckProxyEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProxyEndpointConfig_tags1(rName, "key1", "value1"), + Config: testAccProxyEndpointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProxyEndpointExists(ctx, resourceName, &dbProxy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -169,20 +169,20 @@ func TestAccRDSProxyEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProxyEndpointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProxyEndpointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProxyEndpointExists(ctx, resourceName, &dbProxy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProxyEndpointConfig_tags1(rName, "key2", "value2"), + Config: testAccProxyEndpointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProxyEndpointExists(ctx, resourceName, &dbProxy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/proxy_test.go b/internal/service/rds/proxy_test.go index 7885dcb1dca..bc92788a1d7 100644 --- a/internal/service/rds/proxy_test.go +++ b/internal/service/rds/proxy_test.go @@ -463,11 +463,11 @@ func TestAccRDSProxy_tags(t *testing.T) { CheckDestroy: testAccCheckProxyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProxyConfig_tags1(rName, "key1", "value1"), + Config: testAccProxyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProxyExists(ctx, resourceName, &dbProxy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -476,20 +476,20 @@ func TestAccRDSProxy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProxyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProxyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProxyExists(ctx, resourceName, &dbProxy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProxyConfig_tags1(rName, "key2", "value2"), + Config: testAccProxyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProxyExists(ctx, resourceName, &dbProxy), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/snapshot_copy_test.go b/internal/service/rds/snapshot_copy_test.go index 114237780c9..11b265db372 100644 --- a/internal/service/rds/snapshot_copy_test.go +++ b/internal/service/rds/snapshot_copy_test.go @@ -67,11 +67,11 @@ func TestAccRDSSnapshotCopy_tags(t *testing.T) { CheckDestroy: testAccCheckSnapshotCopyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSnapshotCopyConfig_tags1(rName, "key1", "value1"), + Config: testAccSnapshotCopyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDBSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -80,20 +80,20 @@ func TestAccRDSSnapshotCopy_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSnapshotCopyConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSnapshotCopyConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDBSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSnapshotCopyConfig_tags1(rName, "key2", "value2"), + Config: testAccSnapshotCopyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDBSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/snapshot_test.go b/internal/service/rds/snapshot_test.go index bc538cdb62c..109aa353d10 100644 --- a/internal/service/rds/snapshot_test.go +++ b/internal/service/rds/snapshot_test.go @@ -111,11 +111,11 @@ func TestAccRDSSnapshot_tags(t *testing.T) { CheckDestroy: testAccCheckDBSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSnapshotConfig_tags1(rName, "key1", "value1"), + Config: testAccSnapshotConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDBSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -124,20 +124,20 @@ func TestAccRDSSnapshot_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSnapshotConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSnapshotConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDBSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSnapshotConfig_tags1(rName, "key2", "value2"), + Config: testAccSnapshotConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDBSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rds/subnet_group_test.go b/internal/service/rds/subnet_group_test.go index 327567f4c5d..b767a382adf 100644 --- a/internal/service/rds/subnet_group_test.go +++ b/internal/service/rds/subnet_group_test.go @@ -151,11 +151,11 @@ func TestAccRDSSubnetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckSubnetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSubnetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -164,20 +164,20 @@ func TestAccRDSSubnetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSubnetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSubnetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 227292da083e0f2e45a8ab784ee13a8135e24621 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:52 -0400 Subject: [PATCH 137/180] redshift: Use constants for test strings --- internal/service/redshift/cluster_snapshot_test.go | 12 ++++++------ internal/service/redshift/cluster_test.go | 12 ++++++------ internal/service/redshift/event_subscription_test.go | 12 ++++++------ .../service/redshift/hsm_client_certificate_test.go | 12 ++++++------ internal/service/redshift/hsm_configuration_test.go | 12 ++++++------ internal/service/redshift/parameter_group_test.go | 12 ++++++------ .../service/redshift/snapshot_copy_grant_test.go | 12 ++++++------ internal/service/redshift/snapshot_schedule_test.go | 12 ++++++------ internal/service/redshift/subnet_group_test.go | 12 ++++++------ internal/service/redshift/usage_limit_test.go | 12 ++++++------ 10 files changed, 60 insertions(+), 60 deletions(-) diff --git a/internal/service/redshift/cluster_snapshot_test.go b/internal/service/redshift/cluster_snapshot_test.go index 7efc4654686..e1e3e85d33c 100644 --- a/internal/service/redshift/cluster_snapshot_test.go +++ b/internal/service/redshift/cluster_snapshot_test.go @@ -77,11 +77,11 @@ func TestAccRedshiftClusterSnapshot_tags(t *testing.T) { CheckDestroy: testAccCheckClusterSnapshotDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterSnapshotConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterSnapshotConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -90,20 +90,20 @@ func TestAccRedshiftClusterSnapshot_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccClusterSnapshotConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterSnapshotConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterSnapshotConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterSnapshotConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterSnapshotExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/cluster_test.go b/internal/service/redshift/cluster_test.go index fba4274ee4c..e319f8d33bc 100644 --- a/internal/service/redshift/cluster_test.go +++ b/internal/service/redshift/cluster_test.go @@ -480,11 +480,11 @@ func TestAccRedshiftCluster_tags(t *testing.T) { CheckDestroy: testAccCheckClusterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccClusterConfig_tags1(rName, "key1", "value1"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -499,20 +499,20 @@ func TestAccRedshiftCluster_tags(t *testing.T) { }, }, { - Config: testAccClusterConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccClusterConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccClusterConfig_tags1(rName, "key2", "value2"), + Config: testAccClusterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckClusterExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/event_subscription_test.go b/internal/service/redshift/event_subscription_test.go index 0ec8585f2c4..749c2677ed4 100644 --- a/internal/service/redshift/event_subscription_test.go +++ b/internal/service/redshift/event_subscription_test.go @@ -161,11 +161,11 @@ func TestAccRedshiftEventSubscription_tags(t *testing.T) { CheckDestroy: testAccCheckEventSubscriptionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEventSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -174,20 +174,20 @@ func TestAccRedshiftEventSubscription_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEventSubscriptionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEventSubscriptionConfig_tags1(rName, "key2", "value2"), + Config: testAccEventSubscriptionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEventSubscriptionExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/hsm_client_certificate_test.go b/internal/service/redshift/hsm_client_certificate_test.go index 1a8c4f29853..407ebdbe8d7 100644 --- a/internal/service/redshift/hsm_client_certificate_test.go +++ b/internal/service/redshift/hsm_client_certificate_test.go @@ -61,11 +61,11 @@ func TestAccRedshiftHSMClientCertificate_tags(t *testing.T) { CheckDestroy: testAccCheckHSMClientCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHSMClientCertificateConfig_tags1(rName, "key1", "value1"), + Config: testAccHSMClientCertificateConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckHSMClientCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -74,19 +74,19 @@ func TestAccRedshiftHSMClientCertificate_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccHSMClientCertificateConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccHSMClientCertificateConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHSMClientCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccHSMClientCertificateConfig_tags1(rName, "key2", "value2"), + Config: testAccHSMClientCertificateConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHSMClientCertificateExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/hsm_configuration_test.go b/internal/service/redshift/hsm_configuration_test.go index 08812ecb063..fefa48b7281 100644 --- a/internal/service/redshift/hsm_configuration_test.go +++ b/internal/service/redshift/hsm_configuration_test.go @@ -61,11 +61,11 @@ func TestAccRedshiftHSMConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckHSMConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHSMConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccHSMConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckHSMConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -75,19 +75,19 @@ func TestAccRedshiftHSMConfiguration_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"hsm_partition_password", "hsm_server_public_certificate"}, }, { - Config: testAccHSMConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccHSMConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHSMConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccHSMConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccHSMConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHSMConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/parameter_group_test.go b/internal/service/redshift/parameter_group_test.go index 9e7b25212dd..387028f099c 100644 --- a/internal/service/redshift/parameter_group_test.go +++ b/internal/service/redshift/parameter_group_test.go @@ -158,12 +158,12 @@ func TestAccRedshiftParameterGroup_tags(t *testing.T) { CheckDestroy: testAccCheckParameterGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccParameterGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, names.AttrDescription, "Test parameter group for terraform"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -172,20 +172,20 @@ func TestAccRedshiftParameterGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccParameterGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccParameterGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccParameterGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccParameterGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/snapshot_copy_grant_test.go b/internal/service/redshift/snapshot_copy_grant_test.go index d960ffacd86..ccc42e04b0b 100644 --- a/internal/service/redshift/snapshot_copy_grant_test.go +++ b/internal/service/redshift/snapshot_copy_grant_test.go @@ -82,11 +82,11 @@ func TestAccRedshiftSnapshotCopyGrant_tags(t *testing.T) { CheckDestroy: testAccCheckSnapshotCopyGrantDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSnapshotCopyGrantConfig_tags1(rName, "key1", "value1"), + Config: testAccSnapshotCopyGrantConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotCopyGrantExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -95,20 +95,20 @@ func TestAccRedshiftSnapshotCopyGrant_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSnapshotCopyGrantConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSnapshotCopyGrantConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotCopyGrantExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSnapshotCopyGrantConfig_tags1(rName, "key2", "value2"), + Config: testAccSnapshotCopyGrantConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotCopyGrantExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/snapshot_schedule_test.go b/internal/service/redshift/snapshot_schedule_test.go index e2a1be069f2..3b2cf989606 100644 --- a/internal/service/redshift/snapshot_schedule_test.go +++ b/internal/service/redshift/snapshot_schedule_test.go @@ -95,11 +95,11 @@ func TestAccRedshiftSnapshotSchedule_tags(t *testing.T) { CheckDestroy: testAccCheckSnapshotScheduleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSnapshotScheduleConfig_tags1(rName, "key1", "value1"), + Config: testAccSnapshotScheduleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotScheduleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -111,20 +111,20 @@ func TestAccRedshiftSnapshotSchedule_tags(t *testing.T) { }, }, { - Config: testAccSnapshotScheduleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSnapshotScheduleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotScheduleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSnapshotScheduleConfig_tags1(rName, "key2", "value2"), + Config: testAccSnapshotScheduleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSnapshotScheduleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/subnet_group_test.go b/internal/service/redshift/subnet_group_test.go index 3855665d37f..61cf7901cb1 100644 --- a/internal/service/redshift/subnet_group_test.go +++ b/internal/service/redshift/subnet_group_test.go @@ -155,11 +155,11 @@ func TestAccRedshiftSubnetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckSubnetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSubnetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -168,20 +168,20 @@ func TestAccRedshiftSubnetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubnetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSubnetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSubnetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccSubnetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshift/usage_limit_test.go b/internal/service/redshift/usage_limit_test.go index d30a9439c4c..871a7c44b04 100644 --- a/internal/service/redshift/usage_limit_test.go +++ b/internal/service/redshift/usage_limit_test.go @@ -76,11 +76,11 @@ func TestAccRedshiftUsageLimit_tags(t *testing.T) { CheckDestroy: testAccCheckUsageLimitDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUsageLimitConfig_tags1(rName, "key1", "value1"), + Config: testAccUsageLimitConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUsageLimitExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -89,19 +89,19 @@ func TestAccRedshiftUsageLimit_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccUsageLimitConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUsageLimitConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUsageLimitConfig_tags1(rName, "key2", "value2"), + Config: testAccUsageLimitConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUsageLimitExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 7424e4a7dc73cbd24a39677cbc8b082205513f1b Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:52 -0400 Subject: [PATCH 138/180] redshiftserverless: Use constants for test strings --- .../service/redshiftserverless/namespace_test.go | 12 ++++++------ .../service/redshiftserverless/workgroup_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/redshiftserverless/namespace_test.go b/internal/service/redshiftserverless/namespace_test.go index 2bc89ec15e3..49c222a94aa 100644 --- a/internal/service/redshiftserverless/namespace_test.go +++ b/internal/service/redshiftserverless/namespace_test.go @@ -138,11 +138,11 @@ func TestAccRedshiftServerlessNamespace_tags(t *testing.T) { CheckDestroy: testAccCheckNamespaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNamespaceConfig_tags1(rName, "key1", "value1"), + Config: testAccNamespaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -151,19 +151,19 @@ func TestAccRedshiftServerlessNamespace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNamespaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNamespaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNamespaceConfig_tags1(rName, "key2", "value2"), + Config: testAccNamespaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/redshiftserverless/workgroup_test.go b/internal/service/redshiftserverless/workgroup_test.go index 92359fd5bdd..b2ce4fb3835 100644 --- a/internal/service/redshiftserverless/workgroup_test.go +++ b/internal/service/redshiftserverless/workgroup_test.go @@ -237,11 +237,11 @@ func TestAccRedshiftServerlessWorkgroup_tags(t *testing.T) { CheckDestroy: testAccCheckWorkgroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkgroupConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkgroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkgroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -250,19 +250,19 @@ func TestAccRedshiftServerlessWorkgroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWorkgroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkgroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkgroupConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkgroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkgroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 458ad1d975ef5b9e2e7a3e5cd3da06ecf6e7480d Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:52 -0400 Subject: [PATCH 139/180] rekognition: Use constants for test strings --- internal/service/rekognition/collection_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/service/rekognition/collection_test.go b/internal/service/rekognition/collection_test.go index 43473e9e3cb..68df8b46807 100644 --- a/internal/service/rekognition/collection_test.go +++ b/internal/service/rekognition/collection_test.go @@ -123,7 +123,7 @@ func TestAccRekognitionCollection_tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckCollectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -131,8 +131,8 @@ func TestAccRekognitionCollection_tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckCollectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -140,7 +140,7 @@ func TestAccRekognitionCollection_tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckCollectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From be94c86e1805591c63481e3050718fc5b73a96b0 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:53 -0400 Subject: [PATCH 140/180] resourceexplorer2: Use constants for test strings --- internal/service/resourceexplorer2/index_test.go | 12 ++++++------ internal/service/resourceexplorer2/view_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/resourceexplorer2/index_test.go b/internal/service/resourceexplorer2/index_test.go index 2cd6c4fc63f..5a5a2f0f490 100644 --- a/internal/service/resourceexplorer2/index_test.go +++ b/internal/service/resourceexplorer2/index_test.go @@ -87,11 +87,11 @@ func testAccIndex_tags(t *testing.T) { CheckDestroy: testAccCheckIndexDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIndexConfig_tags1("key1", "value1"), + Config: testAccIndexConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,20 +100,20 @@ func testAccIndex_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIndexConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccIndexConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIndexConfig_tags1("key2", "value2"), + Config: testAccIndexConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/resourceexplorer2/view_test.go b/internal/service/resourceexplorer2/view_test.go index 7ba5cd202ef..644c21d88b9 100644 --- a/internal/service/resourceexplorer2/view_test.go +++ b/internal/service/resourceexplorer2/view_test.go @@ -196,11 +196,11 @@ func testAccView_tags(t *testing.T) { CheckDestroy: testAccCheckViewDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccViewConfig_tags1(rName, "key1", "value1"), + Config: testAccViewConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckViewExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -209,20 +209,20 @@ func testAccView_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccViewConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccViewConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccViewConfig_tags1(rName, "key2", "value2"), + Config: testAccViewConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckIndexExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 4f0e991f1fb961b010d966d6a3fbed41c923e683 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:53 -0400 Subject: [PATCH 141/180] resourcegroups: Use constants for test strings --- internal/service/resourcegroups/group_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/resourcegroups/group_test.go b/internal/service/resourcegroups/group_test.go index bf367ea84c7..5dff2ec6deb 100644 --- a/internal/service/resourcegroups/group_test.go +++ b/internal/service/resourcegroups/group_test.go @@ -113,11 +113,11 @@ func TestAccResourceGroupsGroup_tags(t *testing.T) { CheckDestroy: testAccCheckResourceGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGroupConfig_tags1(rName, desc1, testAccResourceGroupQueryConfig, "key1", "value1"), + Config: testAccGroupConfig_tags1(rName, desc1, testAccResourceGroupQueryConfig, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckResourceGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -126,20 +126,20 @@ func TestAccResourceGroupsGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGroupConfig_tags2(rName, desc1, testAccResourceGroupQueryConfig, "key1", "value1updated", "key2", "value2"), + Config: testAccGroupConfig_tags2(rName, desc1, testAccResourceGroupQueryConfig, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourceGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGroupConfig_tags1(rName, desc1, testAccResourceGroupQueryConfig, "key2", "value2"), + Config: testAccGroupConfig_tags1(rName, desc1, testAccResourceGroupQueryConfig, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourceGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 50d8fba336c1315253525f4c4c428c3c2eb97e87 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:53 -0400 Subject: [PATCH 142/180] rolesanywhere: Use constants for test strings --- internal/service/rolesanywhere/profile_test.go | 12 ++++++------ internal/service/rolesanywhere/trust_anchor_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/rolesanywhere/profile_test.go b/internal/service/rolesanywhere/profile_test.go index 8b79397252a..b9712e61dd1 100644 --- a/internal/service/rolesanywhere/profile_test.go +++ b/internal/service/rolesanywhere/profile_test.go @@ -62,11 +62,11 @@ func TestAccRolesAnywhereProfile_tags(t *testing.T) { CheckDestroy: testAccCheckProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProfileConfig_tags1(rName, roleName, "key1", "value1"), + Config: testAccProfileConfig_tags1(rName, roleName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProfileExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -75,20 +75,20 @@ func TestAccRolesAnywhereProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProfileConfig_tags2(rName, roleName, "key1", "value1updated", "key2", "value2"), + Config: testAccProfileConfig_tags2(rName, roleName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProfileExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProfileConfig_tags1(rName, roleName, "key2", "value2"), + Config: testAccProfileConfig_tags1(rName, roleName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProfileExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/rolesanywhere/trust_anchor_test.go b/internal/service/rolesanywhere/trust_anchor_test.go index c69dddf8ed1..40577ebb2fb 100644 --- a/internal/service/rolesanywhere/trust_anchor_test.go +++ b/internal/service/rolesanywhere/trust_anchor_test.go @@ -65,11 +65,11 @@ func TestAccRolesAnywhereTrustAnchor_tags(t *testing.T) { CheckDestroy: testAccCheckTrustAnchorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTrustAnchorConfig_tags1(rName, caCommonName, "key1", "value1"), + Config: testAccTrustAnchorConfig_tags1(rName, caCommonName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrustAnchorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -78,20 +78,20 @@ func TestAccRolesAnywhereTrustAnchor_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTrustAnchorConfig_tags2(rName, caCommonName, "key1", "value1updated", "key2", "value2"), + Config: testAccTrustAnchorConfig_tags2(rName, caCommonName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrustAnchorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTrustAnchorConfig_tags1(rName, caCommonName, "key2", "value2"), + Config: testAccTrustAnchorConfig_tags1(rName, caCommonName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrustAnchorExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 2c6e6f0e167575074a26688ce22f4936a8111881 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:53 -0400 Subject: [PATCH 143/180] route53: Use constants for test strings --- internal/service/route53/health_check_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/route53/health_check_test.go b/internal/service/route53/health_check_test.go index 28fd2e0bbfa..079f0b11824 100644 --- a/internal/service/route53/health_check_test.go +++ b/internal/service/route53/health_check_test.go @@ -75,11 +75,11 @@ func TestAccRoute53HealthCheck_tags(t *testing.T) { CheckDestroy: testAccCheckHealthCheckDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHealthCheckConfig_tags1("key1", "value1"), + Config: testAccHealthCheckConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckHealthCheckExists(ctx, resourceName, &check), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -88,20 +88,20 @@ func TestAccRoute53HealthCheck_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccHealthCheckConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccHealthCheckConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHealthCheckExists(ctx, resourceName, &check), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccHealthCheckConfig_tags1("key2", "value2"), + Config: testAccHealthCheckConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHealthCheckExists(ctx, resourceName, &check), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 096cc2621dc2a53bb4b139dc73eed277d966dc38 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:53 -0400 Subject: [PATCH 144/180] route53domains: Use constants for test strings --- .../service/route53domains/registered_domain_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/route53domains/registered_domain_test.go b/internal/service/route53domains/registered_domain_test.go index 76bfa12dda4..dde60ec2d35 100644 --- a/internal/service/route53domains/registered_domain_test.go +++ b/internal/service/route53domains/registered_domain_test.go @@ -24,10 +24,10 @@ func testAccRegisteredDomain_tags(t *testing.T) { CheckDestroy: acctest.CheckDestroyNoop, Steps: []resource.TestStep{ { - Config: testAccRegisteredDomainConfig_tags1(domainName, "key1", "value1"), + Config: testAccRegisteredDomainConfig_tags1(domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -36,18 +36,18 @@ func testAccRegisteredDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRegisteredDomainConfig_tags2(domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccRegisteredDomainConfig_tags2(domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRegisteredDomainConfig_tags1(domainName, "key2", "value2"), + Config: testAccRegisteredDomainConfig_tags1(domainName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 93ce8fa024166623d22fefe87e6f6e241de45d0f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:53 -0400 Subject: [PATCH 145/180] route53recoveryreadiness: Use constants for test strings --- .../service/route53recoveryreadiness/cell_test.go | 12 ++++++------ .../route53recoveryreadiness/readiness_check_test.go | 12 ++++++------ .../route53recoveryreadiness/recovery_group_test.go | 12 ++++++------ .../route53recoveryreadiness/resource_set_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/route53recoveryreadiness/cell_test.go b/internal/service/route53recoveryreadiness/cell_test.go index d9ab55eac8d..a44437ff288 100644 --- a/internal/service/route53recoveryreadiness/cell_test.go +++ b/internal/service/route53recoveryreadiness/cell_test.go @@ -137,11 +137,11 @@ func TestAccRoute53RecoveryReadinessCell_tags(t *testing.T) { CheckDestroy: testAccCheckCellDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCellConfig_tags1(rName, "key1", "value1"), + Config: testAccCellConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCellExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -150,20 +150,20 @@ func TestAccRoute53RecoveryReadinessCell_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCellConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCellConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCellExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCellConfig_tags1(rName, "key2", "value2"), + Config: testAccCellConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCellExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53recoveryreadiness/readiness_check_test.go b/internal/service/route53recoveryreadiness/readiness_check_test.go index f9e9f8cfc35..3617ef4d2fd 100644 --- a/internal/service/route53recoveryreadiness/readiness_check_test.go +++ b/internal/service/route53recoveryreadiness/readiness_check_test.go @@ -108,11 +108,11 @@ func TestAccRoute53RecoveryReadinessReadinessCheck_tags(t *testing.T) { CheckDestroy: testAccCheckReadinessCheckDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReadinessCheckConfig_tags1(rName, cwArn, "key1", "value1"), + Config: testAccReadinessCheckConfig_tags1(rName, cwArn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckReadinessCheckExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -121,20 +121,20 @@ func TestAccRoute53RecoveryReadinessReadinessCheck_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccReadinessCheckConfig_tags2(rName, cwArn, "key1", "value1updated", "key2", "value2"), + Config: testAccReadinessCheckConfig_tags2(rName, cwArn, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReadinessCheckExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccReadinessCheckConfig_tags1(rName, cwArn, "key2", "value2"), + Config: testAccReadinessCheckConfig_tags1(rName, cwArn, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckReadinessCheckExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53recoveryreadiness/recovery_group_test.go b/internal/service/route53recoveryreadiness/recovery_group_test.go index 3d963058b03..1df61bb672b 100644 --- a/internal/service/route53recoveryreadiness/recovery_group_test.go +++ b/internal/service/route53recoveryreadiness/recovery_group_test.go @@ -111,11 +111,11 @@ func TestAccRoute53RecoveryReadinessRecoveryGroup_tags(t *testing.T) { CheckDestroy: testAccCheckRecoveryGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRecoveryGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccRecoveryGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRecoveryGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -124,20 +124,20 @@ func TestAccRoute53RecoveryReadinessRecoveryGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRecoveryGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRecoveryGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRecoveryGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRecoveryGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccRecoveryGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRecoveryGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53recoveryreadiness/resource_set_test.go b/internal/service/route53recoveryreadiness/resource_set_test.go index 45d4821e715..a7f161e3fe0 100644 --- a/internal/service/route53recoveryreadiness/resource_set_test.go +++ b/internal/service/route53recoveryreadiness/resource_set_test.go @@ -107,11 +107,11 @@ func TestAccRoute53RecoveryReadinessResourceSet_tags(t *testing.T) { CheckDestroy: testAccCheckResourceSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccResourceSetConfig_tags1(rName, cwArn, "key1", "value1"), + Config: testAccResourceSetConfig_tags1(rName, cwArn, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckResourceSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -120,20 +120,20 @@ func TestAccRoute53RecoveryReadinessResourceSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccResourceSetConfig_tags2(rName, cwArn, "key1", "value1updated", "key2", "value2"), + Config: testAccResourceSetConfig_tags2(rName, cwArn, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourceSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccResourceSetConfig_tags1(rName, cwArn, "key2", "value2"), + Config: testAccResourceSetConfig_tags1(rName, cwArn, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckResourceSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 5a20b7317bd69b414f2b7db832cdc1a81cf9515c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:54 -0400 Subject: [PATCH 146/180] route53resolver: Use constants for test strings --- internal/service/route53resolver/endpoint_test.go | 12 ++++++------ .../route53resolver/firewall_domain_list_test.go | 12 ++++++------ .../firewall_rule_group_association_test.go | 12 ++++++------ .../route53resolver/firewall_rule_group_test.go | 12 ++++++------ .../query_log_config_data_source_test.go | 4 ++-- .../service/route53resolver/query_log_config_test.go | 12 ++++++------ internal/service/route53resolver/rule_test.go | 12 ++++++------ 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/internal/service/route53resolver/endpoint_test.go b/internal/service/route53resolver/endpoint_test.go index 2c0ddd4102b..4ef9aedf6e1 100644 --- a/internal/service/route53resolver/endpoint_test.go +++ b/internal/service/route53resolver/endpoint_test.go @@ -93,11 +93,11 @@ func TestAccRoute53ResolverEndpoint_tags(t *testing.T) { CheckDestroy: testAccCheckEndpointDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEndpointConfig_tags1(rName, "key1", "value1"), + Config: testAccEndpointConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEndpointExists(ctx, resourceName, &ep), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccRoute53ResolverEndpoint_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEndpointConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEndpointConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEndpointExists(ctx, resourceName, &ep), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEndpointConfig_tags1(rName, "key2", "value2"), + Config: testAccEndpointConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEndpointExists(ctx, resourceName, &ep), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53resolver/firewall_domain_list_test.go b/internal/service/route53resolver/firewall_domain_list_test.go index 964a9718988..67c04bcfd47 100644 --- a/internal/service/route53resolver/firewall_domain_list_test.go +++ b/internal/service/route53resolver/firewall_domain_list_test.go @@ -136,12 +136,12 @@ func TestAccRoute53ResolverFirewallDomainList_tags(t *testing.T) { CheckDestroy: testAccCheckFirewallDomainListDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFirewallDomainListConfig_tags1(rName, "key1", "value1"), + Config: testAccFirewallDomainListConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallDomainListExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -150,22 +150,22 @@ func TestAccRoute53ResolverFirewallDomainList_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFirewallDomainListConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFirewallDomainListConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallDomainListExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFirewallDomainListConfig_tags1(rName, "key2", "value2"), + Config: testAccFirewallDomainListConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallDomainListExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53resolver/firewall_rule_group_association_test.go b/internal/service/route53resolver/firewall_rule_group_association_test.go index 258c2fac89e..b81e7ea2d6e 100644 --- a/internal/service/route53resolver/firewall_rule_group_association_test.go +++ b/internal/service/route53resolver/firewall_rule_group_association_test.go @@ -195,11 +195,11 @@ func TestAccRoute53ResolverFirewallRuleGroupAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckFirewallRuleGroupAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFirewallRuleGroupAssociationConfig_tags1(rName, "key1", "value1"), + Config: testAccFirewallRuleGroupAssociationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallRuleGroupAssociationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -208,20 +208,20 @@ func TestAccRoute53ResolverFirewallRuleGroupAssociation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFirewallRuleGroupAssociationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFirewallRuleGroupAssociationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallRuleGroupAssociationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFirewallRuleGroupAssociationConfig_tags1(rName, "key2", "value2"), + Config: testAccFirewallRuleGroupAssociationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallRuleGroupAssociationExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53resolver/firewall_rule_group_test.go b/internal/service/route53resolver/firewall_rule_group_test.go index ec757ad743b..cb15b17b56a 100644 --- a/internal/service/route53resolver/firewall_rule_group_test.go +++ b/internal/service/route53resolver/firewall_rule_group_test.go @@ -88,7 +88,7 @@ func TestAccRoute53ResolverFirewallRuleGroup_tags(t *testing.T) { CheckDestroy: testAccCheckFirewallRuleGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFirewallRuleGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccFirewallRuleGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallRuleGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttrSet(resourceName, names.AttrID), @@ -96,7 +96,7 @@ func TestAccRoute53ResolverFirewallRuleGroup_tags(t *testing.T) { acctest.CheckResourceAttrAccountID(resourceName, names.AttrOwnerID), resource.TestCheckResourceAttr(resourceName, "share_status", "NOT_SHARED"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -105,7 +105,7 @@ func TestAccRoute53ResolverFirewallRuleGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFirewallRuleGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFirewallRuleGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallRuleGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttrSet(resourceName, names.AttrID), @@ -114,11 +114,11 @@ func TestAccRoute53ResolverFirewallRuleGroup_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "share_status", "NOT_SHARED"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFirewallRuleGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccFirewallRuleGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFirewallRuleGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttrSet(resourceName, names.AttrID), @@ -126,7 +126,7 @@ func TestAccRoute53ResolverFirewallRuleGroup_tags(t *testing.T) { acctest.CheckResourceAttrAccountID(resourceName, names.AttrOwnerID), resource.TestCheckResourceAttr(resourceName, "share_status", "NOT_SHARED"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53resolver/query_log_config_data_source_test.go b/internal/service/route53resolver/query_log_config_data_source_test.go index 506e46007bf..e0c8f27579c 100644 --- a/internal/service/route53resolver/query_log_config_data_source_test.go +++ b/internal/service/route53resolver/query_log_config_data_source_test.go @@ -30,7 +30,7 @@ func TestAccRoute53ResolverQueryLogConfigDataSource_basic(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccQueryLogConfigDataSourceConfig_basic(rName, "key1", "value1"), + Config: testAccQueryLogConfigDataSourceConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, names.AttrARN, resourceName, names.AttrARN), resource.TestCheckResourceAttrPair(dataSourceName, names.AttrDestinationARN, resourceName, names.AttrDestinationARN), @@ -63,7 +63,7 @@ func TestAccRoute53ResolverQueryLogConfigDataSource_filter(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccQueryLogConfigDataSourceConfig_filter(rName, "key1", "value1"), + Config: testAccQueryLogConfigDataSourceConfig_filter(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, names.AttrARN, resourceName, names.AttrARN), resource.TestCheckResourceAttrPair(dataSourceName, names.AttrDestinationARN, resourceName, names.AttrDestinationARN), diff --git a/internal/service/route53resolver/query_log_config_test.go b/internal/service/route53resolver/query_log_config_test.go index 4c3561aba37..4ec51882ccb 100644 --- a/internal/service/route53resolver/query_log_config_test.go +++ b/internal/service/route53resolver/query_log_config_test.go @@ -90,7 +90,7 @@ func TestAccRoute53ResolverQueryLogConfig_tags(t *testing.T) { CheckDestroy: testAccCheckQueryLogConfigDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccQueryLogConfigConfig_tags1(rName, "key1", "value1"), + Config: testAccQueryLogConfigConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckQueryLogConfigExists(ctx, resourceName, &v), resource.TestCheckResourceAttrPair(resourceName, names.AttrDestinationARN, cwLogGroupResourceName, names.AttrARN), @@ -98,7 +98,7 @@ func TestAccRoute53ResolverQueryLogConfig_tags(t *testing.T) { acctest.CheckResourceAttrAccountID(resourceName, names.AttrOwnerID), resource.TestCheckResourceAttr(resourceName, "share_status", "NOT_SHARED"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -107,7 +107,7 @@ func TestAccRoute53ResolverQueryLogConfig_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccQueryLogConfigConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccQueryLogConfigConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQueryLogConfigExists(ctx, resourceName, &v), resource.TestCheckResourceAttrPair(resourceName, names.AttrDestinationARN, cwLogGroupResourceName, names.AttrARN), @@ -116,11 +116,11 @@ func TestAccRoute53ResolverQueryLogConfig_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "share_status", "NOT_SHARED"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccQueryLogConfigConfig_tags1(rName, "key2", "value2"), + Config: testAccQueryLogConfigConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQueryLogConfigExists(ctx, resourceName, &v), resource.TestCheckResourceAttrPair(resourceName, names.AttrDestinationARN, cwLogGroupResourceName, names.AttrARN), @@ -128,7 +128,7 @@ func TestAccRoute53ResolverQueryLogConfig_tags(t *testing.T) { acctest.CheckResourceAttrAccountID(resourceName, names.AttrOwnerID), resource.TestCheckResourceAttr(resourceName, "share_status", "NOT_SHARED"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/route53resolver/rule_test.go b/internal/service/route53resolver/rule_test.go index 9cb24187abd..81ed587cf81 100644 --- a/internal/service/route53resolver/rule_test.go +++ b/internal/service/route53resolver/rule_test.go @@ -93,11 +93,11 @@ func TestAccRoute53ResolverRule_tags(t *testing.T) { CheckDestroy: testAccCheckRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleConfig_tags1(domainName, "key1", "value1"), + Config: testAccRuleConfig_tags1(domainName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -106,20 +106,20 @@ func TestAccRoute53ResolverRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRuleConfig_tags2(domainName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleConfig_tags2(domainName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleConfig_tags1(domainName, "key2", "value2"), + Config: testAccRuleConfig_tags1(domainName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 6f38dc753e8948d1c9071fc3765156caa01d09e5 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:54 -0400 Subject: [PATCH 147/180] rum: Use constants for test strings --- internal/service/rum/app_monitor_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/rum/app_monitor_test.go b/internal/service/rum/app_monitor_test.go index b2ab07f60c8..f6b9c3d458e 100644 --- a/internal/service/rum/app_monitor_test.go +++ b/internal/service/rum/app_monitor_test.go @@ -129,11 +129,11 @@ func TestAccRUMAppMonitor_tags(t *testing.T) { CheckDestroy: testAccCheckAppMonitorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAppMonitorConfig_tags1(rName, "key1", "value1"), + Config: testAccAppMonitorConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAppMonitorExists(ctx, resourceName, &appMon), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -142,20 +142,20 @@ func TestAccRUMAppMonitor_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAppMonitorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAppMonitorConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppMonitorExists(ctx, resourceName, &appMon), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAppMonitorConfig_tags1(rName, "key2", "value2"), + Config: testAccAppMonitorConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppMonitorExists(ctx, resourceName, &appMon), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From c5554de75c860f86e6b12c87b10ecd63a8f2f56a Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:54 -0400 Subject: [PATCH 148/180] s3: Use constants for test strings --- .../s3/bucket_lifecycle_configuration_test.go | 6 ++-- internal/service/s3/bucket_object_test.go | 24 ++++++++-------- internal/service/s3/bucket_test.go | 16 +++++------ internal/service/s3/object_copy_test.go | 28 +++++++++---------- .../service/s3/object_data_source_test.go | 8 +++--- internal/service/s3/object_test.go | 24 ++++++++-------- 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/internal/service/s3/bucket_lifecycle_configuration_test.go b/internal/service/s3/bucket_lifecycle_configuration_test.go index 397243266cc..88ee6f2e52b 100644 --- a/internal/service/s3/bucket_lifecycle_configuration_test.go +++ b/internal/service/s3/bucket_lifecycle_configuration_test.go @@ -572,7 +572,7 @@ func TestAccS3BucketLifecycleConfiguration_Filter_Tag(t *testing.T) { CheckDestroy: testAccCheckBucketLifecycleConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketLifecycleConfigurationConfig_filterTag(rName, "key1", "value1"), + Config: testAccBucketLifecycleConfigurationConfig_filterTag(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketLifecycleConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "rule.#", acctest.CtOne), @@ -582,8 +582,8 @@ func TestAccS3BucketLifecycleConfiguration_Filter_Tag(t *testing.T) { names.AttrID: rName, "filter.#": acctest.CtOne, "filter.0.tag.#": acctest.CtOne, - "filter.0.tag.0.key": "key1", - "filter.0.tag.0.value": "value1", + "filter.0.tag.0.key": acctest.CtKey1, + "filter.0.tag.0.value": acctest.CtValue1, names.AttrStatus: tfs3.LifecycleRuleStatusEnabled, }), ), diff --git a/internal/service/s3/bucket_object_test.go b/internal/service/s3/bucket_object_test.go index ededc26b8be..ce477f6d0d7 100644 --- a/internal/service/s3/bucket_object_test.go +++ b/internal/service/s3/bucket_object_test.go @@ -669,16 +669,16 @@ func TestAccS3BucketObject_metadata(t *testing.T) { CheckDestroy: testAccCheckBucketObjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketObjectConfig_metadata(rName, "key1", "value1", "key2", "value2"), + Config: testAccBucketObjectConfig_metadata(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, "metadata.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "metadata.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "metadata.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "metadata.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "metadata.key2", acctest.CtValue2), ), }, { - Config: testAccBucketObjectConfig_metadata(rName, "key1", "value1updated", "key3", "value3"), + Config: testAccBucketObjectConfig_metadata(rName, acctest.CtKey1, "value1updated", "key3", "value3"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, "metadata.%", acctest.CtTwo), @@ -1060,7 +1060,7 @@ func TestAccS3BucketObject_tags_EmptyTag_OnCreate(t *testing.T) { CheckDestroy: testAccCheckBucketObjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketObjectConfig_tags1(rName, key, "key1", ""), + Config: testAccBucketObjectConfig_tags1(rName, key, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -1092,19 +1092,19 @@ func TestAccS3BucketObject_tags_EmptyTag_OnUpdate_Add(t *testing.T) { CheckDestroy: testAccCheckBucketObjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketObjectConfig_tags1(rName, key, "key1", "value1"), + Config: testAccBucketObjectConfig_tags1(rName, key, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccBucketObjectConfig_tags2(rName, key, "key1", "value1", "key2", ""), + Config: testAccBucketObjectConfig_tags2(rName, key, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -1133,15 +1133,15 @@ func TestAccS3BucketObject_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { CheckDestroy: testAccCheckBucketObjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketObjectConfig_tags1(rName, key, "key1", "value1"), + Config: testAccBucketObjectConfig_tags1(rName, key, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccBucketObjectConfig_tags1(rName, key, "key1", ""), + Config: testAccBucketObjectConfig_tags1(rName, key, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), diff --git a/internal/service/s3/bucket_test.go b/internal/service/s3/bucket_test.go index bf02643848e..2f757c59a4f 100644 --- a/internal/service/s3/bucket_test.go +++ b/internal/service/s3/bucket_test.go @@ -585,7 +585,7 @@ func TestAccS3Bucket_Tags_EmptyTag_OnCreate(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketConfig_tags1(bucketName, "key1", ""), + Config: testAccBucketConfig_tags1(bucketName, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -614,19 +614,19 @@ func TestAccS3Bucket_Tags_EmptyTag_OnUpdate_Add(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketConfig_tags1(bucketName, "key1", "value1"), + Config: testAccBucketConfig_tags1(bucketName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccBucketConfig_tags2(bucketName, "key1", "value1", "key2", ""), + Config: testAccBucketConfig_tags2(bucketName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -652,15 +652,15 @@ func TestAccS3Bucket_Tags_EmptyTag_OnUpdate_Replace(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketConfig_tags1(bucketName, "key1", "value1"), + Config: testAccBucketConfig_tags1(bucketName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccBucketConfig_tags1(bucketName, "key1", ""), + Config: testAccBucketConfig_tags1(bucketName, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), diff --git a/internal/service/s3/object_copy_test.go b/internal/service/s3/object_copy_test.go index fa3e896e366..bd39d633b73 100644 --- a/internal/service/s3/object_copy_test.go +++ b/internal/service/s3/object_copy_test.go @@ -131,31 +131,31 @@ func TestAccS3ObjectCopy_tags(t *testing.T) { CheckDestroy: testAccCheckObjectCopyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", "value1"), + Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "tagging_directive", "REPLACE"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccObjectCopyConfig_tags2(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", "value1updated", "key2", "value2"), + Config: testAccObjectCopyConfig_tags2(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "tagging_directive", "REPLACE"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, "key2", "value2"), + Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "tagging_directive", "REPLACE"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -175,7 +175,7 @@ func TestAccS3ObjectCopy_tags_EmptyTag_OnCreate(t *testing.T) { CheckDestroy: testAccCheckObjectCopyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", ""), + Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -199,19 +199,19 @@ func TestAccS3ObjectCopy_tags_EmptyTag_OnUpdate_Add(t *testing.T) { CheckDestroy: testAccCheckObjectCopyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", "value1"), + Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccObjectCopyConfig_tags2(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", "value1", "key2", ""), + Config: testAccObjectCopyConfig_tags2(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -232,15 +232,15 @@ func TestAccS3ObjectCopy_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { CheckDestroy: testAccCheckObjectCopyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", "value1"), + Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, "key1", ""), + Config: testAccObjectCopyConfig_tags1(rName1, names.AttrSource, rName2, names.AttrTarget, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectCopyExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), diff --git a/internal/service/s3/object_data_source_test.go b/internal/service/s3/object_data_source_test.go index 8b71aca3e46..843ab55f8ac 100644 --- a/internal/service/s3/object_data_source_test.go +++ b/internal/service/s3/object_data_source_test.go @@ -502,7 +502,7 @@ func TestAccS3ObjectDataSource_metadata(t *testing.T) { Config: testAccObjectDataSourceConfig_metadata(rName), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(dataSourceName, "metadata.%", acctest.CtTwo), - resource.TestCheckResourceAttr(dataSourceName, "metadata.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "metadata.key1", acctest.CtValue1), resource.TestCheckResourceAttr(dataSourceName, "metadata.key2", "Value2"), ), }, @@ -527,8 +527,8 @@ func TestAccS3ObjectDataSource_metadataUppercaseKey(t *testing.T) { Config: testAccObjectDataSourceConfig_metadataBucketOnly(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckBucketAddObjectWithMetadata(ctx, bucketResourceName, key, map[string]string{ - "key1": "value1", - "Key2": "Value2", + acctest.CtKey1: acctest.CtValue1, + "Key2": "Value2", }), ), }, @@ -536,7 +536,7 @@ func TestAccS3ObjectDataSource_metadataUppercaseKey(t *testing.T) { Config: testAccObjectDataSourceConfig_metadataBucketAndDS(rName, key), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(dataSourceName, "metadata.%", acctest.CtTwo), - resource.TestCheckResourceAttr(dataSourceName, "metadata.key1", "value1"), + resource.TestCheckResourceAttr(dataSourceName, "metadata.key1", acctest.CtValue1), // https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3#HeadObjectOutput // Map keys will be normalized to lower-case. resource.TestCheckResourceAttr(dataSourceName, "metadata.key2", "Value2"), diff --git a/internal/service/s3/object_test.go b/internal/service/s3/object_test.go index 561bc1f026d..9a09925bffb 100644 --- a/internal/service/s3/object_test.go +++ b/internal/service/s3/object_test.go @@ -800,16 +800,16 @@ func TestAccS3Object_metadata(t *testing.T) { CheckDestroy: testAccCheckObjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectConfig_metadata(rName, "key1", "value1", "key2", "value2"), + Config: testAccObjectConfig_metadata(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, "metadata.%", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "metadata.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "metadata.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "metadata.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "metadata.key2", acctest.CtValue2), ), }, { - Config: testAccObjectConfig_metadata(rName, "key1", "value1updated", "key3", "value3"), + Config: testAccObjectConfig_metadata(rName, acctest.CtKey1, "value1updated", "key3", "value3"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, "metadata.%", acctest.CtTwo), @@ -1174,7 +1174,7 @@ func TestAccS3Object_tags_EmptyTag_OnCreate(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectConfig_tags1(rName, key, "key1", ""), + Config: testAccObjectConfig_tags1(rName, key, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), @@ -1206,19 +1206,19 @@ func TestAccS3Object_tags_EmptyTag_OnUpdate_Add(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectConfig_tags1(rName, key, "key1", "value1"), + Config: testAccObjectConfig_tags1(rName, key, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccObjectConfig_tags2(rName, key, "key1", "value1", "key2", ""), + Config: testAccObjectConfig_tags2(rName, key, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -1247,15 +1247,15 @@ func TestAccS3Object_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccObjectConfig_tags1(rName, key, "key1", "value1"), + Config: testAccObjectConfig_tags1(rName, key, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccObjectConfig_tags1(rName, key, "key1", ""), + Config: testAccObjectConfig_tags1(rName, key, acctest.CtKey1, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckObjectExists(ctx, resourceName, &obj), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), From 16e76e6c90e25ff9d340fdf8892e90aa374fd1e4 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:54 -0400 Subject: [PATCH 149/180] s3control: Use constants for test strings --- internal/service/s3control/access_grant_test.go | 12 ++++++------ .../service/s3control/access_grants_instance_test.go | 12 ++++++------ .../service/s3control/access_grants_location_test.go | 12 ++++++------ .../s3control/bucket_lifecycle_configuration_test.go | 8 ++++---- internal/service/s3control/bucket_test.go | 12 ++++++------ .../s3control/storage_lens_configuration_test.go | 12 ++++++------ 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/internal/service/s3control/access_grant_test.go b/internal/service/s3control/access_grant_test.go index 1ee1b0da768..a3f449eb30d 100644 --- a/internal/service/s3control/access_grant_test.go +++ b/internal/service/s3control/access_grant_test.go @@ -88,11 +88,11 @@ func testAccAccessGrant_tags(t *testing.T) { CheckDestroy: testAccCheckAccessGrantDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccessGrantConfig_tags1(rName, "key1", "value1"), + Config: testAccAccessGrantConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -101,20 +101,20 @@ func testAccAccessGrant_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAccessGrantConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAccessGrantConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsLocationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccessGrantConfig_tags1(rName, "key2", "value2"), + Config: testAccAccessGrantConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsLocationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/s3control/access_grants_instance_test.go b/internal/service/s3control/access_grants_instance_test.go index 3c546c428fa..cf6fa7a9051 100644 --- a/internal/service/s3control/access_grants_instance_test.go +++ b/internal/service/s3control/access_grants_instance_test.go @@ -81,11 +81,11 @@ func testAccAccessGrantsInstance_tags(t *testing.T) { CheckDestroy: testAccCheckAccessGrantsInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccessGrantsInstanceConfig_tags1("key1", "value1"), + Config: testAccAccessGrantsInstanceConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsInstanceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -94,20 +94,20 @@ func testAccAccessGrantsInstance_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAccessGrantsInstanceConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccAccessGrantsInstanceConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsInstanceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccessGrantsInstanceConfig_tags1("key2", "value2"), + Config: testAccAccessGrantsInstanceConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsInstanceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/s3control/access_grants_location_test.go b/internal/service/s3control/access_grants_location_test.go index db1196a4297..af9b83e3809 100644 --- a/internal/service/s3control/access_grants_location_test.go +++ b/internal/service/s3control/access_grants_location_test.go @@ -84,11 +84,11 @@ func testAccAccessGrantsLocation_tags(t *testing.T) { CheckDestroy: testAccCheckAccessGrantsLocationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccessGrantsLocationConfig_tags1(rName, "key1", "value1"), + Config: testAccAccessGrantsLocationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsLocationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -97,20 +97,20 @@ func testAccAccessGrantsLocation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAccessGrantsLocationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAccessGrantsLocationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsLocationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccessGrantsLocationConfig_tags1(rName, "key2", "value2"), + Config: testAccAccessGrantsLocationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessGrantsLocationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/s3control/bucket_lifecycle_configuration_test.go b/internal/service/s3control/bucket_lifecycle_configuration_test.go index f4b780451ef..7c6906002b2 100644 --- a/internal/service/s3control/bucket_lifecycle_configuration_test.go +++ b/internal/service/s3control/bucket_lifecycle_configuration_test.go @@ -303,14 +303,14 @@ func TestAccS3ControlBucketLifecycleConfiguration_RuleFilter_tags(t *testing.T) CheckDestroy: testAccCheckBucketLifecycleConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketLifecycleConfigurationConfig_ruleFilterTags1(rName, "key1", "value1"), + Config: testAccBucketLifecycleConfigurationConfig_ruleFilterTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBucketLifecycleConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "rule.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "rule.*", map[string]string{ "filter.#": acctest.CtOne, "filter.0.tags.%": acctest.CtOne, - "filter.0.tags.key1": "value1", + "filter.0.tags.key1": acctest.CtValue1, }), ), }, @@ -336,14 +336,14 @@ func TestAccS3ControlBucketLifecycleConfiguration_RuleFilter_tags(t *testing.T) // ), // }, { - Config: testAccBucketLifecycleConfigurationConfig_ruleFilterTags1(rName, "key2", "value2"), + Config: testAccBucketLifecycleConfigurationConfig_ruleFilterTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBucketLifecycleConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "rule.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "rule.*", map[string]string{ "filter.#": acctest.CtOne, "filter.0.tags.%": acctest.CtOne, - "filter.0.tags.key2": "value2", + "filter.0.tags.key2": acctest.CtValue2, }), ), }, diff --git a/internal/service/s3control/bucket_test.go b/internal/service/s3control/bucket_test.go index 01c0697ad51..17b34262d80 100644 --- a/internal/service/s3control/bucket_test.go +++ b/internal/service/s3control/bucket_test.go @@ -89,11 +89,11 @@ func TestAccS3ControlBucket_tags(t *testing.T) { CheckDestroy: testAccCheckBucketDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccBucketConfig_tags1(rName, "key1", "value1"), + Config: testAccBucketConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func TestAccS3ControlBucket_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccBucketConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccBucketConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccBucketConfig_tags1(rName, "key2", "value2"), + Config: testAccBucketConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckBucketExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/s3control/storage_lens_configuration_test.go b/internal/service/s3control/storage_lens_configuration_test.go index a3a886f3409..19628e2cb63 100644 --- a/internal/service/s3control/storage_lens_configuration_test.go +++ b/internal/service/s3control/storage_lens_configuration_test.go @@ -99,11 +99,11 @@ func TestAccS3ControlStorageLensConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckStorageLensConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStorageLensConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccStorageLensConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStorageLensConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -112,20 +112,20 @@ func TestAccS3ControlStorageLensConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStorageLensConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStorageLensConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStorageLensConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStorageLensConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccStorageLensConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStorageLensConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 45b9d6c8980ed09f2cc534a4be032f2ed882bade Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:54 -0400 Subject: [PATCH 150/180] sagemaker: Use constants for test strings --- internal/service/sagemaker/app_image_config_test.go | 12 ++++++------ internal/service/sagemaker/app_test.go | 12 ++++++------ internal/service/sagemaker/code_repository_test.go | 12 ++++++------ .../sagemaker/data_quality_job_definition_test.go | 12 ++++++------ internal/service/sagemaker/device_fleet_test.go | 12 ++++++------ internal/service/sagemaker/domain_test.go | 12 ++++++------ .../service/sagemaker/endpoint_configuration_test.go | 12 ++++++------ internal/service/sagemaker/feature_group_test.go | 12 ++++++------ internal/service/sagemaker/flow_definition_test.go | 12 ++++++------ internal/service/sagemaker/human_task_ui_test.go | 12 ++++++------ internal/service/sagemaker/image_test.go | 12 ++++++------ .../service/sagemaker/model_package_group_test.go | 12 ++++++------ internal/service/sagemaker/model_test.go | 12 ++++++------ .../service/sagemaker/monitoring_schedule_test.go | 12 ++++++------ internal/service/sagemaker/notebook_instance_test.go | 12 ++++++------ internal/service/sagemaker/pipeline_test.go | 12 ++++++------ internal/service/sagemaker/project_test.go | 12 ++++++------ internal/service/sagemaker/space_test.go | 12 ++++++------ .../sagemaker/studio_lifecycle_config_test.go | 12 ++++++------ internal/service/sagemaker/user_profile_test.go | 12 ++++++------ internal/service/sagemaker/workteam_test.go | 12 ++++++------ 21 files changed, 126 insertions(+), 126 deletions(-) diff --git a/internal/service/sagemaker/app_image_config_test.go b/internal/service/sagemaker/app_image_config_test.go index a7c99245dfc..5e1a48b23c1 100644 --- a/internal/service/sagemaker/app_image_config_test.go +++ b/internal/service/sagemaker/app_image_config_test.go @@ -256,11 +256,11 @@ func TestAccSageMakerAppImageConfig_tags(t *testing.T) { CheckDestroy: testAccCheckAppDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAppImageConfigConfig_tags1(rName, "key1", "value1"), + Config: testAccAppImageConfigConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAppImageExistsConfig(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -269,20 +269,20 @@ func TestAccSageMakerAppImageConfig_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAppImageConfigConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAppImageConfigConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppImageExistsConfig(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAppImageConfigConfig_tags1(rName, "key2", "value2"), + Config: testAccAppImageConfigConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppImageExistsConfig(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/app_test.go b/internal/service/sagemaker/app_test.go index bd18b4e350d..a87d9013c34 100644 --- a/internal/service/sagemaker/app_test.go +++ b/internal/service/sagemaker/app_test.go @@ -181,11 +181,11 @@ func testAccApp_tags(t *testing.T) { CheckDestroy: testAccCheckAppDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAppConfig_tags1(rName, "key1", "value1"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -194,20 +194,20 @@ func testAccApp_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAppConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAppConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAppConfig_tags1(rName, "key2", "value2"), + Config: testAccAppConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAppExists(ctx, resourceName, &app), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/code_repository_test.go b/internal/service/sagemaker/code_repository_test.go index 3f78d741629..c0b7512885e 100644 --- a/internal/service/sagemaker/code_repository_test.go +++ b/internal/service/sagemaker/code_repository_test.go @@ -140,11 +140,11 @@ func TestAccSageMakerCodeRepository_tags(t *testing.T) { CheckDestroy: testAccCheckDeviceFleetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCodeRepositoryConfig_basicTags1(rName, "key1", "value1"), + Config: testAccCodeRepositoryConfig_basicTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCodeRepositoryExists(ctx, resourceName, &repo), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -153,20 +153,20 @@ func TestAccSageMakerCodeRepository_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCodeRepositoryConfig_basicTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCodeRepositoryConfig_basicTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCodeRepositoryExists(ctx, resourceName, &repo), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCodeRepositoryConfig_basicTags1(rName, "key2", "value2"), + Config: testAccCodeRepositoryConfig_basicTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCodeRepositoryExists(ctx, resourceName, &repo), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/data_quality_job_definition_test.go b/internal/service/sagemaker/data_quality_job_definition_test.go index 1cc86f0ea05..a686400637e 100644 --- a/internal/service/sagemaker/data_quality_job_definition_test.go +++ b/internal/service/sagemaker/data_quality_job_definition_test.go @@ -532,11 +532,11 @@ func TestAccSageMakerDataQualityJobDefinition_tags(t *testing.T) { CheckDestroy: testAccCheckDataQualityJobDefinitionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataQualityJobDefinitionConfig_tags1(rName, "key1", "value1"), + Config: testAccDataQualityJobDefinitionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataQualityJobDefinitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -545,20 +545,20 @@ func TestAccSageMakerDataQualityJobDefinition_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDataQualityJobDefinitionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDataQualityJobDefinitionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataQualityJobDefinitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataQualityJobDefinitionConfig_tags1(rName, "key2", "value2"), + Config: testAccDataQualityJobDefinitionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataQualityJobDefinitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/device_fleet_test.go b/internal/service/sagemaker/device_fleet_test.go index f88db4d149d..20555c539f1 100644 --- a/internal/service/sagemaker/device_fleet_test.go +++ b/internal/service/sagemaker/device_fleet_test.go @@ -103,11 +103,11 @@ func TestAccSageMakerDeviceFleet_tags(t *testing.T) { CheckDestroy: testAccCheckDeviceFleetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDeviceFleetConfig_tags1(rName, "key1", "value1"), + Config: testAccDeviceFleetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDeviceFleetExists(ctx, resourceName, &deviceFleet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -116,20 +116,20 @@ func TestAccSageMakerDeviceFleet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDeviceFleetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDeviceFleetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeviceFleetExists(ctx, resourceName, &deviceFleet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDeviceFleetConfig_tags1(rName, "key2", "value2"), + Config: testAccDeviceFleetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDeviceFleetExists(ctx, resourceName, &deviceFleet), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/domain_test.go b/internal/service/sagemaker/domain_test.go index 02f08f73555..c305dc852b1 100644 --- a/internal/service/sagemaker/domain_test.go +++ b/internal/service/sagemaker/domain_test.go @@ -143,11 +143,11 @@ func testAccDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -157,20 +157,20 @@ func testAccDomain_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"retention_policy"}, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags1(rName, "key2", "value2"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDomainExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/endpoint_configuration_test.go b/internal/service/sagemaker/endpoint_configuration_test.go index 93d9fa83bfa..9a03808e364 100644 --- a/internal/service/sagemaker/endpoint_configuration_test.go +++ b/internal/service/sagemaker/endpoint_configuration_test.go @@ -366,11 +366,11 @@ func TestAccSageMakerEndpointConfiguration_tags(t *testing.T) { CheckDestroy: testAccCheckEndpointConfigurationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEndpointConfigurationConfig_tags1(rName, "key1", "value1"), + Config: testAccEndpointConfigurationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEndpointConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -379,20 +379,20 @@ func TestAccSageMakerEndpointConfiguration_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEndpointConfigurationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEndpointConfigurationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEndpointConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEndpointConfigurationConfig_tags1(rName, "key2", "value2"), + Config: testAccEndpointConfigurationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEndpointConfigurationExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/feature_group_test.go b/internal/service/sagemaker/feature_group_test.go index 8d9e1ea0b0b..12338dcdf39 100644 --- a/internal/service/sagemaker/feature_group_test.go +++ b/internal/service/sagemaker/feature_group_test.go @@ -152,12 +152,12 @@ func testAccFeatureGroup_tags(t *testing.T) { CheckDestroy: testAccCheckFeatureGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFeatureGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccFeatureGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFeatureGroupExists(ctx, resourceName, &featureGroup), resource.TestCheckResourceAttr(resourceName, "feature_group_name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -166,22 +166,22 @@ func testAccFeatureGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFeatureGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFeatureGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFeatureGroupExists(ctx, resourceName, &featureGroup), resource.TestCheckResourceAttr(resourceName, "feature_group_name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFeatureGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccFeatureGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFeatureGroupExists(ctx, resourceName, &featureGroup), resource.TestCheckResourceAttr(resourceName, "feature_group_name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/flow_definition_test.go b/internal/service/sagemaker/flow_definition_test.go index add4606e693..5e9b849dc0c 100644 --- a/internal/service/sagemaker/flow_definition_test.go +++ b/internal/service/sagemaker/flow_definition_test.go @@ -141,11 +141,11 @@ func testAccFlowDefinition_tags(t *testing.T) { CheckDestroy: testAccCheckFlowDefinitionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFlowDefinitionConfig_tags1(rName, "key1", "value1"), + Config: testAccFlowDefinitionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFlowDefinitionExists(ctx, resourceName, &flowDefinition), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -154,20 +154,20 @@ func testAccFlowDefinition_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccFlowDefinitionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccFlowDefinitionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFlowDefinitionExists(ctx, resourceName, &flowDefinition), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFlowDefinitionConfig_tags1(rName, "key2", "value2"), + Config: testAccFlowDefinitionConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFlowDefinitionExists(ctx, resourceName, &flowDefinition), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/human_task_ui_test.go b/internal/service/sagemaker/human_task_ui_test.go index bf59173ea19..1bf95becd27 100644 --- a/internal/service/sagemaker/human_task_ui_test.go +++ b/internal/service/sagemaker/human_task_ui_test.go @@ -64,11 +64,11 @@ func TestAccSageMakerHumanTaskUI_tags(t *testing.T) { CheckDestroy: testAccCheckHumanTaskUIDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHumanTaskUIConfig_tags1(rName, "key1", "value1"), + Config: testAccHumanTaskUIConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckHumanTaskUIExists(ctx, resourceName, &humanTaskUi), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -78,20 +78,20 @@ func TestAccSageMakerHumanTaskUI_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"ui_template.0.content", "ui_template.0.url"}, }, { - Config: testAccHumanTaskUIConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccHumanTaskUIConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHumanTaskUIExists(ctx, resourceName, &humanTaskUi), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccHumanTaskUIConfig_tags1(rName, "key2", "value2"), + Config: testAccHumanTaskUIConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHumanTaskUIExists(ctx, resourceName, &humanTaskUi), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/image_test.go b/internal/service/sagemaker/image_test.go index f67d751de03..83afe7d1275 100644 --- a/internal/service/sagemaker/image_test.go +++ b/internal/service/sagemaker/image_test.go @@ -148,11 +148,11 @@ func TestAccSageMakerImage_tags(t *testing.T) { CheckDestroy: testAccCheckImageDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccImageConfig_tags1(rName, "key1", "value1"), + Config: testAccImageConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckImageExists(ctx, resourceName, &image), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -161,20 +161,20 @@ func TestAccSageMakerImage_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccImageConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccImageConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageExists(ctx, resourceName, &image), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccImageConfig_tags1(rName, "key2", "value2"), + Config: testAccImageConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckImageExists(ctx, resourceName, &image), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/model_package_group_test.go b/internal/service/sagemaker/model_package_group_test.go index 2598669d3b3..862067aad04 100644 --- a/internal/service/sagemaker/model_package_group_test.go +++ b/internal/service/sagemaker/model_package_group_test.go @@ -91,11 +91,11 @@ func TestAccSageMakerModelPackageGroup_tags(t *testing.T) { CheckDestroy: testAccCheckModelPackageGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccModelPackageGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccModelPackageGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckModelPackageGroupExists(ctx, resourceName, &mpg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -104,20 +104,20 @@ func TestAccSageMakerModelPackageGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccModelPackageGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccModelPackageGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckModelPackageGroupExists(ctx, resourceName, &mpg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccModelPackageGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccModelPackageGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckModelPackageGroupExists(ctx, resourceName, &mpg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/model_test.go b/internal/service/sagemaker/model_test.go index 43eafbb44d4..4fd9428b6db 100644 --- a/internal/service/sagemaker/model_test.go +++ b/internal/service/sagemaker/model_test.go @@ -96,28 +96,28 @@ func TestAccSageMakerModel_tags(t *testing.T) { CheckDestroy: testAccCheckModelDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccModelConfig_tags1(rName, "key1", "value1"), + Config: testAccModelConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckModelExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccModelConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccModelConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckModelExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccModelConfig_tags1(rName, "key2", "value2"), + Config: testAccModelConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckModelExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/sagemaker/monitoring_schedule_test.go b/internal/service/sagemaker/monitoring_schedule_test.go index 76faf113c72..f70e13e3de4 100644 --- a/internal/service/sagemaker/monitoring_schedule_test.go +++ b/internal/service/sagemaker/monitoring_schedule_test.go @@ -62,11 +62,11 @@ func TestAccSageMakerMonitoringSchedule_tags(t *testing.T) { CheckDestroy: testAccCheckMonitoringScheduleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMonitoringScheduleConfig_tags1(rName, "key1", "value1"), + Config: testAccMonitoringScheduleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataQualityJobDefinitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -75,20 +75,20 @@ func TestAccSageMakerMonitoringSchedule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMonitoringScheduleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMonitoringScheduleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataQualityJobDefinitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMonitoringScheduleConfig_tags1(rName, "key2", "value2"), + Config: testAccMonitoringScheduleConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataQualityJobDefinitionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/notebook_instance_test.go b/internal/service/sagemaker/notebook_instance_test.go index 946909af853..5843bb936c6 100644 --- a/internal/service/sagemaker/notebook_instance_test.go +++ b/internal/service/sagemaker/notebook_instance_test.go @@ -260,11 +260,11 @@ func TestAccSageMakerNotebookInstance_tags(t *testing.T) { CheckDestroy: testAccCheckNotebookInstanceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNotebookInstanceConfig_tags1(rName, "key1", "value1"), + Config: testAccNotebookInstanceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNotebookInstanceExists(ctx, resourceName, ¬ebook), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -273,20 +273,20 @@ func TestAccSageMakerNotebookInstance_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNotebookInstanceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNotebookInstanceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNotebookInstanceExists(ctx, resourceName, ¬ebook), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNotebookInstanceConfig_tags1(rName, "key2", "value2"), + Config: testAccNotebookInstanceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNotebookInstanceExists(ctx, resourceName, ¬ebook), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/pipeline_test.go b/internal/service/sagemaker/pipeline_test.go index 8decba47ac2..d6e0aeaf601 100644 --- a/internal/service/sagemaker/pipeline_test.go +++ b/internal/service/sagemaker/pipeline_test.go @@ -109,11 +109,11 @@ func TestAccSageMakerPipeline_tags(t *testing.T) { CheckDestroy: testAccCheckPipelineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPipelinePipelineConfig_tags1(rName, "key1", "value1"), + Config: testAccPipelinePipelineConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &pipeline), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -122,20 +122,20 @@ func TestAccSageMakerPipeline_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPipelinePipelineConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPipelinePipelineConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &pipeline), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPipelinePipelineConfig_tags1(rName, "key2", "value2"), + Config: testAccPipelinePipelineConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPipelineExists(ctx, resourceName, &pipeline), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/project_test.go b/internal/service/sagemaker/project_test.go index 2c3a040bb5f..347a7aa506c 100644 --- a/internal/service/sagemaker/project_test.go +++ b/internal/service/sagemaker/project_test.go @@ -110,11 +110,11 @@ func TestAccSageMakerProject_tags(t *testing.T) { CheckDestroy: testAccCheckProjectDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProjectConfig_tags1(rName, "key1", "value1"), + Config: testAccProjectConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &mpg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -123,20 +123,20 @@ func TestAccSageMakerProject_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProjectConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProjectConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &mpg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProjectConfig_tags1(rName, "key2", "value2"), + Config: testAccProjectConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProjectExists(ctx, resourceName, &mpg), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/sagemaker/space_test.go b/internal/service/sagemaker/space_test.go index 9e4b3f8cf89..4e82b6fa6e9 100644 --- a/internal/service/sagemaker/space_test.go +++ b/internal/service/sagemaker/space_test.go @@ -70,11 +70,11 @@ func testAccSpace_tags(t *testing.T) { CheckDestroy: testAccCheckSpaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSpaceConfig_tags1(rName, "key1", "value1"), + Config: testAccSpaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSpaceExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -83,20 +83,20 @@ func testAccSpace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSpaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSpaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSpaceExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSpaceConfig_tags1(rName, "key2", "value2"), + Config: testAccSpaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSpaceExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/studio_lifecycle_config_test.go b/internal/service/sagemaker/studio_lifecycle_config_test.go index 89cef555e33..3cce297d6c1 100644 --- a/internal/service/sagemaker/studio_lifecycle_config_test.go +++ b/internal/service/sagemaker/studio_lifecycle_config_test.go @@ -64,11 +64,11 @@ func TestAccSageMakerStudioLifecycleConfig_tags(t *testing.T) { CheckDestroy: testAccCheckStudioLifecycleDestroyConfig(ctx), Steps: []resource.TestStep{ { - Config: testAccStudioLifecycleConfigConfig_tags1(rName, "key1", "value1"), + Config: testAccStudioLifecycleConfigConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStudioLifecycleExistsConfig(ctx, resourceName, &config), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -77,20 +77,20 @@ func TestAccSageMakerStudioLifecycleConfig_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStudioLifecycleConfigConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStudioLifecycleConfigConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStudioLifecycleExistsConfig(ctx, resourceName, &config), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStudioLifecycleConfigConfig_tags1(rName, "key2", "value2"), + Config: testAccStudioLifecycleConfigConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStudioLifecycleExistsConfig(ctx, resourceName, &config), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/user_profile_test.go b/internal/service/sagemaker/user_profile_test.go index a5caf620f62..c489de3e8ce 100644 --- a/internal/service/sagemaker/user_profile_test.go +++ b/internal/service/sagemaker/user_profile_test.go @@ -68,11 +68,11 @@ func testAccUserProfile_tags(t *testing.T) { CheckDestroy: testAccCheckUserProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUserProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccUserProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUserProfileExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -81,20 +81,20 @@ func testAccUserProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccUserProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUserProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserProfileExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUserProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccUserProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserProfileExists(ctx, resourceName, &domain), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sagemaker/workteam_test.go b/internal/service/sagemaker/workteam_test.go index 6139e0d09a7..b99c3ed9ab5 100644 --- a/internal/service/sagemaker/workteam_test.go +++ b/internal/service/sagemaker/workteam_test.go @@ -163,11 +163,11 @@ func testAccWorkteam_tags(t *testing.T) { CheckDestroy: testAccCheckWorkteamDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkteamConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkteamConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkteamExists(ctx, resourceName, &workteam), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -177,20 +177,20 @@ func testAccWorkteam_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"workforce_name"}, }, { - Config: testAccWorkteamConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkteamConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkteamExists(ctx, resourceName, &workteam), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkteamConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkteamConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkteamExists(ctx, resourceName, &workteam), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 0984f10dc7d8b5aa55ace344e7111d701f5db6ec Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:55 -0400 Subject: [PATCH 151/180] scheduler: Use constants for test strings --- .../service/scheduler/schedule_group_test.go | 12 +++++------ internal/service/scheduler/schedule_test.go | 20 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/service/scheduler/schedule_group_test.go b/internal/service/scheduler/schedule_group_test.go index 0f004d9a046..e6b5a41a3d6 100644 --- a/internal/service/scheduler/schedule_group_test.go +++ b/internal/service/scheduler/schedule_group_test.go @@ -184,11 +184,11 @@ func TestAccSchedulerScheduleGroup_tags(t *testing.T) { CheckDestroy: testAccCheckScheduleGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccScheduleGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccScheduleGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckScheduleGroupExists(ctx, resourceName, &scheduleGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -197,12 +197,12 @@ func TestAccSchedulerScheduleGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccScheduleGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccScheduleGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScheduleGroupExists(ctx, resourceName, &scheduleGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -211,11 +211,11 @@ func TestAccSchedulerScheduleGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccScheduleGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccScheduleGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScheduleGroupExists(ctx, resourceName, &scheduleGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/scheduler/schedule_test.go b/internal/service/scheduler/schedule_test.go index 0df43066d54..81c7cfc883e 100644 --- a/internal/service/scheduler/schedule_test.go +++ b/internal/service/scheduler/schedule_test.go @@ -1452,15 +1452,15 @@ func TestAccSchedulerSchedule_targetSageMakerPipelineParameters(t *testing.T) { CheckDestroy: testAccCheckScheduleDestroy(ctx, t), Steps: []resource.TestStep{ { - Config: testAccScheduleConfig_targetSageMakerPipelineParameters1(name, "key1", "value1"), + Config: testAccScheduleConfig_targetSageMakerPipelineParameters1(name, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckScheduleExists(ctx, t, resourceName, &schedule), resource.TestCheckResourceAttr(resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs( resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.*", map[string]string{ - names.AttrName: "key1", - names.AttrValue: "value1", + names.AttrName: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, }), ), }, @@ -1470,21 +1470,21 @@ func TestAccSchedulerSchedule_targetSageMakerPipelineParameters(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccScheduleConfig_targetSageMakerPipelineParameters2(name, "key1", "value1updated", "key2", "value2"), + Config: testAccScheduleConfig_targetSageMakerPipelineParameters2(name, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScheduleExists(ctx, t, resourceName, &schedule), resource.TestCheckResourceAttr(resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.#", acctest.CtTwo), resource.TestCheckTypeSetElemNestedAttrs( resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.*", map[string]string{ - names.AttrName: "key1", + names.AttrName: acctest.CtKey1, names.AttrValue: "value1updated", }), resource.TestCheckTypeSetElemNestedAttrs( resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.*", map[string]string{ - names.AttrName: "key2", - names.AttrValue: "value2", + names.AttrName: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, }), ), }, @@ -1494,15 +1494,15 @@ func TestAccSchedulerSchedule_targetSageMakerPipelineParameters(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccScheduleConfig_targetSageMakerPipelineParameters1(name, "key2", "value2"), + Config: testAccScheduleConfig_targetSageMakerPipelineParameters1(name, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckScheduleExists(ctx, t, resourceName, &schedule), resource.TestCheckResourceAttr(resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs( resourceName, "target.0.sagemaker_pipeline_parameters.0.pipeline_parameter.*", map[string]string{ - names.AttrName: "key2", - names.AttrValue: "value2", + names.AttrName: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, }), ), }, From 4b9dadc3c5d156035d5839641037b97e7b72ad38 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:55 -0400 Subject: [PATCH 152/180] schemas: Use constants for test strings --- internal/service/schemas/discoverer_test.go | 12 ++++++------ internal/service/schemas/registry_test.go | 12 ++++++------ internal/service/schemas/schema_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/schemas/discoverer_test.go b/internal/service/schemas/discoverer_test.go index 3bb499bd1e9..954e6288e5d 100644 --- a/internal/service/schemas/discoverer_test.go +++ b/internal/service/schemas/discoverer_test.go @@ -128,11 +128,11 @@ func TestAccSchemasDiscoverer_tags(t *testing.T) { CheckDestroy: testAccCheckDiscovererDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDiscovererConfig_tags1(rName, "key1", "value1"), + Config: testAccDiscovererConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDiscovererExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -141,20 +141,20 @@ func TestAccSchemasDiscoverer_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDiscovererConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDiscovererConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDiscovererExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDiscovererConfig_tags1(rName, "key2", "value2"), + Config: testAccDiscovererConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDiscovererExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/schemas/registry_test.go b/internal/service/schemas/registry_test.go index b02aaedae94..a0161ac0f41 100644 --- a/internal/service/schemas/registry_test.go +++ b/internal/service/schemas/registry_test.go @@ -129,11 +129,11 @@ func TestAccSchemasRegistry_tags(t *testing.T) { CheckDestroy: testAccCheckRegistryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRegistryConfig_tags1(rName, "key1", "value1"), + Config: testAccRegistryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRegistryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -142,20 +142,20 @@ func TestAccSchemasRegistry_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRegistryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccRegistryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRegistryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRegistryConfig_tags1(rName, "key2", "value2"), + Config: testAccRegistryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRegistryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/schemas/schema_test.go b/internal/service/schemas/schema_test.go index 4068937859a..1719cae7405 100644 --- a/internal/service/schemas/schema_test.go +++ b/internal/service/schemas/schema_test.go @@ -251,11 +251,11 @@ func TestAccSchemasSchema_tags(t *testing.T) { CheckDestroy: testAccCheckSchemaDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSchemaConfig_tags1(rName, "key1", "value1"), + Config: testAccSchemaConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSchemaExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -264,20 +264,20 @@ func TestAccSchemasSchema_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSchemaConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSchemaConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSchemaExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSchemaConfig_tags1(rName, "key2", "value2"), + Config: testAccSchemaConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSchemaExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f72f0cfa46f3d6cde555f3921ca1c699b155cc7c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:55 -0400 Subject: [PATCH 153/180] secretsmanager: Use constants for test strings --- internal/service/secretsmanager/secret_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/secretsmanager/secret_test.go b/internal/service/secretsmanager/secret_test.go index 6111c3da6ea..57f711d72ab 100644 --- a/internal/service/secretsmanager/secret_test.go +++ b/internal/service/secretsmanager/secret_test.go @@ -292,11 +292,11 @@ func TestAccSecretsManagerSecret_tags(t *testing.T) { CheckDestroy: testAccCheckSecretDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSecretConfig_tags1(rName, "key1", "value1"), + Config: testAccSecretConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSecretExists(ctx, resourceName, &secret), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -306,20 +306,20 @@ func TestAccSecretsManagerSecret_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"recovery_window_in_days", "force_overwrite_replica_secret"}, }, { - Config: testAccSecretConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSecretConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecretExists(ctx, resourceName, &secret), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSecretConfig_tags1(rName, "key2", "value2"), + Config: testAccSecretConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSecretExists(ctx, resourceName, &secret), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From bfce6cb2ac777782821913b5d9e649aefd37d332 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:55 -0400 Subject: [PATCH 154/180] securityhub: Use constants for test strings --- .../securityhub/automation_rule_test.go | 24 +++++++++---------- internal/service/securityhub/insight_test.go | 12 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/securityhub/automation_rule_test.go b/internal/service/securityhub/automation_rule_test.go index 51032b3bf3d..d4028178cf4 100644 --- a/internal/service/securityhub/automation_rule_test.go +++ b/internal/service/securityhub/automation_rule_test.go @@ -266,13 +266,13 @@ func testAccAutomationRule_mapFilters(t *testing.T) { CheckDestroy: testAccCheckAutomationRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAutomationRuleConfig_mapFilters(rName, string(types.MapFilterComparisonEquals), "key1", "value1"), + Config: testAccAutomationRuleConfig_mapFilters(rName, string(types.MapFilterComparisonEquals), acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAutomationRuleExists(ctx, resourceName, &automationRule), resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.comparison", string(types.MapFilterComparisonEquals)), - resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.key", "key1"), - resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.value", "value1"), + resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.key", acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.value", acctest.CtValue1), ), }, { @@ -281,13 +281,13 @@ func testAccAutomationRule_mapFilters(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAutomationRuleConfig_mapFilters(rName, string(types.MapFilterComparisonContains), "key2", "value2"), + Config: testAccAutomationRuleConfig_mapFilters(rName, string(types.MapFilterComparisonContains), acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAutomationRuleExists(ctx, resourceName, &automationRule), resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.comparison", string(types.MapFilterComparisonContains)), - resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.key", "key2"), - resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.value", "value2"), + resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.key", acctest.CtKey2), + resource.TestCheckResourceAttr(resourceName, "criteria.0.resource_details_other.0.value", acctest.CtValue2), ), }, }, @@ -307,11 +307,11 @@ func testAccAutomationRule_tags(t *testing.T) { CheckDestroy: testAccCheckAutomationRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAutomationRuleConfig_tags(rName, "key1", "value1"), + Config: testAccAutomationRuleConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAutomationRuleExists(ctx, resourceName, &automationRule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -320,20 +320,20 @@ func testAccAutomationRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAutomationRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAutomationRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAutomationRuleExists(ctx, resourceName, &automationRule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAutomationRuleConfig_tags(rName, "key1", "value1"), + Config: testAccAutomationRuleConfig_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAutomationRuleExists(ctx, resourceName, &automationRule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/securityhub/insight_test.go b/internal/service/securityhub/insight_test.go index c7592377689..cd32b6cbea0 100644 --- a/internal/service/securityhub/insight_test.go +++ b/internal/service/securityhub/insight_test.go @@ -213,8 +213,8 @@ func testAccInsight_MapFilters(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "filters.0.product_fields.#", acctest.CtOne), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "filters.0.product_fields.*", map[string]string{ "comparison": string(types.MapFilterComparisonEquals), - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, }), ), }, @@ -255,13 +255,13 @@ func testAccInsight_MultipleFilters(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "filters.0.product_fields.#", acctest.CtTwo), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "filters.0.product_fields.*", map[string]string{ "comparison": string(types.MapFilterComparisonEquals), - names.AttrKey: "key1", - names.AttrValue: "value1", + names.AttrKey: acctest.CtKey1, + names.AttrValue: acctest.CtValue1, }), resource.TestCheckTypeSetElemNestedAttrs(resourceName, "filters.0.product_fields.*", map[string]string{ "comparison": string(types.MapFilterComparisonEquals), - names.AttrKey: "key2", - names.AttrValue: "value2", + names.AttrKey: acctest.CtKey2, + names.AttrValue: acctest.CtValue2, }), ), }, From 00cc5d4c4d5f1cdcd3c14baf271b9defb0cc2fbd Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:56 -0400 Subject: [PATCH 155/180] securitylake: Use constants for test strings --- internal/service/securitylake/data_lake_test.go | 12 ++++++------ internal/service/securitylake/subscriber_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/securitylake/data_lake_test.go b/internal/service/securitylake/data_lake_test.go index 428e5547c6c..ac73b949ab5 100644 --- a/internal/service/securitylake/data_lake_test.go +++ b/internal/service/securitylake/data_lake_test.go @@ -102,11 +102,11 @@ func testAccDataLake_tags(t *testing.T) { CheckDestroy: testAccCheckDataLakeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDataLakeConfig_tags1("key1", "value1"), + Config: testAccDataLakeConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDataLakeExists(ctx, resourceName, &datalake), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -116,20 +116,20 @@ func testAccDataLake_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"meta_store_manager_role_arn"}, }, { - Config: testAccDataLakeConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccDataLakeConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataLakeExists(ctx, resourceName, &datalake), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDataLakeConfig_tags1("key2", "value2"), + Config: testAccDataLakeConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDataLakeExists(ctx, resourceName, &datalake), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/securitylake/subscriber_test.go b/internal/service/securitylake/subscriber_test.go index b7cff53f50b..d6243c04219 100644 --- a/internal/service/securitylake/subscriber_test.go +++ b/internal/service/securitylake/subscriber_test.go @@ -198,11 +198,11 @@ func testAccSubscriber_tags(t *testing.T) { CheckDestroy: testAccCheckSubscriberDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSubscriberConfig_tags1(rName, "key1", "value1"), + Config: testAccSubscriberConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSubscriberExists(ctx, resourceName, &subscriber), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -211,20 +211,20 @@ func testAccSubscriber_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSubscriberConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSubscriberConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSubscriberExists(ctx, resourceName, &subscriber), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSubscriberConfig_tags1(rName, "key2", "value2"), + Config: testAccSubscriberConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSubscriberExists(ctx, resourceName, &subscriber), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f17df17e23afa96b0a0f07479dd2cf40e2aa1625 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:56 -0400 Subject: [PATCH 156/180] serverlessrepo: Use constants for test strings --- .../serverlessrepo/cloudformation_stack_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/serverlessrepo/cloudformation_stack_test.go b/internal/service/serverlessrepo/cloudformation_stack_test.go index b5b5a997f16..52e5a294ccb 100644 --- a/internal/service/serverlessrepo/cloudformation_stack_test.go +++ b/internal/service/serverlessrepo/cloudformation_stack_test.go @@ -209,11 +209,11 @@ func TestAccServerlessRepoCloudFormationStack_tags(t *testing.T) { CheckDestroy: testAccCheckCloudFormationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCloudFormationStackConfig_tags1(stackName, appARN, "key1", "value1"), + Config: testAccCloudFormationStackConfig_tags1(stackName, appARN, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists(ctx, resourceName, &stack), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -222,19 +222,19 @@ func TestAccServerlessRepoCloudFormationStack_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCloudFormationStackConfig_tags2(stackName, appARN, "key1", "value1updated", "key2", "value2"), + Config: testAccCloudFormationStackConfig_tags2(stackName, appARN, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists(ctx, resourceName, &stack), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCloudFormationStackConfig_tags1(stackName, appARN, "key2", "value2"), + Config: testAccCloudFormationStackConfig_tags1(stackName, appARN, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists(ctx, resourceName, &stack), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From f12af8e4c38697ea714f0bd6472a5108621c547b Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:56 -0400 Subject: [PATCH 157/180] servicecatalog: Use constants for test strings --- .../servicecatalog/portfolio_tags_gen_test.go | 148 +++++++++--------- .../servicecatalog/product_tags_gen_test.go | 148 +++++++++--------- .../provisioned_product_tags_gen_test.go | 148 +++++++++--------- 3 files changed, 222 insertions(+), 222 deletions(-) diff --git a/internal/service/servicecatalog/portfolio_tags_gen_test.go b/internal/service/servicecatalog/portfolio_tags_gen_test.go index 7f597a83ef3..fbfe2c79845 100644 --- a/internal/service/servicecatalog/portfolio_tags_gen_test.go +++ b/internal/service/servicecatalog/portfolio_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccServiceCatalogPortfolio_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccServiceCatalogPortfolio_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccServiceCatalogPortfolio_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccServiceCatalogPortfolio_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccServiceCatalogPortfolio_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccServiceCatalogPortfolio_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccServiceCatalogPortfolio_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccServiceCatalogPortfolio_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccServiceCatalogPortfolio_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccServiceCatalogPortfolio_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -255,7 +255,7 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -269,7 +269,7 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -320,13 +320,13 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -334,14 +334,14 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -350,8 +350,8 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -363,13 +363,13 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -377,7 +377,7 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -407,13 +407,13 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -421,7 +421,7 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -435,7 +435,7 @@ func TestAccServiceCatalogPortfolio_tags_EmptyTag_OnUpdate_Replace(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -463,7 +463,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -471,7 +471,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -480,7 +480,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -494,8 +494,8 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -504,7 +504,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -513,8 +513,8 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -528,7 +528,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -536,7 +536,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -545,7 +545,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_providerOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -844,15 +844,15 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToProviderOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -861,7 +861,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToProviderOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -869,7 +869,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToProviderOnly(t *tes testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -878,7 +878,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToProviderOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -907,7 +907,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToResourceOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -915,7 +915,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToResourceOnly(t *tes testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -924,15 +924,15 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToResourceOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -941,7 +941,7 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_updateToResourceOnly(t *tes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -971,10 +971,10 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_emptyResourceTag(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -991,10 +991,10 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_emptyResourceTag(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1022,10 +1022,10 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_nullOverlappingResourceTag( ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1041,10 +1041,10 @@ func TestAccServiceCatalogPortfolio_tags_DefaultTags_nullOverlappingResourceTag( ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1173,13 +1173,13 @@ func TestAccServiceCatalogPortfolio_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1188,13 +1188,13 @@ func TestAccServiceCatalogPortfolio_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1216,8 +1216,8 @@ func TestAccServiceCatalogPortfolio_tags_ComputedTag_OnUpdate_Add(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1244,13 +1244,13 @@ func TestAccServiceCatalogPortfolio_tags_ComputedTag_OnUpdate_Replace(t *testing ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1258,7 +1258,7 @@ func TestAccServiceCatalogPortfolio_tags_ComputedTag_OnUpdate_Replace(t *testing ConfigDirectory: config.StaticDirectory("testdata/Portfolio/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckPortfolioExists(ctx, resourceName, &v), @@ -1283,7 +1283,7 @@ func TestAccServiceCatalogPortfolio_tags_ComputedTag_OnUpdate_Replace(t *testing ConfigDirectory: config.StaticDirectory("testdata/Portfolio/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/servicecatalog/product_tags_gen_test.go b/internal/service/servicecatalog/product_tags_gen_test.go index 6d4ac48a1f2..23ae9303b3c 100644 --- a/internal/service/servicecatalog/product_tags_gen_test.go +++ b/internal/service/servicecatalog/product_tags_gen_test.go @@ -30,13 +30,13 @@ func TestAccServiceCatalogProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -44,7 +44,7 @@ func TestAccServiceCatalogProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -59,15 +59,15 @@ func TestAccServiceCatalogProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -75,8 +75,8 @@ func TestAccServiceCatalogProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -91,13 +91,13 @@ func TestAccServiceCatalogProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -105,7 +105,7 @@ func TestAccServiceCatalogProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -159,7 +159,7 @@ func TestAccServiceCatalogProduct_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -172,7 +172,7 @@ func TestAccServiceCatalogProduct_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -222,13 +222,13 @@ func TestAccServiceCatalogProduct_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -236,7 +236,7 @@ func TestAccServiceCatalogProduct_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -268,7 +268,7 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -282,7 +282,7 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -338,13 +338,13 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -352,14 +352,14 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -368,8 +368,8 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -384,13 +384,13 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -398,7 +398,7 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -430,13 +430,13 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -444,7 +444,7 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -458,7 +458,7 @@ func TestAccServiceCatalogProduct_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -488,7 +488,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -496,7 +496,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -505,7 +505,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -522,8 +522,8 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -532,7 +532,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -541,8 +541,8 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -559,7 +559,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -567,7 +567,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -576,7 +576,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -896,15 +896,15 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToProviderOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -913,7 +913,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToProviderOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -921,7 +921,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToProviderOnly(t *testi testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -930,7 +930,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToProviderOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -961,7 +961,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToResourceOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -969,7 +969,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToResourceOnly(t *testi testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -978,15 +978,15 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToResourceOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -995,7 +995,7 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_updateToResourceOnly(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -1027,10 +1027,10 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_emptyResourceTag(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1047,10 +1047,10 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_emptyResourceTag(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1080,10 +1080,10 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_nullOverlappingResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1099,10 +1099,10 @@ func TestAccServiceCatalogProduct_tags_DefaultTags_nullOverlappingResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1237,13 +1237,13 @@ func TestAccServiceCatalogProduct_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1252,13 +1252,13 @@ func TestAccServiceCatalogProduct_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1280,8 +1280,8 @@ func TestAccServiceCatalogProduct_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1310,13 +1310,13 @@ func TestAccServiceCatalogProduct_tags_ComputedTag_OnUpdate_Replace(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1324,7 +1324,7 @@ func TestAccServiceCatalogProduct_tags_ComputedTag_OnUpdate_Replace(t *testing.T ConfigDirectory: config.StaticDirectory("testdata/Product/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProductExists(ctx, resourceName), @@ -1349,7 +1349,7 @@ func TestAccServiceCatalogProduct_tags_ComputedTag_OnUpdate_Replace(t *testing.T ConfigDirectory: config.StaticDirectory("testdata/Product/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/servicecatalog/provisioned_product_tags_gen_test.go b/internal/service/servicecatalog/provisioned_product_tags_gen_test.go index 5772deebcdb..52cd4a52ab5 100644 --- a/internal/service/servicecatalog/provisioned_product_tags_gen_test.go +++ b/internal/service/servicecatalog/provisioned_product_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccServiceCatalogProvisionedProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccServiceCatalogProvisionedProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -61,15 +61,15 @@ func TestAccServiceCatalogProvisionedProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -77,8 +77,8 @@ func TestAccServiceCatalogProvisionedProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -93,13 +93,13 @@ func TestAccServiceCatalogProvisionedProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), SkipFunc: testAccServiceCatalogProvisionedProduct_removingTagNotSupported(t), }, @@ -108,7 +108,7 @@ func TestAccServiceCatalogProvisionedProduct_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -166,7 +166,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -179,7 +179,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -230,13 +230,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -244,7 +244,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -277,7 +277,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnCreate(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -291,7 +291,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnCreate(t *testing.T ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -348,13 +348,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Add(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -362,14 +362,14 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Add(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -378,8 +378,8 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Add(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -394,13 +394,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Add(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -408,7 +408,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Add(t *testi ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -441,13 +441,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Replace(t *t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -455,7 +455,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Replace(t *t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -469,7 +469,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_EmptyTag_OnUpdate_Replace(t *t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -500,7 +500,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -508,7 +508,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -517,7 +517,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -534,8 +534,8 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -544,7 +544,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -553,8 +553,8 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -571,7 +571,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -579,7 +579,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), SkipFunc: testAccServiceCatalogProvisionedProduct_removingTagNotSupported(t), }, @@ -589,7 +589,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_providerOnly(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -917,15 +917,15 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToProviderOn ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -934,7 +934,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToProviderOn ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -942,7 +942,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToProviderOn testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -951,7 +951,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToProviderOn ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -983,7 +983,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToResourceOn ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -991,7 +991,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToResourceOn testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1000,15 +1000,15 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToResourceOn ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -1017,7 +1017,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_updateToResourceOn ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -1050,10 +1050,10 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_emptyResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1070,10 +1070,10 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_emptyResourceTag(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1104,10 +1104,10 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_nullOverlappingRes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1123,10 +1123,10 @@ func TestAccServiceCatalogProvisionedProduct_tags_DefaultTags_nullOverlappingRes ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1264,13 +1264,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_ComputedTag_OnUpdate_Add(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1279,13 +1279,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_ComputedTag_OnUpdate_Add(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1307,8 +1307,8 @@ func TestAccServiceCatalogProvisionedProduct_tags_ComputedTag_OnUpdate_Add(t *te ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1338,13 +1338,13 @@ func TestAccServiceCatalogProvisionedProduct_tags_ComputedTag_OnUpdate_Replace(t ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1352,7 +1352,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_ComputedTag_OnUpdate_Replace(t ConfigDirectory: config.StaticDirectory("testdata/ProvisionedProduct/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProvisionedProductExists(ctx, resourceName, &v), @@ -1377,7 +1377,7 @@ func TestAccServiceCatalogProvisionedProduct_tags_ComputedTag_OnUpdate_Replace(t ConfigDirectory: config.StaticDirectory("testdata/ProvisionedProduct/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, From fde922051d85da4a86bd0293692500777d632e06 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:56 -0400 Subject: [PATCH 158/180] servicediscovery: Use constants for test strings --- .../service/servicediscovery/http_namespace_test.go | 12 ++++++------ .../servicediscovery/private_dns_namespace_test.go | 12 ++++++------ .../servicediscovery/public_dns_namespace_test.go | 12 ++++++------ internal/service/servicediscovery/service_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/servicediscovery/http_namespace_test.go b/internal/service/servicediscovery/http_namespace_test.go index 1a32c12ea44..ba4d7eb6f8f 100644 --- a/internal/service/servicediscovery/http_namespace_test.go +++ b/internal/service/servicediscovery/http_namespace_test.go @@ -130,11 +130,11 @@ func TestAccServiceDiscoveryHTTPNamespace_tags(t *testing.T) { CheckDestroy: testAccCheckHTTPNamespaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccHTTPNamespaceConfig_tags1(rName, "key1", "value1"), + Config: testAccHTTPNamespaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckHTTPNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -143,20 +143,20 @@ func TestAccServiceDiscoveryHTTPNamespace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccHTTPNamespaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccHTTPNamespaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHTTPNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccHTTPNamespaceConfig_tags1(rName, "key2", "value2"), + Config: testAccHTTPNamespaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckHTTPNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/servicediscovery/private_dns_namespace_test.go b/internal/service/servicediscovery/private_dns_namespace_test.go index 11f643cd73a..65902153c32 100644 --- a/internal/service/servicediscovery/private_dns_namespace_test.go +++ b/internal/service/servicediscovery/private_dns_namespace_test.go @@ -156,11 +156,11 @@ func TestAccServiceDiscoveryPrivateDNSNamespace_tags(t *testing.T) { CheckDestroy: testAccCheckPrivateDNSNamespaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPrivateDNSNamespaceConfig_tags1(rName, "key1", "value1"), + Config: testAccPrivateDNSNamespaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPrivateDNSNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -170,20 +170,20 @@ func TestAccServiceDiscoveryPrivateDNSNamespace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPrivateDNSNamespaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPrivateDNSNamespaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPrivateDNSNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPrivateDNSNamespaceConfig_tags1(rName, "key2", "value2"), + Config: testAccPrivateDNSNamespaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPrivateDNSNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/servicediscovery/public_dns_namespace_test.go b/internal/service/servicediscovery/public_dns_namespace_test.go index 22ca37cf67e..3b1a15b109f 100644 --- a/internal/service/servicediscovery/public_dns_namespace_test.go +++ b/internal/service/servicediscovery/public_dns_namespace_test.go @@ -130,11 +130,11 @@ func TestAccServiceDiscoveryPublicDNSNamespace_tags(t *testing.T) { CheckDestroy: testAccCheckPublicDNSNamespaceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPublicDNSNamespaceConfig_tags1(rName, "key1", "value1"), + Config: testAccPublicDNSNamespaceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPublicDNSNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -143,20 +143,20 @@ func TestAccServiceDiscoveryPublicDNSNamespace_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPublicDNSNamespaceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccPublicDNSNamespaceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPublicDNSNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPublicDNSNamespaceConfig_tags1(rName, "key2", "value2"), + Config: testAccPublicDNSNamespaceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPublicDNSNamespaceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/servicediscovery/service_test.go b/internal/service/servicediscovery/service_test.go index ac1e0834c24..e7621aab0f0 100644 --- a/internal/service/servicediscovery/service_test.go +++ b/internal/service/servicediscovery/service_test.go @@ -248,11 +248,11 @@ func TestAccServiceDiscoveryService_tags(t *testing.T) { CheckDestroy: testAccCheckServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -262,20 +262,20 @@ func TestAccServiceDiscoveryService_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrForceDestroy}, }, { - Config: testAccServiceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 032303dc31aa04baabd913d60b7c5dd4828864b0 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:56 -0400 Subject: [PATCH 159/180] sesv2: Use constants for test strings --- internal/service/sesv2/configuration_set_test.go | 12 ++++++------ internal/service/sesv2/contact_list_test.go | 8 ++++---- internal/service/sesv2/dedicated_ip_pool_test.go | 12 ++++++------ internal/service/sesv2/email_identity_test.go | 12 ++++++------ 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/internal/service/sesv2/configuration_set_test.go b/internal/service/sesv2/configuration_set_test.go index 917b47bc4de..a869e2ed76d 100644 --- a/internal/service/sesv2/configuration_set_test.go +++ b/internal/service/sesv2/configuration_set_test.go @@ -306,11 +306,11 @@ func TestAccSESV2ConfigurationSet_tags(t *testing.T) { CheckDestroy: testAccCheckConfigurationSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConfigurationSetConfig_tags1(rName, "key1", "value1"), + Config: testAccConfigurationSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -319,20 +319,20 @@ func TestAccSESV2ConfigurationSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConfigurationSetConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConfigurationSetConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConfigurationSetConfig_tags1(rName, "key2", "value2"), + Config: testAccConfigurationSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConfigurationSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sesv2/contact_list_test.go b/internal/service/sesv2/contact_list_test.go index f562d086e89..25abff6be3e 100644 --- a/internal/service/sesv2/contact_list_test.go +++ b/internal/service/sesv2/contact_list_test.go @@ -143,11 +143,11 @@ func TestAccSESV2ContactList_tags(t *testing.T) { CheckDestroy: testAccCheckContactListDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccContactListConfig_tags1(rName, "key1", "value1"), + Config: testAccContactListConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckContactListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -156,12 +156,12 @@ func TestAccSESV2ContactList_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContactListConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccContactListConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckContactListExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sesv2/dedicated_ip_pool_test.go b/internal/service/sesv2/dedicated_ip_pool_test.go index f5b1f1ff0b4..19b03f1d77d 100644 --- a/internal/service/sesv2/dedicated_ip_pool_test.go +++ b/internal/service/sesv2/dedicated_ip_pool_test.go @@ -121,12 +121,12 @@ func TestAccSESV2DedicatedIPPool_tags(t *testing.T) { CheckDestroy: testAccCheckDedicatedIPPoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDedicatedIPPoolConfig_tags1(rName, "key1", "value1"), + Config: testAccDedicatedIPPoolConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDedicatedIPPoolExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "pool_name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -135,22 +135,22 @@ func TestAccSESV2DedicatedIPPool_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDedicatedIPPoolConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDedicatedIPPoolConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDedicatedIPPoolExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "pool_name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDedicatedIPPoolConfig_tags1(rName, "key2", "value2"), + Config: testAccDedicatedIPPoolConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDedicatedIPPoolExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, "pool_name", rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sesv2/email_identity_test.go b/internal/service/sesv2/email_identity_test.go index d8d02f27e7d..131eb67b36b 100644 --- a/internal/service/sesv2/email_identity_test.go +++ b/internal/service/sesv2/email_identity_test.go @@ -246,11 +246,11 @@ func TestAccSESV2EmailIdentity_tags(t *testing.T) { CheckDestroy: testAccCheckEmailIdentityDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccEmailIdentityConfig_tags1(rName, "key1", "value1"), + Config: testAccEmailIdentityConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckEmailIdentityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -259,20 +259,20 @@ func TestAccSESV2EmailIdentity_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccEmailIdentityConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccEmailIdentityConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEmailIdentityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccEmailIdentityConfig_tags1(rName, "key2", "value2"), + Config: testAccEmailIdentityConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckEmailIdentityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 6921cdfb428aa892fe86d5036ce58d77daa3a156 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:56 -0400 Subject: [PATCH 160/180] sfn: Use constants for test strings --- internal/service/sfn/activity_test.go | 12 ++++++------ internal/service/sfn/state_machine_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/sfn/activity_test.go b/internal/service/sfn/activity_test.go index a1fe50f0ae4..0dcbb7f41f9 100644 --- a/internal/service/sfn/activity_test.go +++ b/internal/service/sfn/activity_test.go @@ -84,11 +84,11 @@ func TestAccSFNActivity_tags(t *testing.T) { CheckDestroy: testAccCheckActivityDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccActivityConfig_basicTags1(rName, "key1", "value1"), + Config: testAccActivityConfig_basicTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -97,20 +97,20 @@ func TestAccSFNActivity_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccActivityConfig_basicTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccActivityConfig_basicTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccActivityConfig_basicTags1(rName, "key2", "value2"), + Config: testAccActivityConfig_basicTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckActivityExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/sfn/state_machine_test.go b/internal/service/sfn/state_machine_test.go index 82e9550c504..8f18352678f 100644 --- a/internal/service/sfn/state_machine_test.go +++ b/internal/service/sfn/state_machine_test.go @@ -306,11 +306,11 @@ func TestAccSFNStateMachine_tags(t *testing.T) { CheckDestroy: testAccCheckStateMachineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStateMachineConfig_tags1(rName, "key1", "value1"), + Config: testAccStateMachineConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckExists(ctx, resourceName, &sm), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -319,20 +319,20 @@ func TestAccSFNStateMachine_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStateMachineConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStateMachineConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExists(ctx, resourceName, &sm), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStateMachineConfig_tags1(rName, "key2", "value2"), + Config: testAccStateMachineConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckExists(ctx, resourceName, &sm), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 2bf3f7f2a3ebc30736a064cc24e808c8066f359f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH 161/180] shield: Use constants for test strings --- internal/service/shield/protection_group_test.go | 12 ++++++------ internal/service/shield/protection_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/shield/protection_group_test.go b/internal/service/shield/protection_group_test.go index 131c1ded19c..dc9c6c41a36 100644 --- a/internal/service/shield/protection_group_test.go +++ b/internal/service/shield/protection_group_test.go @@ -265,11 +265,11 @@ func TestAccShieldProtectionGroup_tags(t *testing.T) { CheckDestroy: testAccCheckProtectionGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProtectionGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccProtectionGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProtectionGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -278,20 +278,20 @@ func TestAccShieldProtectionGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProtectionGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProtectionGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProtectionGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProtectionGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccProtectionGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProtectionGroupExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/shield/protection_test.go b/internal/service/shield/protection_test.go index 5a0ec943250..24408e2315c 100644 --- a/internal/service/shield/protection_test.go +++ b/internal/service/shield/protection_test.go @@ -228,12 +228,12 @@ func TestAccShieldProtection_CloudFront_tags(t *testing.T) { CheckDestroy: testAccCheckProtectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProtectionConfig_cloudFrontTags1(rName, testAccProtectionCloudFrontRetainConfig(), "Key1", "value1"), + Config: testAccProtectionConfig_cloudFrontTags1(rName, testAccProtectionCloudFrontRetainConfig(), "Key1", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckProtectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", acctest.CtValue1), ), }, { @@ -242,22 +242,22 @@ func TestAccShieldProtection_CloudFront_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProtectionConfig_cloudFrontTags2(rName, testAccProtectionCloudFrontRetainConfig(), "Key1", "value1updated", "Key2", "value2"), + Config: testAccProtectionConfig_cloudFrontTags2(rName, testAccProtectionCloudFrontRetainConfig(), "Key1", "value1updated", "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProtectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.Key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), ), }, { - Config: testAccProtectionConfig_cloudFrontTags1(rName, testAccProtectionCloudFrontRetainConfig(), "Key2", "value2"), + Config: testAccProtectionConfig_cloudFrontTags1(rName, testAccProtectionCloudFrontRetainConfig(), "Key2", acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckProtectionExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.Key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", acctest.CtValue2), ), }, }, From 14af6953267d9e4c06230e2252b90ef41be8c1ce Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH 162/180] signer: Use constants for test strings --- internal/service/signer/signing_profile_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/signer/signing_profile_test.go b/internal/service/signer/signing_profile_test.go index 2569fd9f907..594818e184c 100644 --- a/internal/service/signer/signing_profile_test.go +++ b/internal/service/signer/signing_profile_test.go @@ -169,11 +169,11 @@ func TestAccSignerSigningProfile_tags(t *testing.T) { CheckDestroy: testAccCheckSigningProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSigningProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccSigningProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSigningProfileExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -182,20 +182,20 @@ func TestAccSignerSigningProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSigningProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSigningProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSigningProfileExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSigningProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccSigningProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSigningProfileExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 793fdb56e1e3f225e61d56c8846d0e0bed6ca2a6 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH 163/180] sns: Use constants for test strings --- internal/service/sns/topic_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/sns/topic_test.go b/internal/service/sns/topic_test.go index 086ffd07036..65ac6c04ee4 100644 --- a/internal/service/sns/topic_test.go +++ b/internal/service/sns/topic_test.go @@ -183,11 +183,11 @@ func TestAccSNSTopic_tags(t *testing.T) { CheckDestroy: testAccCheckTopicDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTopicConfig_tags1(rName, "key1", "value1"), + Config: testAccTopicConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTopicExists(ctx, resourceName, &attributes), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -196,20 +196,20 @@ func TestAccSNSTopic_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTopicConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTopicConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTopicExists(ctx, resourceName, &attributes), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTopicConfig_tags1(rName, "key2", "value2"), + Config: testAccTopicConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTopicExists(ctx, resourceName, &attributes), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 65b14518f09306899ba6fd0c33d79bc25ea5fc71 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH 164/180] sqs: Use constants for test strings --- internal/service/sqs/queue_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/sqs/queue_test.go b/internal/service/sqs/queue_test.go index 1cb2baac2b0..aede4bf05e3 100644 --- a/internal/service/sqs/queue_test.go +++ b/internal/service/sqs/queue_test.go @@ -289,11 +289,11 @@ func TestAccSQSQueue_tags(t *testing.T) { CheckDestroy: testAccCheckQueueDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccQueueConfig_tags1(rName, "key1", "value1"), + Config: testAccQueueConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckQueueExists(ctx, resourceName, &queueAttributes), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -302,20 +302,20 @@ func TestAccSQSQueue_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccQueueConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccQueueConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQueueExists(ctx, resourceName, &queueAttributes), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccQueueConfig_tags1(rName, "key2", "value2"), + Config: testAccQueueConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckQueueExists(ctx, resourceName, &queueAttributes), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 7aa47e6431a41bb10f389e0258ae7514ead2fe82 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH 165/180] ssm: Use constants for test strings --- internal/service/ssm/document_test.go | 10 +++--- .../service/ssm/maintenance_window_test.go | 12 +++---- internal/service/ssm/parameter_test.go | 32 +++++++++---------- internal/service/ssm/patch_baseline_test.go | 12 +++---- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/internal/service/ssm/document_test.go b/internal/service/ssm/document_test.go index 5196114084e..73655b734d8 100644 --- a/internal/service/ssm/document_test.go +++ b/internal/service/ssm/document_test.go @@ -559,11 +559,11 @@ func TestAccSSMDocument_tags(t *testing.T) { CheckDestroy: testAccCheckDocumentDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDocumentConfig_tags1(rName, "key1", "value1"), + Config: testAccDocumentConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDocumentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -572,16 +572,16 @@ func TestAccSSMDocument_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDocumentConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDocumentConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDocumentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDocumentConfig_tags1(rName, "key2", "value2updated"), + Config: testAccDocumentConfig_tags1(rName, acctest.CtKey2, "value2updated"), Check: resource.ComposeTestCheckFunc( testAccCheckDocumentExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), diff --git a/internal/service/ssm/maintenance_window_test.go b/internal/service/ssm/maintenance_window_test.go index 07164b8fc7f..d0104e2fbab 100644 --- a/internal/service/ssm/maintenance_window_test.go +++ b/internal/service/ssm/maintenance_window_test.go @@ -107,11 +107,11 @@ func TestAccSSMMaintenanceWindow_tags(t *testing.T) { CheckDestroy: testAccCheckMaintenanceWindowDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMaintenanceWindowConfig_tags1(rName, "key1", "value1"), + Config: testAccMaintenanceWindowConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMaintenanceWindowExists(ctx, resourceName, &winId), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -120,20 +120,20 @@ func TestAccSSMMaintenanceWindow_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccMaintenanceWindowConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccMaintenanceWindowConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMaintenanceWindowExists(ctx, resourceName, &winId), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMaintenanceWindowConfig_tags1(rName, "key2", "value2"), + Config: testAccMaintenanceWindowConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMaintenanceWindowExists(ctx, resourceName, &winId), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ssm/parameter_test.go b/internal/service/ssm/parameter_test.go index 9a47eb38515..62caa0ecb27 100644 --- a/internal/service/ssm/parameter_test.go +++ b/internal/service/ssm/parameter_test.go @@ -514,11 +514,11 @@ func TestAccSSMParameter_Overwrite_tags(t *testing.T) { CheckDestroy: testAccCheckParameterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterConfig_overwriteTags1(rName, true, "key1", "value1"), + Config: testAccParameterConfig_overwriteTags1(rName, true, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -545,11 +545,11 @@ func TestAccSSMParameter_Overwrite_noOverwriteTags(t *testing.T) { CheckDestroy: testAccCheckParameterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterConfig_overwriteTags1(rName, false, "key1", "value1"), + Config: testAccParameterConfig_overwriteTags1(rName, false, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -576,11 +576,11 @@ func TestAccSSMParameter_Overwrite_updateToTags(t *testing.T) { CheckDestroy: testAccCheckParameterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterConfig_basicTags1(rName, "key1", "value1"), + Config: testAccParameterConfig_basicTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -589,11 +589,11 @@ func TestAccSSMParameter_Overwrite_updateToTags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccParameterConfig_overwriteTags1(rName, true, "key1", "value2"), + Config: testAccParameterConfig_overwriteTags1(rName, true, acctest.CtKey1, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue2), ), }, }, @@ -617,7 +617,7 @@ func TestAccSSMParameter_Overwrite_removeAttribute(t *testing.T) { VersionConstraint: "4.67.0", }, }, - Config: testAccParameterConfig_overwriteRemove_Setup(rName, "String", "value1"), + Config: testAccParameterConfig_overwriteRemove_Setup(rName, "String", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, "overwrite", "true"), @@ -625,7 +625,7 @@ func TestAccSSMParameter_Overwrite_removeAttribute(t *testing.T) { }, { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - Config: testAccParameterConfig_overwriteRemove_Remove(rName, "String", "value1"), + Config: testAccParameterConfig_overwriteRemove_Remove(rName, "String", acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, "overwrite", "false"), @@ -648,11 +648,11 @@ func TestAccSSMParameter_tags(t *testing.T) { CheckDestroy: testAccCheckParameterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccParameterConfig_basicTags1(rName, "key1", "value1"), + Config: testAccParameterConfig_basicTags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -662,20 +662,20 @@ func TestAccSSMParameter_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"overwrite"}, }, { - Config: testAccParameterConfig_basicTags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccParameterConfig_basicTags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccParameterConfig_basicTags1(rName, "key2", "value2"), + Config: testAccParameterConfig_basicTags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckParameterExists(ctx, resourceName, ¶m), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ssm/patch_baseline_test.go b/internal/service/ssm/patch_baseline_test.go index fc1049ed4e5..cb4a5262962 100644 --- a/internal/service/ssm/patch_baseline_test.go +++ b/internal/service/ssm/patch_baseline_test.go @@ -111,11 +111,11 @@ func TestAccSSMPatchBaseline_tags(t *testing.T) { CheckDestroy: testAccCheckPatchBaselineDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPatchBaselineConfig_tags1(name, "key1", "value1"), + Config: testAccPatchBaselineConfig_tags1(name, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckPatchBaselineExists(ctx, resourceName, &patch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -124,20 +124,20 @@ func TestAccSSMPatchBaseline_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPatchBaselineConfig_tags2(name, "key1", "value1updated", "key2", "value2"), + Config: testAccPatchBaselineConfig_tags2(name, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPatchBaselineExists(ctx, resourceName, &patch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccPatchBaselineConfig_tags1(name, "key2", "value2"), + Config: testAccPatchBaselineConfig_tags1(name, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckPatchBaselineExists(ctx, resourceName, &patch), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From e0b3e4a2a693f90ca990d7b1d9fb0ab5fb5b07e0 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:57 -0400 Subject: [PATCH 166/180] ssmincidents: Use constants for test strings --- internal/service/ssmincidents/response_plan_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/ssmincidents/response_plan_test.go b/internal/service/ssmincidents/response_plan_test.go index 3fad64f4101..31f786a4031 100644 --- a/internal/service/ssmincidents/response_plan_test.go +++ b/internal/service/ssmincidents/response_plan_test.go @@ -699,12 +699,12 @@ func testResponsePlan_action(t *testing.T) { resource.TestCheckResourceAttr( resourceName, "action.0.ssm_automation.0.parameter.0.values.0", - "value1", + acctest.CtValue1, ), resource.TestCheckResourceAttr( resourceName, "action.0.ssm_automation.0.parameter.0.values.1", - "value2", + acctest.CtValue2, ), resource.TestCheckResourceAttr( resourceName, From e8094fc7bcd2db3234f686f0a0aae5db73e458c1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:58 -0400 Subject: [PATCH 167/180] ssoadmin: Use constants for test strings --- internal/service/ssoadmin/application_test.go | 12 ++++++------ internal/service/ssoadmin/permission_set_test.go | 12 ++++++------ .../service/ssoadmin/trusted_token_issuer_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/ssoadmin/application_test.go b/internal/service/ssoadmin/application_test.go index a7ed329bbad..b1d8825eb12 100644 --- a/internal/service/ssoadmin/application_test.go +++ b/internal/service/ssoadmin/application_test.go @@ -249,12 +249,12 @@ func TestAccSSOAdminApplication_tags(t *testing.T) { CheckDestroy: testAccCheckApplicationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccApplicationConfig_tags1(rName, testAccApplicationProviderARN, "key1", "value1"), + Config: testAccApplicationConfig_tags1(rName, testAccApplicationProviderARN, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -263,22 +263,22 @@ func TestAccSSOAdminApplication_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccApplicationConfig_tags2(rName, testAccApplicationProviderARN, "key1", "value1updated", "key2", "value2"), + Config: testAccApplicationConfig_tags2(rName, testAccApplicationProviderARN, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccApplicationConfig_tags1(rName, testAccApplicationProviderARN, "key2", "value2"), + Config: testAccApplicationConfig_tags1(rName, testAccApplicationProviderARN, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckApplicationExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/ssoadmin/permission_set_test.go b/internal/service/ssoadmin/permission_set_test.go index c387fed7112..dbf290d55c9 100644 --- a/internal/service/ssoadmin/permission_set_test.go +++ b/internal/service/ssoadmin/permission_set_test.go @@ -58,11 +58,11 @@ func TestAccSSOAdminPermissionSet_tags(t *testing.T) { CheckDestroy: testAccCheckPermissionSetDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccPermissionSetConfig_tags1(rName, "key1", "value1"), + Config: testAccPermissionSetConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSOAdminPermissionSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -71,12 +71,12 @@ func TestAccSSOAdminPermissionSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPermissionSetConfig_tags2(rName, "key1", "updatedvalue1", "key2", "value2"), + Config: testAccPermissionSetConfig_tags2(rName, acctest.CtKey1, "updatedvalue1", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSOAdminPermissionSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "updatedvalue1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -85,11 +85,11 @@ func TestAccSSOAdminPermissionSet_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPermissionSetConfig_tags1(rName, "key2", "value2"), + Config: testAccPermissionSetConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSOAdminPermissionSetExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/ssoadmin/trusted_token_issuer_test.go b/internal/service/ssoadmin/trusted_token_issuer_test.go index d62b41475be..815bb6ffb07 100644 --- a/internal/service/ssoadmin/trusted_token_issuer_test.go +++ b/internal/service/ssoadmin/trusted_token_issuer_test.go @@ -132,11 +132,11 @@ func TestAccSSOAdminTrustedTokenIssuer_tags(t *testing.T) { CheckDestroy: testAccCheckTrustedTokenIssuerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTrustedTokenIssuerConfigBase_tags(rName, "key1", "value1"), + Config: testAccTrustedTokenIssuerConfigBase_tags(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTrustedTokenIssuerExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -145,20 +145,20 @@ func TestAccSSOAdminTrustedTokenIssuer_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTrustedTokenIssuerConfigBase_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTrustedTokenIssuerConfigBase_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrustedTokenIssuerExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTrustedTokenIssuerConfigBase_tags(rName, "key2", "value2"), + Config: testAccTrustedTokenIssuerConfigBase_tags(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTrustedTokenIssuerExists(ctx, resourceName, &application), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 7dd52672201bfad91102175c06c1d7ed2df8e954 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:58 -0400 Subject: [PATCH 168/180] storagegateway: Use constants for test strings --- .../storagegateway/cached_iscsi_volume_test.go | 12 ++++++------ .../storagegateway/file_system_association_test.go | 12 ++++++------ internal/service/storagegateway/gateway_test.go | 12 ++++++------ .../service/storagegateway/nfs_file_share_test.go | 12 ++++++------ .../service/storagegateway/smb_file_share_test.go | 12 ++++++------ .../storagegateway/stored_iscsi_volume_test.go | 12 ++++++------ internal/service/storagegateway/tape_pool_test.go | 12 ++++++------ 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/internal/service/storagegateway/cached_iscsi_volume_test.go b/internal/service/storagegateway/cached_iscsi_volume_test.go index 38a6c9bd508..7e1c94abd3b 100644 --- a/internal/service/storagegateway/cached_iscsi_volume_test.go +++ b/internal/service/storagegateway/cached_iscsi_volume_test.go @@ -162,12 +162,12 @@ func TestAccStorageGatewayCachediSCSIVolume_tags(t *testing.T) { CheckDestroy: testAccCheckCachediSCSIVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCachediSCSIVolumeConfig_tags1(rName, "key1", "value1"), + Config: testAccCachediSCSIVolumeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCachediSCSIVolumeExists(ctx, resourceName, &cachedIscsiVolume), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+/volume/vol-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -176,22 +176,22 @@ func TestAccStorageGatewayCachediSCSIVolume_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccCachediSCSIVolumeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCachediSCSIVolumeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCachediSCSIVolumeExists(ctx, resourceName, &cachedIscsiVolume), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+/volume/vol-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCachediSCSIVolumeConfig_tags1(rName, "key2", "value2"), + Config: testAccCachediSCSIVolumeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCachediSCSIVolumeExists(ctx, resourceName, &cachedIscsiVolume), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+/volume/vol-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/storagegateway/file_system_association_test.go b/internal/service/storagegateway/file_system_association_test.go index 99aff79d568..2e5382c799c 100644 --- a/internal/service/storagegateway/file_system_association_test.go +++ b/internal/service/storagegateway/file_system_association_test.go @@ -74,12 +74,12 @@ func TestAccStorageGatewayFileSystemAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckFileSystemAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccFileSystemAssociationConfig_tags1(rName, domainName, username, "key1", "value1"), + Config: testAccFileSystemAssociationConfig_tags1(rName, domainName, username, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckFileSystemAssociationExists(ctx, resourceName, &fileSystemAssociation), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`fs-association/fsa-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -89,22 +89,22 @@ func TestAccStorageGatewayFileSystemAssociation_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrUsername, names.AttrPassword}, }, { - Config: testAccFileSystemAssociationConfig_tags2(rName, domainName, username, "key1", "value1updated", "key2", "value2"), + Config: testAccFileSystemAssociationConfig_tags2(rName, domainName, username, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFileSystemAssociationExists(ctx, resourceName, &fileSystemAssociation), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`fs-association/fsa-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccFileSystemAssociationConfig_tags1(rName, domainName, username, "key2", "value2"), + Config: testAccFileSystemAssociationConfig_tags1(rName, domainName, username, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckFileSystemAssociationExists(ctx, resourceName, &fileSystemAssociation), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`fs-association/fsa-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/storagegateway/gateway_test.go b/internal/service/storagegateway/gateway_test.go index 6e9d8bf6f03..07300704e91 100644 --- a/internal/service/storagegateway/gateway_test.go +++ b/internal/service/storagegateway/gateway_test.go @@ -248,12 +248,12 @@ func TestAccStorageGatewayGateway_tags(t *testing.T) { CheckDestroy: testAccCheckGatewayDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGatewayConfig_tags1(rName, "key1", "value1"), + Config: testAccGatewayConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGatewayExists(ctx, resourceName, &gateway), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -263,20 +263,20 @@ func TestAccStorageGatewayGateway_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"activation_key", "gateway_ip_address"}, }, { - Config: testAccGatewayConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccGatewayConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGatewayExists(ctx, resourceName, &gateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGatewayConfig_tags1(rName, "key2", "value2"), + Config: testAccGatewayConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGatewayExists(ctx, resourceName, &gateway), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/storagegateway/nfs_file_share_test.go b/internal/service/storagegateway/nfs_file_share_test.go index 338e443da26..705e4cf1009 100644 --- a/internal/service/storagegateway/nfs_file_share_test.go +++ b/internal/service/storagegateway/nfs_file_share_test.go @@ -123,12 +123,12 @@ func TestAccStorageGatewayNFSFileShare_tags(t *testing.T) { CheckDestroy: testAccCheckNFSFileShareDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccNFSFileShareConfig_tags1(rName, "key1", "value1"), + Config: testAccNFSFileShareConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckNFSFileShareExists(ctx, resourceName, &nfsFileShare), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`share/share-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -137,22 +137,22 @@ func TestAccStorageGatewayNFSFileShare_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccNFSFileShareConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccNFSFileShareConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNFSFileShareExists(ctx, resourceName, &nfsFileShare), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`share/share-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccNFSFileShareConfig_tags1(rName, "key2", "value2"), + Config: testAccNFSFileShareConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckNFSFileShareExists(ctx, resourceName, &nfsFileShare), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`share/share-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/storagegateway/smb_file_share_test.go b/internal/service/storagegateway/smb_file_share_test.go index 503f5195b00..ea27be4f755 100644 --- a/internal/service/storagegateway/smb_file_share_test.go +++ b/internal/service/storagegateway/smb_file_share_test.go @@ -321,11 +321,11 @@ func TestAccStorageGatewaySMBFileShare_tags(t *testing.T) { CheckDestroy: testAccCheckSMBFileShareDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccSMBFileShareConfig_tags1(rName, "key1", "value1"), + Config: testAccSMBFileShareConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckSMBFileShareExists(ctx, resourceName, &smbFileShare), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -334,20 +334,20 @@ func TestAccStorageGatewaySMBFileShare_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccSMBFileShareConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccSMBFileShareConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSMBFileShareExists(ctx, resourceName, &smbFileShare), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccSMBFileShareConfig_tags1(rName, "key2", "value2"), + Config: testAccSMBFileShareConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckSMBFileShareExists(ctx, resourceName, &smbFileShare), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/storagegateway/stored_iscsi_volume_test.go b/internal/service/storagegateway/stored_iscsi_volume_test.go index 6bb7423f275..e6042972f46 100644 --- a/internal/service/storagegateway/stored_iscsi_volume_test.go +++ b/internal/service/storagegateway/stored_iscsi_volume_test.go @@ -106,12 +106,12 @@ func TestAccStorageGatewayStorediSCSIVolume_tags(t *testing.T) { CheckDestroy: testAccCheckStorediSCSIVolumeDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccStorediSCSIVolumeConfig_tags1(rName, "key1", "value1"), + Config: testAccStorediSCSIVolumeConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckStorediSCSIVolumeExists(ctx, resourceName, &storedIscsiVolume), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+/volume/vol-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -120,22 +120,22 @@ func TestAccStorageGatewayStorediSCSIVolume_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccStorediSCSIVolumeConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccStorediSCSIVolumeConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStorediSCSIVolumeExists(ctx, resourceName, &storedIscsiVolume), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+/volume/vol-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccStorediSCSIVolumeConfig_tags1(rName, "key2", "value2"), + Config: testAccStorediSCSIVolumeConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckStorediSCSIVolumeExists(ctx, resourceName, &storedIscsiVolume), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "storagegateway", regexache.MustCompile(`gateway/sgw-.+/volume/vol-.+`)), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/storagegateway/tape_pool_test.go b/internal/service/storagegateway/tape_pool_test.go index 9dc39d35850..44ca880468f 100644 --- a/internal/service/storagegateway/tape_pool_test.go +++ b/internal/service/storagegateway/tape_pool_test.go @@ -97,11 +97,11 @@ func TestAccStorageGatewayTapePool_tags(t *testing.T) { CheckDestroy: testAccCheckTapePoolDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTapePoolConfig_tags1(rName, "key1", "value1"), + Config: testAccTapePoolConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTapePoolExists(ctx, resourceName, &TapePool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -110,20 +110,20 @@ func TestAccStorageGatewayTapePool_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTapePoolConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTapePoolConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTapePoolExists(ctx, resourceName, &TapePool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTapePoolConfig_tags1(rName, "key2", "value2"), + Config: testAccTapePoolConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTapePoolExists(ctx, resourceName, &TapePool), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 6687e3879424be0201d960d7bb7b30adff08fb89 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:58 -0400 Subject: [PATCH 169/180] swf: Use constants for test strings --- internal/service/swf/domain_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/service/swf/domain_test.go b/internal/service/swf/domain_test.go index 4ea11c86d7f..33ec824f37a 100644 --- a/internal/service/swf/domain_test.go +++ b/internal/service/swf/domain_test.go @@ -167,11 +167,11 @@ func TestAccSWFDomain_tags(t *testing.T) { CheckDestroy: testAccCheckDomainDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDomainConfig_tags1(rName, "key1", "value1"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -180,20 +180,20 @@ func TestAccSWFDomain_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDomainConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDomainConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDomainConfig_tags1(rName, "key2", "value2"), + Config: testAccDomainConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDomainExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From bc40b6f3fa1829771b1d5db81b0e66e3d9b82e0c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:58 -0400 Subject: [PATCH 170/180] synthetics: Use constants for test strings --- internal/service/synthetics/canary_test.go | 12 ++++++------ internal/service/synthetics/group_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/synthetics/canary_test.go b/internal/service/synthetics/canary_test.go index 17319018023..f6debe7a421 100644 --- a/internal/service/synthetics/canary_test.go +++ b/internal/service/synthetics/canary_test.go @@ -503,11 +503,11 @@ func TestAccSyntheticsCanary_tags(t *testing.T) { CheckDestroy: testAccCheckCanaryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCanaryConfig_tags1(rName, "key1", "value1"), + Config: testAccCanaryConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCanaryExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -517,20 +517,20 @@ func TestAccSyntheticsCanary_tags(t *testing.T) { ImportStateVerifyIgnore: []string{"zip_file", "start_canary", "delete_lambda"}, }, { - Config: testAccCanaryConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccCanaryConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCanaryExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCanaryConfig_tags1(rName, "key2", "value2"), + Config: testAccCanaryConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckCanaryExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/synthetics/group_test.go b/internal/service/synthetics/group_test.go index b5ec763c7aa..c940154711a 100644 --- a/internal/service/synthetics/group_test.go +++ b/internal/service/synthetics/group_test.go @@ -87,11 +87,11 @@ func TestAccSyntheticsGroup_tags(t *testing.T) { CheckDestroy: testAccCheckGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -100,20 +100,20 @@ func TestAccSyntheticsGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 7fd288f65d15c11eb67e0ce3de670feb20f4dc83 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:58 -0400 Subject: [PATCH 171/180] timestreamwrite: Use constants for test strings --- .../service/timestreamwrite/database_test.go | 18 +++++++++--------- internal/service/timestreamwrite/table_test.go | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/timestreamwrite/database_test.go b/internal/service/timestreamwrite/database_test.go index 21f3f2a3583..77732021fc3 100644 --- a/internal/service/timestreamwrite/database_test.go +++ b/internal/service/timestreamwrite/database_test.go @@ -156,35 +156,35 @@ func TestAccTimestreamWriteDatabase_tags(t *testing.T) { CheckDestroy: testAccCheckDatabaseDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDatabaseConfig_tags1(rName, "key1", "value1"), + Config: testAccDatabaseConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { - Config: testAccDatabaseConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccDatabaseConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { - Config: testAccDatabaseConfig_tags1(rName, "key2", "value2"), + Config: testAccDatabaseConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckDatabaseExists(ctx, resourceName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/timestreamwrite/table_test.go b/internal/service/timestreamwrite/table_test.go index f415f5cccbf..5abea41025c 100644 --- a/internal/service/timestreamwrite/table_test.go +++ b/internal/service/timestreamwrite/table_test.go @@ -280,35 +280,35 @@ func TestAccTimestreamWriteTable_tags(t *testing.T) { CheckDestroy: testAccCheckTableDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTableConfig_tags1(rName, "key1", "value1"), + Config: testAccTableConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTableExists(ctx, resourceName, &table), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { - Config: testAccTableConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTableConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTableExists(ctx, resourceName, &table), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { - Config: testAccTableConfig_tags1(rName, "key2", "value2"), + Config: testAccTableConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTableExists(ctx, resourceName, &table), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { From 4f3cc2672d54a525e2b95aa8a713579d7cf48705 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:58 -0400 Subject: [PATCH 172/180] transcribe: Use constants for test strings --- internal/service/transcribe/language_model_test.go | 14 +++++++------- .../service/transcribe/medical_vocabulary_test.go | 14 +++++++------- .../service/transcribe/vocabulary_filter_test.go | 14 +++++++------- internal/service/transcribe/vocabulary_test.go | 14 +++++++------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/internal/service/transcribe/language_model_test.go b/internal/service/transcribe/language_model_test.go index 118bba93757..02875c5ec09 100644 --- a/internal/service/transcribe/language_model_test.go +++ b/internal/service/transcribe/language_model_test.go @@ -79,28 +79,28 @@ func TestAccTranscribeLanguageModel_updateTags(t *testing.T) { CheckDestroy: testAccCheckLanguageModelDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccLanguageModelConfig_tags1(rName, "key1", "value1"), + Config: testAccLanguageModelConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckLanguageModelExists(ctx, resourceName, &languageModel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccLanguageModelConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccLanguageModelConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLanguageModelExists(ctx, resourceName, &languageModel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccLanguageModelConfig_tags1(rName, "key2", "value2"), + Config: testAccLanguageModelConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckLanguageModelExists(ctx, resourceName, &languageModel), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transcribe/medical_vocabulary_test.go b/internal/service/transcribe/medical_vocabulary_test.go index ac9e178a95e..539f351807a 100644 --- a/internal/service/transcribe/medical_vocabulary_test.go +++ b/internal/service/transcribe/medical_vocabulary_test.go @@ -121,28 +121,28 @@ func TestAccTranscribeMedicalVocabulary_updateTags(t *testing.T) { CheckDestroy: testAccCheckMedicalVocabularyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccMedicalVocabularyConfig_tags1(rName, "key1", "value1"), + Config: testAccMedicalVocabularyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckMedicalVocabularyExists(ctx, resourceName, &medicalVocabulary), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccMedicalVocabularyConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccMedicalVocabularyConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMedicalVocabularyExists(ctx, resourceName, &medicalVocabulary), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccMedicalVocabularyConfig_tags1(rName, "key2", "value2"), + Config: testAccMedicalVocabularyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckMedicalVocabularyExists(ctx, resourceName, &medicalVocabulary), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transcribe/vocabulary_filter_test.go b/internal/service/transcribe/vocabulary_filter_test.go index 88c75b60978..2464cb8e0fa 100644 --- a/internal/service/transcribe/vocabulary_filter_test.go +++ b/internal/service/transcribe/vocabulary_filter_test.go @@ -156,28 +156,28 @@ func TestAccTranscribeVocabularyFilter_updateTags(t *testing.T) { CheckDestroy: testAccCheckVocabularyFilterDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVocabularyFilterConfig_tags1(rName, "key1", "value1"), + Config: testAccVocabularyFilterConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVocabularyFilterExists(ctx, resourceName, &vocabularyFilter), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVocabularyFilterConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccVocabularyFilterConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVocabularyFilterExists(ctx, resourceName, &vocabularyFilter), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVocabularyFilterConfig_tags1(rName, "key2", "value2"), + Config: testAccVocabularyFilterConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVocabularyFilterExists(ctx, resourceName, &vocabularyFilter), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transcribe/vocabulary_test.go b/internal/service/transcribe/vocabulary_test.go index f5f8ceaf39f..1f5c7ecf353 100644 --- a/internal/service/transcribe/vocabulary_test.go +++ b/internal/service/transcribe/vocabulary_test.go @@ -156,28 +156,28 @@ func TestAccTranscribeVocabulary_updateTags(t *testing.T) { CheckDestroy: testAccCheckVocabularyDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccVocabularyConfig_tags1(rName, "key1", "value1"), + Config: testAccVocabularyConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckVocabularyExists(ctx, resourceName, &vocabulary), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccVocabularyConfig_tags2(rName, "key1", "value1", "key2", "value2"), + Config: testAccVocabularyConfig_tags2(rName, acctest.CtKey1, acctest.CtValue1, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVocabularyExists(ctx, resourceName, &vocabulary), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccVocabularyConfig_tags1(rName, "key2", "value2"), + Config: testAccVocabularyConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckVocabularyExists(ctx, resourceName, &vocabulary), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From ad6cf59fb8dcd16cb5c299525c20474fe9327a3f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:59 -0400 Subject: [PATCH 173/180] transfer: Use constants for test strings --- internal/service/transfer/agreement_test.go | 12 +++++----- internal/service/transfer/certificate_test.go | 12 +++++----- internal/service/transfer/connector_test.go | 12 +++++----- internal/service/transfer/profile_test.go | 12 +++++----- internal/service/transfer/server_test.go | 12 +++++----- internal/service/transfer/tag_test.go | 18 +++++++------- internal/service/transfer/user_test.go | 12 +++++----- internal/service/transfer/workflow_test.go | 24 +++++++++---------- 8 files changed, 57 insertions(+), 57 deletions(-) diff --git a/internal/service/transfer/agreement_test.go b/internal/service/transfer/agreement_test.go index 76179cf9836..5a96795cf4d 100644 --- a/internal/service/transfer/agreement_test.go +++ b/internal/service/transfer/agreement_test.go @@ -113,11 +113,11 @@ func testAccAgreement_tags(t *testing.T) { CheckDestroy: testAccCheckAgreementDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAgreementConfig_tags1(rName, baseDirectory, "key1", "value1"), + Config: testAccAgreementConfig_tags1(rName, baseDirectory, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAgreementExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -127,20 +127,20 @@ func testAccAgreement_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrStatus}, }, { - Config: testAccAgreementConfig_tags2(rName, baseDirectory, "key1", "value1updated", "key2", "value2"), + Config: testAccAgreementConfig_tags2(rName, baseDirectory, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAgreementExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAgreementConfig_tags1(rName, baseDirectory, "key2", "value2"), + Config: testAccAgreementConfig_tags1(rName, baseDirectory, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAgreementExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transfer/certificate_test.go b/internal/service/transfer/certificate_test.go index 3a02769558d..12f04564951 100644 --- a/internal/service/transfer/certificate_test.go +++ b/internal/service/transfer/certificate_test.go @@ -222,11 +222,11 @@ func TestAccTransferCertificate_tags(t *testing.T) { CheckDestroy: testAccCheckCertificateDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccCertificateConfig_tags1(certificate, "key1", "value1"), + Config: testAccCertificateConfig_tags1(certificate, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -236,20 +236,20 @@ func TestAccTransferCertificate_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrPrivateKey, names.AttrCertificate, names.AttrCertificateChain}, }, { - Config: testAccCertificateConfig_tags2(certificate, "key1", "value1updated", "key2", "value2"), + Config: testAccCertificateConfig_tags2(certificate, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccCertificateConfig_tags1(certificate, "key2", "value2"), + Config: testAccCertificateConfig_tags1(certificate, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckCertificateExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transfer/connector_test.go b/internal/service/transfer/connector_test.go index ea3e1697c3c..08231a9fab8 100644 --- a/internal/service/transfer/connector_test.go +++ b/internal/service/transfer/connector_test.go @@ -176,11 +176,11 @@ func TestAccTransferConnector_tags(t *testing.T) { CheckDestroy: testAccCheckConnectorDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectorConfig_tags1(rName, "http://www.example.com", "key1", "value1"), + Config: testAccConnectorConfig_tags1(rName, "http://www.example.com", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckConnectorExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -189,20 +189,20 @@ func TestAccTransferConnector_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConnectorConfig_tags2(rName, "http://www.example.com", "key1", "value1updated", "key2", "value2"), + Config: testAccConnectorConfig_tags2(rName, "http://www.example.com", acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckConnectorExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConnectorConfig_tags1(rName, "http://www.example.com", "key2", "value2"), + Config: testAccConnectorConfig_tags1(rName, "http://www.example.com", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckConnectorExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transfer/profile_test.go b/internal/service/transfer/profile_test.go index b376c046490..7e624dfe187 100644 --- a/internal/service/transfer/profile_test.go +++ b/internal/service/transfer/profile_test.go @@ -135,11 +135,11 @@ func TestAccTransferProfile_tags(t *testing.T) { CheckDestroy: testAccCheckProfileDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccProfileConfig_tags1(rName, "key1", "value1"), + Config: testAccProfileConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProfileExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -148,20 +148,20 @@ func TestAccTransferProfile_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccProfileConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccProfileConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProfileExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccProfileConfig_tags1(rName, "key2", "value2"), + Config: testAccProfileConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckProfileExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transfer/server_test.go b/internal/service/transfer/server_test.go index adcb6de2a58..2df5641fabb 100644 --- a/internal/service/transfer/server_test.go +++ b/internal/service/transfer/server_test.go @@ -150,11 +150,11 @@ func testAccServer_tags(t *testing.T) { CheckDestroy: testAccCheckServerDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServerConfig_tags1("key1", "value1"), + Config: testAccServerConfig_tags1(acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -164,20 +164,20 @@ func testAccServer_tags(t *testing.T) { ImportStateVerifyIgnore: []string{names.AttrForceDestroy}, }, { - Config: testAccServerConfig_tags2("key1", "value1updated", "key2", "value2"), + Config: testAccServerConfig_tags2(acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServerConfig_tags1("key2", "value2"), + Config: testAccServerConfig_tags1(acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServerExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transfer/tag_test.go b/internal/service/transfer/tag_test.go index 62086975ade..6decbf036aa 100644 --- a/internal/service/transfer/tag_test.go +++ b/internal/service/transfer/tag_test.go @@ -26,11 +26,11 @@ func testAccTag_basic(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -54,7 +54,7 @@ func testAccTag_disappears(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), acctest.CheckResourceDisappears(ctx, acctest.Provider, tftransfer.ResourceTag(), resourceName), @@ -77,11 +77,11 @@ func testAccTag_value(t *testing.T) { CheckDestroy: testAccCheckTagDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTagConfig_basic(rName, "key1", "value1"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), - resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, names.AttrValue, acctest.CtValue1), ), }, { @@ -90,10 +90,10 @@ func testAccTag_value(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTagConfig_basic(rName, "key1", "value1updated"), + Config: testAccTagConfig_basic(rName, acctest.CtKey1, "value1updated"), Check: resource.ComposeTestCheckFunc( testAccCheckTagExists(ctx, resourceName), - resource.TestCheckResourceAttr(resourceName, names.AttrKey, "key1"), + resource.TestCheckResourceAttr(resourceName, names.AttrKey, acctest.CtKey1), resource.TestCheckResourceAttr(resourceName, names.AttrValue, "value1updated"), ), }, diff --git a/internal/service/transfer/user_test.go b/internal/service/transfer/user_test.go index 35a216b3edd..07c0e24673a 100644 --- a/internal/service/transfer/user_test.go +++ b/internal/service/transfer/user_test.go @@ -89,11 +89,11 @@ func testAccUser_tags(t *testing.T) { CheckDestroy: testAccCheckUserDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccUserConfig_tags1(rName, "key1", "value1"), + Config: testAccUserConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -102,20 +102,20 @@ func testAccUser_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccUserConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccUserConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccUserConfig_tags1(rName, "key2", "value2"), + Config: testAccUserConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckUserExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/transfer/workflow_test.go b/internal/service/transfer/workflow_test.go index c09b8caa6c9..b6360241a7a 100644 --- a/internal/service/transfer/workflow_test.go +++ b/internal/service/transfer/workflow_test.go @@ -148,11 +148,11 @@ func TestAccTransferWorkflow_tags(t *testing.T) { CheckDestroy: testAccCheckWorkflowDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWorkflowConfig_tags1(rName, "key1", "value1"), + Config: testAccWorkflowConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -161,20 +161,20 @@ func TestAccTransferWorkflow_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWorkflowConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWorkflowConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWorkflowConfig_tags1(rName, "key2", "value2"), + Config: testAccWorkflowConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWorkflowExists(ctx, resourceName, &conf), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, @@ -231,7 +231,7 @@ func TestAccTransferWorkflow_allSteps(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "steps.0.copy_step_details.0.destination_file_location.0.s3_file_location.0.bucket", "testing"), resource.TestCheckResourceAttr(resourceName, "steps.0.copy_step_details.0.destination_file_location.0.s3_file_location.0.key", "k1"), resource.TestCheckResourceAttr(resourceName, "steps.0.copy_step_details.0.name", rName), - resource.TestCheckResourceAttr(resourceName, "steps.0.copy_step_details.0.overwrite_existing", "TRUE"), + resource.TestCheckResourceAttr(resourceName, "steps.0.copy_step_details.0.overwrite_existing", acctest.CtTrueCaps), resource.TestCheckResourceAttr(resourceName, "steps.0.copy_step_details.0.source_file_location", "${original.file}"), resource.TestCheckResourceAttr(resourceName, "steps.0.custom_step_details.#", acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "steps.0.decrypt_step_details.#", acctest.CtZero), @@ -257,7 +257,7 @@ func TestAccTransferWorkflow_allSteps(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.destination_file_location.0.efs_file_location.0.path", "/test"), resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.destination_file_location.0.s3_file_location.#", acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.name", rName), - resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.overwrite_existing", "FALSE"), + resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.overwrite_existing", acctest.CtFalseCaps), resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.source_file_location", "${original.file}"), resource.TestCheckResourceAttr(resourceName, "steps.2.decrypt_step_details.0.type", "PGP"), resource.TestCheckResourceAttr(resourceName, "steps.2.delete_step_details.#", acctest.CtZero), @@ -279,10 +279,10 @@ func TestAccTransferWorkflow_allSteps(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.name", rName), resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.source_file_location", "${original.file}"), resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.#", acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.0.key", "key1"), - resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.0.value", "value1"), - resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.1.key", "key2"), - resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.1.value", "value2"), + resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.0.key", acctest.CtKey1), + resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.0.value", acctest.CtValue1), + resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.1.key", acctest.CtKey2), + resource.TestCheckResourceAttr(resourceName, "steps.4.tag_step_details.0.tags.1.value", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "steps.4.type", "TAG"), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), ), From 57d93b765dd623a29090af19d107902349fdc181 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:59 -0400 Subject: [PATCH 174/180] vpclattice: Use constants for test strings --- .../vpclattice/access_log_subscription_test.go | 12 ++++++------ internal/service/vpclattice/listener_rule_test.go | 8 ++++---- internal/service/vpclattice/listener_test.go | 8 ++++---- .../service_network_service_association_test.go | 12 ++++++------ internal/service/vpclattice/service_network_test.go | 12 ++++++------ .../service_network_vpc_association_test.go | 12 ++++++------ internal/service/vpclattice/service_test.go | 12 ++++++------ internal/service/vpclattice/target_group_test.go | 12 ++++++------ 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/internal/service/vpclattice/access_log_subscription_test.go b/internal/service/vpclattice/access_log_subscription_test.go index 33c96bccec2..bd17d25c64c 100644 --- a/internal/service/vpclattice/access_log_subscription_test.go +++ b/internal/service/vpclattice/access_log_subscription_test.go @@ -186,11 +186,11 @@ func TestAccVPCLatticeAccessLogSubscription_tags(t *testing.T) { CheckDestroy: testAccCheckAccessLogSubscriptionDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccAccessLogSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccAccessLogSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessLogSubscriptionExists(ctx, resourceName, &accesslogsubscription1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -199,20 +199,20 @@ func TestAccVPCLatticeAccessLogSubscription_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAccessLogSubscriptionConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccAccessLogSubscriptionConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckAccessLogSubscriptionExists(ctx, resourceName, &accesslogsubscription2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccAccessLogSubscriptionConfig_tags1(rName, "key1", "value1"), + Config: testAccAccessLogSubscriptionConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckAccessLogSubscriptionExists(ctx, resourceName, &accesslogsubscription3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, }, diff --git a/internal/service/vpclattice/listener_rule_test.go b/internal/service/vpclattice/listener_rule_test.go index 734ee874290..0be78153ae8 100644 --- a/internal/service/vpclattice/listener_rule_test.go +++ b/internal/service/vpclattice/listener_rule_test.go @@ -132,11 +132,11 @@ func TestAccVPCLatticeListenerRule_tags(t *testing.T) { CheckDestroy: testAccChecklistenerRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccListenerRuleConfig_tags1(rName, "key1", "value1"), + Config: testAccListenerRuleConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckListenerRuleExists(ctx, resourceName, &listenerRule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -145,12 +145,12 @@ func TestAccVPCLatticeListenerRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccListenerRuleConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccListenerRuleConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckListenerRuleExists(ctx, resourceName, &listenerRule), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/vpclattice/listener_test.go b/internal/service/vpclattice/listener_test.go index 9fd714132f9..07fd2bdaab7 100644 --- a/internal/service/vpclattice/listener_test.go +++ b/internal/service/vpclattice/listener_test.go @@ -429,20 +429,20 @@ func TestAccVPCLatticeListener_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccListenerConfig_tags2(rName, "key0", "value0updated", "key1", "value1"), + Config: testAccListenerConfig_tags2(rName, "key0", "value0updated", acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckListenerExists(ctx, resourceName, &listener), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key0", "value0updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccListenerConfig_tags1(rName, "key2", "value2"), + Config: testAccListenerConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckListenerExists(ctx, resourceName, &listener), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/vpclattice/service_network_service_association_test.go b/internal/service/vpclattice/service_network_service_association_test.go index 738cffebb06..d81c8f428fe 100644 --- a/internal/service/vpclattice/service_network_service_association_test.go +++ b/internal/service/vpclattice/service_network_service_association_test.go @@ -134,11 +134,11 @@ func TestAccVPCLatticeServiceNetworkServiceAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckServiceNetworkServiceAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceNetworkServiceAssociationConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceNetworkServiceAssociationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkServiceAssociationExists(ctx, resourceName, &servicenetworkasc1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -147,20 +147,20 @@ func TestAccVPCLatticeServiceNetworkServiceAssociation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccServiceNetworkServiceAssociationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceNetworkServiceAssociationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkServiceAssociationExists(ctx, resourceName, &servicenetworkasc2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceNetworkServiceAssociationConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceNetworkServiceAssociationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkServiceAssociationExists(ctx, resourceName, &service3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/vpclattice/service_network_test.go b/internal/service/vpclattice/service_network_test.go index fdd22ee0261..d2906267de0 100644 --- a/internal/service/vpclattice/service_network_test.go +++ b/internal/service/vpclattice/service_network_test.go @@ -198,11 +198,11 @@ func TestAccVPCLatticeServiceNetwork_tags(t *testing.T) { CheckDestroy: testAccCheckServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceNetworkConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceNetworkConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkExists(ctx, resourceName, &serviceNetwork1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -211,20 +211,20 @@ func TestAccVPCLatticeServiceNetwork_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccServiceNetworkConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceNetworkConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkExists(ctx, resourceName, &serviceNetwork2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceNetworkConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceNetworkConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkExists(ctx, resourceName, &serviceNetwork3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/vpclattice/service_network_vpc_association_test.go b/internal/service/vpclattice/service_network_vpc_association_test.go index 9c5ba0f0743..216cf11f2a8 100644 --- a/internal/service/vpclattice/service_network_vpc_association_test.go +++ b/internal/service/vpclattice/service_network_vpc_association_test.go @@ -171,11 +171,11 @@ func TestAccVPCLatticeServiceNetworkVPCAssociation_tags(t *testing.T) { CheckDestroy: testAccCheckServiceNetworkVPCAssociationDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceNetworkVPCAssociationConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceNetworkVPCAssociationConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkVPCAssociationExists(ctx, resourceName, &servicenetworkvpcasc1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -184,20 +184,20 @@ func TestAccVPCLatticeServiceNetworkVPCAssociation_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccServiceNetworkVPCAssociationConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceNetworkVPCAssociationConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkVPCAssociationExists(ctx, resourceName, &servicenetworkvpcasc2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceNetworkVPCAssociationConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceNetworkVPCAssociationConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceNetworkVPCAssociationExists(ctx, resourceName, &service3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/vpclattice/service_test.go b/internal/service/vpclattice/service_test.go index 01a167782af..ccdb52824eb 100644 --- a/internal/service/vpclattice/service_test.go +++ b/internal/service/vpclattice/service_test.go @@ -133,11 +133,11 @@ func TestAccVPCLatticeService_tags(t *testing.T) { CheckDestroy: testAccCheckServiceDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccServiceConfig_tags1(rName, "key1", "value1"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName, &service1), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -146,20 +146,20 @@ func TestAccVPCLatticeService_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccServiceConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccServiceConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName, &service2), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccServiceConfig_tags1(rName, "key2", "value2"), + Config: testAccServiceConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckServiceExists(ctx, resourceName, &service3), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/vpclattice/target_group_test.go b/internal/service/vpclattice/target_group_test.go index fbf722e183c..f6dba240f8c 100644 --- a/internal/service/vpclattice/target_group_test.go +++ b/internal/service/vpclattice/target_group_test.go @@ -118,11 +118,11 @@ func TestAccVPCLatticeTargetGroup_tags(t *testing.T) { CheckDestroy: testAccCheckTargetGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccTargetGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccTargetGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckTargetGroupExists(ctx, resourceName, &targetGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -131,20 +131,20 @@ func TestAccVPCLatticeTargetGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccTargetGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccTargetGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTargetGroupExists(ctx, resourceName, &targetGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccTargetGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccTargetGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckTargetGroupExists(ctx, resourceName, &targetGroup), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 6b729974989836de00e079b1670fec0f73cc914c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:55:59 -0400 Subject: [PATCH 175/180] waf: Use constants for test strings --- internal/service/waf/rate_based_rule_test.go | 12 ++++++------ internal/service/waf/rule_group_test.go | 12 ++++++------ internal/service/waf/rule_test.go | 12 ++++++------ internal/service/waf/web_acl_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/waf/rate_based_rule_test.go b/internal/service/waf/rate_based_rule_test.go index c4b4b6b48d5..918940c5321 100644 --- a/internal/service/waf/rate_based_rule_test.go +++ b/internal/service/waf/rate_based_rule_test.go @@ -278,32 +278,32 @@ func testAccWAFRateBasedRule_tags(t *testing.T) { CheckDestroy: testAccCheckRateBasedRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRateBasedRuleConfig_tags1(ruleName, "key1", "value1"), + Config: testAccRateBasedRuleConfig_tags1(ruleName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRateBasedRuleExists(ctx, resourceName, &rule), acctest.MatchResourceAttrGlobalARN(resourceName, names.AttrARN, "waf", regexache.MustCompile(`ratebasedrule/.+`)), resource.TestCheckResourceAttr(resourceName, names.AttrName, ruleName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccRateBasedRuleConfig_tags2(ruleName, "key1", "value1updated", "key2", "value2"), + Config: testAccRateBasedRuleConfig_tags2(ruleName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRateBasedRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrName, ruleName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRateBasedRuleConfig_tags1(ruleName, "key2", "value2"), + Config: testAccRateBasedRuleConfig_tags1(ruleName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckRateBasedRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, names.AttrName, ruleName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/waf/rule_group_test.go b/internal/service/waf/rule_group_test.go index 6fa70724f90..79af7eb9fab 100644 --- a/internal/service/waf/rule_group_test.go +++ b/internal/service/waf/rule_group_test.go @@ -241,34 +241,34 @@ func TestAccWAFRuleGroup_tags(t *testing.T) { CheckDestroy: testAccCheckWebACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleGroupConfig_tags1(groupName, "key1", "value1"), + Config: testAccRuleGroupConfig_tags1(groupName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, names.AttrName, groupName), resource.TestCheckResourceAttr(resourceName, "activated_rule.#", acctest.CtZero), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccRuleGroupConfig_tags2(groupName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleGroupConfig_tags2(groupName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, names.AttrName, groupName), resource.TestCheckResourceAttr(resourceName, "activated_rule.#", acctest.CtZero), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleGroupConfig_tags1(groupName, "key2", "value2"), + Config: testAccRuleGroupConfig_tags1(groupName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, names.AttrName, groupName), resource.TestCheckResourceAttr(resourceName, "activated_rule.#", acctest.CtZero), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/waf/rule_test.go b/internal/service/waf/rule_test.go index 542e05ea3fc..f4e3fb79a49 100644 --- a/internal/service/waf/rule_test.go +++ b/internal/service/waf/rule_test.go @@ -250,18 +250,18 @@ func TestAccWAFRule_tags(t *testing.T) { CheckDestroy: testAccCheckWebACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleConfig_tags1(ruleName, "key1", "value1"), + Config: testAccRuleConfig_tags1(ruleName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, "predicates.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, names.AttrMetricName, ruleName), resource.TestCheckResourceAttr(resourceName, names.AttrName, ruleName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { - Config: testAccRuleConfig_tags2(ruleName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleConfig_tags2(ruleName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, "predicates.#", acctest.CtOne), @@ -269,18 +269,18 @@ func TestAccWAFRule_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrName, ruleName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleConfig_tags1(ruleName, "key2", "value2"), + Config: testAccRuleConfig_tags1(ruleName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &rule), resource.TestCheckResourceAttr(resourceName, "predicates.#", acctest.CtOne), resource.TestCheckResourceAttr(resourceName, names.AttrMetricName, ruleName), resource.TestCheckResourceAttr(resourceName, names.AttrName, ruleName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { diff --git a/internal/service/waf/web_acl_test.go b/internal/service/waf/web_acl_test.go index f45ef0fc47d..d3ef7ed0f7c 100644 --- a/internal/service/waf/web_acl_test.go +++ b/internal/service/waf/web_acl_test.go @@ -274,7 +274,7 @@ func TestAccWAFWebACL_tags(t *testing.T) { CheckDestroy: testAccCheckWebACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWebACLConfig_tags1(rName, "key1", "value1"), + Config: testAccWebACLConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", acctest.CtOne), @@ -282,12 +282,12 @@ func TestAccWAFWebACL_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrMetricName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "rules.#", acctest.CtZero), ), }, { - Config: testAccWebACLConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccWebACLConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", acctest.CtOne), @@ -296,12 +296,12 @@ func TestAccWAFWebACL_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "rules.#", acctest.CtZero), ), }, { - Config: testAccWebACLConfig_tags1(rName, "key2", "value2"), + Config: testAccWebACLConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", acctest.CtOne), @@ -309,7 +309,7 @@ func TestAccWAFWebACL_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, names.AttrMetricName, rName), resource.TestCheckResourceAttr(resourceName, names.AttrName, rName), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), resource.TestCheckResourceAttr(resourceName, "rules.#", acctest.CtZero), ), }, From db8a1097b5a68dd4e2d9d49dbcdf58a5a90b03c5 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:56:00 -0400 Subject: [PATCH 176/180] wafregional: Use constants for test strings --- internal/service/wafregional/rate_based_rule_test.go | 12 ++++++------ internal/service/wafregional/rule_group_test.go | 12 ++++++------ internal/service/wafregional/rule_test.go | 12 ++++++------ internal/service/wafregional/web_acl_test.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/wafregional/rate_based_rule_test.go b/internal/service/wafregional/rate_based_rule_test.go index c5102a3a856..74507c6ddb3 100644 --- a/internal/service/wafregional/rate_based_rule_test.go +++ b/internal/service/wafregional/rate_based_rule_test.go @@ -62,11 +62,11 @@ func TestAccWAFRegionalRateBasedRule_tags(t *testing.T) { CheckDestroy: testAccCheckRateBasedRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRateBasedRuleConfig_tags1(wafRuleName, "key1", "value1"), + Config: testAccRateBasedRuleConfig_tags1(wafRuleName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRateBasedRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -75,20 +75,20 @@ func TestAccWAFRegionalRateBasedRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRateBasedRuleConfig_tags2(wafRuleName, "key1", "value1updated", "key2", "value2"), + Config: testAccRateBasedRuleConfig_tags2(wafRuleName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRateBasedRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRateBasedRuleConfig_tags1(wafRuleName, "key2", "value2"), + Config: testAccRateBasedRuleConfig_tags1(wafRuleName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRateBasedRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/wafregional/rule_group_test.go b/internal/service/wafregional/rule_group_test.go index 7ff121a16ff..c1f07325d85 100644 --- a/internal/service/wafregional/rule_group_test.go +++ b/internal/service/wafregional/rule_group_test.go @@ -79,12 +79,12 @@ func TestAccWAFRegionalRuleGroup_tags(t *testing.T) { CheckDestroy: testAccCheckRuleGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleGroupConfig_tags1(ruleName, groupName, "key1", "value1"), + Config: testAccRuleGroupConfig_tags1(ruleName, groupName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, "aws_wafregional_rule.test", &rule), testAccCheckRuleGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -93,22 +93,22 @@ func TestAccWAFRegionalRuleGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRuleGroupConfig_tags2(ruleName, groupName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleGroupConfig_tags2(ruleName, groupName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, "aws_wafregional_rule.test", &rule), testAccCheckRuleGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleGroupConfig_tags1(ruleName, groupName, "key2", "value2"), + Config: testAccRuleGroupConfig_tags1(ruleName, groupName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, "aws_wafregional_rule.test", &rule), testAccCheckRuleGroupExists(ctx, resourceName, &group), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/wafregional/rule_test.go b/internal/service/wafregional/rule_test.go index f2449871151..44ec563bdf8 100644 --- a/internal/service/wafregional/rule_test.go +++ b/internal/service/wafregional/rule_test.go @@ -65,11 +65,11 @@ func TestAccWAFRegionalRule_tags(t *testing.T) { CheckDestroy: testAccCheckRuleDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleConfig_tags1(wafRuleName, "key1", "value1"), + Config: testAccRuleConfig_tags1(wafRuleName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -78,20 +78,20 @@ func TestAccWAFRegionalRule_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccRuleConfig_tags2(wafRuleName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleConfig_tags2(wafRuleName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleConfig_tags1(wafRuleName, "key2", "value2"), + Config: testAccRuleConfig_tags1(wafRuleName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/wafregional/web_acl_test.go b/internal/service/wafregional/web_acl_test.go index fee68481c95..5ca9159e8d0 100644 --- a/internal/service/wafregional/web_acl_test.go +++ b/internal/service/wafregional/web_acl_test.go @@ -68,11 +68,11 @@ func TestAccWAFRegionalWebACL_tags(t *testing.T) { CheckDestroy: testAccCheckWebACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWebACLConfig_tags1(wafAclName, "key1", "value1"), + Config: testAccWebACLConfig_tags1(wafAclName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -81,20 +81,20 @@ func TestAccWAFRegionalWebACL_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccWebACLConfig_tags2(wafAclName, "key1", "value1updated", "key2", "value2"), + Config: testAccWebACLConfig_tags2(wafAclName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWebACLConfig_tags1(wafAclName, "key2", "value2"), + Config: testAccWebACLConfig_tags1(wafAclName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 842082e29a08c7e80400c42e9255a32776976e87 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:56:00 -0400 Subject: [PATCH 177/180] wafv2: Use constants for test strings --- internal/service/wafv2/rule_group_test.go | 12 ++++++------ internal/service/wafv2/web_acl_test.go | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/service/wafv2/rule_group_test.go b/internal/service/wafv2/rule_group_test.go index a53fea08288..721c0a807eb 100644 --- a/internal/service/wafv2/rule_group_test.go +++ b/internal/service/wafv2/rule_group_test.go @@ -1937,11 +1937,11 @@ func TestAccWAFV2RuleGroup_tags(t *testing.T) { CheckDestroy: testAccCheckRuleGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccRuleGroupConfig_tags1(ruleGroupName, "key1", "value1"), + Config: testAccRuleGroupConfig_tags1(ruleGroupName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1951,20 +1951,20 @@ func TestAccWAFV2RuleGroup_tags(t *testing.T) { ImportStateIdFunc: testAccRuleGroupImportStateIdFunc(resourceName), }, { - Config: testAccRuleGroupConfig_tags2(ruleGroupName, "key1", "value1updated", "key2", "value2"), + Config: testAccRuleGroupConfig_tags2(ruleGroupName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccRuleGroupConfig_tags1(ruleGroupName, "key2", "value2"), + Config: testAccRuleGroupConfig_tags1(ruleGroupName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckRuleGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/wafv2/web_acl_test.go b/internal/service/wafv2/web_acl_test.go index 2c19b36b765..366c623e6f3 100644 --- a/internal/service/wafv2/web_acl_test.go +++ b/internal/service/wafv2/web_acl_test.go @@ -1135,7 +1135,7 @@ func TestAccWAFV2WebACL_ByteMatchStatement_basic(t *testing.T) { CheckDestroy: testAccCheckWebACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWebACLConfig_byteMatchStatement(webACLName, string(awstypes.PositionalConstraintContainsWord), "value1"), + Config: testAccWebACLConfig_byteMatchStatement(webACLName, string(awstypes.PositionalConstraintContainsWord), acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "wafv2", regexache.MustCompile(`regional/webacl/.+$`)), @@ -1147,7 +1147,7 @@ func TestAccWAFV2WebACL_ByteMatchStatement_basic(t *testing.T) { "statement.0.byte_match_statement.0.field_to_match.#": acctest.CtOne, "statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#": acctest.CtOne, "statement.0.byte_match_statement.0.positional_constraint": "CONTAINS_WORD", - "statement.0.byte_match_statement.0.search_string": "value1", + "statement.0.byte_match_statement.0.search_string": acctest.CtValue1, "statement.0.byte_match_statement.0.text_transformation.#": acctest.CtOne, "statement.0.byte_match_statement.0.text_transformation.0.priority": acctest.CtZero, "statement.0.byte_match_statement.0.text_transformation.0.type": "NONE", @@ -1155,7 +1155,7 @@ func TestAccWAFV2WebACL_ByteMatchStatement_basic(t *testing.T) { ), }, { - Config: testAccWebACLConfig_byteMatchStatement(webACLName, string(awstypes.PositionalConstraintExactly), "value2"), + Config: testAccWebACLConfig_byteMatchStatement(webACLName, string(awstypes.PositionalConstraintExactly), acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), acctest.MatchResourceAttrRegionalARN(resourceName, names.AttrARN, "wafv2", regexache.MustCompile(`regional/webacl/.+$`)), @@ -1167,7 +1167,7 @@ func TestAccWAFV2WebACL_ByteMatchStatement_basic(t *testing.T) { "statement.0.byte_match_statement.0.field_to_match.#": acctest.CtOne, "statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#": acctest.CtOne, "statement.0.byte_match_statement.0.positional_constraint": "EXACTLY", - "statement.0.byte_match_statement.0.search_string": "value2", + "statement.0.byte_match_statement.0.search_string": acctest.CtValue2, "statement.0.byte_match_statement.0.text_transformation.#": acctest.CtOne, "statement.0.byte_match_statement.0.text_transformation.0.priority": acctest.CtZero, "statement.0.byte_match_statement.0.text_transformation.0.type": "NONE", @@ -2695,11 +2695,11 @@ func TestAccWAFV2WebACL_tags(t *testing.T) { CheckDestroy: testAccCheckWebACLDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccWebACLConfig_tags1(webACLName, "key1", "value1"), + Config: testAccWebACLConfig_tags1(webACLName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -2709,20 +2709,20 @@ func TestAccWAFV2WebACL_tags(t *testing.T) { ImportStateIdFunc: testAccWebACLImportStateIdFunc(resourceName), }, { - Config: testAccWebACLConfig_tags2(webACLName, "key1", "value1updated", "key2", "value2"), + Config: testAccWebACLConfig_tags2(webACLName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccWebACLConfig_tags1(webACLName, "key2", "value2"), + Config: testAccWebACLConfig_tags1(webACLName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckWebACLExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 2851c55ae16595dcda3d197d0d64d089522a9501 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:56:00 -0400 Subject: [PATCH 178/180] workspaces: Use constants for test strings --- internal/service/workspaces/connection_alias_test.go | 12 ++++++------ internal/service/workspaces/directory_test.go | 12 ++++++------ internal/service/workspaces/ip_group_test.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/service/workspaces/connection_alias_test.go b/internal/service/workspaces/connection_alias_test.go index 9d8d6692bdc..cf0b17db00d 100644 --- a/internal/service/workspaces/connection_alias_test.go +++ b/internal/service/workspaces/connection_alias_test.go @@ -104,11 +104,11 @@ func TestAccWorkSpacesConnectionAlias_tags(t *testing.T) { CheckDestroy: testAccCheckConnectionAliasDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccConnectionAliasConfig_tags1(rName, "key1", "value1"), + Config: testAccConnectionAliasConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionAliasExists(ctx, resourceName, &connectionalias), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -117,20 +117,20 @@ func TestAccWorkSpacesConnectionAlias_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccConnectionAliasConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccConnectionAliasConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionAliasExists(ctx, resourceName, &connectionalias), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccConnectionAliasConfig_tags1(rName, "key2", "value2"), + Config: testAccConnectionAliasConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeTestCheckFunc( testAccCheckConnectionAliasExists(ctx, resourceName, &connectionalias), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/workspaces/directory_test.go b/internal/service/workspaces/directory_test.go index 9241572882d..3f68641cd98 100644 --- a/internal/service/workspaces/directory_test.go +++ b/internal/service/workspaces/directory_test.go @@ -182,11 +182,11 @@ func testAccDirectory_tags(t *testing.T) { CheckDestroy: testAccCheckDirectoryDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccDirectoryConfig_tags1(rName, domain, "key1", "value1"), + Config: testAccDirectoryConfig_tags1(rName, domain, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDirectoryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -195,20 +195,20 @@ func testAccDirectory_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccDirectoryConfig_tags2(rName, domain, "key1", "value1updated", "key2", "value2"), + Config: testAccDirectoryConfig_tags2(rName, domain, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDirectoryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccDirectoryConfig_tags1(rName, domain, "key2", "value2"), + Config: testAccDirectoryConfig_tags1(rName, domain, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckDirectoryExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, diff --git a/internal/service/workspaces/ip_group_test.go b/internal/service/workspaces/ip_group_test.go index 8ee3f4a5a80..1205cb8e7ee 100644 --- a/internal/service/workspaces/ip_group_test.go +++ b/internal/service/workspaces/ip_group_test.go @@ -80,11 +80,11 @@ func testAccIPGroup_tags(t *testing.T) { CheckDestroy: testAccCheckIPGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccIPGroupConfig_tags1(rName, "key1", "value1"), + Config: testAccIPGroupConfig_tags1(rName, acctest.CtKey1, acctest.CtValue1), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckIPGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -93,20 +93,20 @@ func testAccIPGroup_tags(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccIPGroupConfig_tags2(rName, "key1", "value1updated", "key2", "value2"), + Config: testAccIPGroupConfig_tags2(rName, acctest.CtKey1, "value1updated", acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckIPGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { - Config: testAccIPGroupConfig_tags1(rName, "key2", "value2"), + Config: testAccIPGroupConfig_tags1(rName, acctest.CtKey2, acctest.CtValue2), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckIPGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, }, From 955eb8f1b2c1db079b36b42b2bdf03869435d7c9 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 16:56:00 -0400 Subject: [PATCH 179/180] xray: Use constants for test strings --- internal/service/xray/group_tags_gen_test.go | 148 +++++++++--------- .../xray/sampling_rule_tags_gen_test.go | 148 +++++++++--------- 2 files changed, 148 insertions(+), 148 deletions(-) diff --git a/internal/service/xray/group_tags_gen_test.go b/internal/service/xray/group_tags_gen_test.go index f35482004fd..cdaecdf0eca 100644 --- a/internal/service/xray/group_tags_gen_test.go +++ b/internal/service/xray/group_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccXRayGroup_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccXRayGroup_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccXRayGroup_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccXRayGroup_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccXRayGroup_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccXRayGroup_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccXRayGroup_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccXRayGroup_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccXRayGroup_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccXRayGroup_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccXRayGroup_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccXRayGroup_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccXRayGroup_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccXRayGroup_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccXRayGroup_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccXRayGroup_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccXRayGroup_tags_DefaultTags_updateToProviderOnly(t *testing.T) { testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccXRayGroup_tags_DefaultTags_updateToProviderOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccXRayGroup_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccXRayGroup_tags_DefaultTags_updateToResourceOnly(t *testing.T) { testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccXRayGroup_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccXRayGroup_tags_DefaultTags_updateToResourceOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccXRayGroup_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccXRayGroup_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccXRayGroup_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccXRayGroup_tags_DefaultTags_nullOverlappingResourceTag(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccXRayGroup_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccXRayGroup_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccXRayGroup_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccXRayGroup_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccXRayGroup_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/Group/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckGroupExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccXRayGroup_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/Group/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, diff --git a/internal/service/xray/sampling_rule_tags_gen_test.go b/internal/service/xray/sampling_rule_tags_gen_test.go index 35c9f595284..034eeb0d9f6 100644 --- a/internal/service/xray/sampling_rule_tags_gen_test.go +++ b/internal/service/xray/sampling_rule_tags_gen_test.go @@ -32,13 +32,13 @@ func TestAccXRaySamplingRule_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -46,7 +46,7 @@ func TestAccXRaySamplingRule_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -58,15 +58,15 @@ func TestAccXRaySamplingRule_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -74,8 +74,8 @@ func TestAccXRaySamplingRule_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -87,13 +87,13 @@ func TestAccXRaySamplingRule_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", acctest.CtValue2), ), }, { @@ -101,7 +101,7 @@ func TestAccXRaySamplingRule_tags(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), }, ResourceName: resourceName, @@ -150,7 +150,7 @@ func TestAccXRaySamplingRule_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -163,7 +163,7 @@ func TestAccXRaySamplingRule_tags_null(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -211,13 +211,13 @@ func TestAccXRaySamplingRule_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -225,7 +225,7 @@ func TestAccXRaySamplingRule_tags_AddOnUpdate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -253,7 +253,7 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -267,7 +267,7 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnCreate(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -316,13 +316,13 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -330,14 +330,14 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags.key2", ""), ), }, @@ -346,8 +346,8 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), - "key2": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), + acctest.CtKey2: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -359,13 +359,13 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -373,7 +373,7 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -401,13 +401,13 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -415,7 +415,7 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -429,7 +429,7 @@ func TestAccXRaySamplingRule_tags_EmptyTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -457,7 +457,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -465,7 +465,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -474,7 +474,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -488,8 +488,8 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -498,7 +498,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtTwo), resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -507,8 +507,8 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1updated"), - "key2": config.StringVariable("value2"), + acctest.CtKey1: config.StringVariable("value1updated"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -522,7 +522,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -530,7 +530,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key2", acctest.CtValue2), ), }, { @@ -539,7 +539,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_providerOnly(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key2": config.StringVariable("value2"), + acctest.CtKey2: config.StringVariable(acctest.CtValue2), }), "resource_tags": nil, }, @@ -838,15 +838,15 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToProviderOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -855,7 +855,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToProviderOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -863,7 +863,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToProviderOnly(t *testing.T) testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -872,7 +872,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToProviderOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -901,7 +901,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToResourceOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": nil, }, @@ -909,7 +909,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToResourceOnly(t *testing.T) testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtZero), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -918,15 +918,15 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToResourceOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttr(resourceName, "tags_all.%", acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags_all.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags_all.key1", acctest.CtValue1), ), }, { @@ -935,7 +935,7 @@ func TestAccXRaySamplingRule_tags_DefaultTags_updateToResourceOnly(t *testing.T) ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, ResourceName: resourceName, @@ -963,10 +963,10 @@ func TestAccXRaySamplingRule_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -983,10 +983,10 @@ func TestAccXRaySamplingRule_tags_DefaultTags_emptyResourceTag(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable(""), + acctest.CtKey1: config.StringVariable(""), }), }, ResourceName: resourceName, @@ -1014,10 +1014,10 @@ func TestAccXRaySamplingRule_tags_DefaultTags_nullOverlappingResourceTag(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, Check: resource.ComposeAggregateTestCheckFunc( @@ -1033,10 +1033,10 @@ func TestAccXRaySamplingRule_tags_DefaultTags_nullOverlappingResourceTag(t *test ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "provider_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("providervalue1"), + acctest.CtKey1: config.StringVariable("providervalue1"), }), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": nil, + acctest.CtKey1: nil, }), }, ResourceName: resourceName, @@ -1165,13 +1165,13 @@ func TestAccXRaySamplingRule_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1180,13 +1180,13 @@ func TestAccXRaySamplingRule_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtTwo), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), resource.TestCheckResourceAttrPair(resourceName, "tags.computedkey1", "null_resource.test", names.AttrID), ), ConfigPlanChecks: resource.ConfigPlanChecks{ @@ -1208,8 +1208,8 @@ func TestAccXRaySamplingRule_tags_ComputedTag_OnUpdate_Add(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "unknownTagKey": config.StringVariable("computedkey1"), - "knownTagKey": config.StringVariable("key1"), - "knownTagValue": config.StringVariable("value1"), + "knownTagKey": config.StringVariable(acctest.CtKey1), + "knownTagValue": config.StringVariable(acctest.CtValue1), }, ResourceName: resourceName, ImportState: true, @@ -1236,13 +1236,13 @@ func TestAccXRaySamplingRule_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), "resource_tags": config.MapVariable(map[string]config.Variable{ - "key1": config.StringVariable("value1"), + acctest.CtKey1: config.StringVariable(acctest.CtValue1), }), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, acctest.CtOne), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", acctest.CtValue1), ), }, { @@ -1250,7 +1250,7 @@ func TestAccXRaySamplingRule_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/SamplingRule/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckSamplingRuleExists(ctx, resourceName, &v), @@ -1275,7 +1275,7 @@ func TestAccXRaySamplingRule_tags_ComputedTag_OnUpdate_Replace(t *testing.T) { ConfigDirectory: config.StaticDirectory("testdata/SamplingRule/tagsComputed1/"), ConfigVariables: config.Variables{ "rName": config.StringVariable(rName), - "unknownTagKey": config.StringVariable("key1"), + "unknownTagKey": config.StringVariable(acctest.CtKey1), }, ResourceName: resourceName, ImportState: true, From 86eb0c233e6a41cece131bc4d4d285e08bbed111 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 14 May 2024 17:13:54 -0400 Subject: [PATCH 180/180] dms: Fix import cycle --- internal/service/dms/exports_test.go | 13 ++++++++++++ .../service/dms/task_settings_json_test.go | 5 +++-- internal/service/dms/validate_test.go | 20 ++++++++++--------- 3 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 internal/service/dms/exports_test.go diff --git a/internal/service/dms/exports_test.go b/internal/service/dms/exports_test.go new file mode 100644 index 00000000000..89008c13954 --- /dev/null +++ b/internal/service/dms/exports_test.go @@ -0,0 +1,13 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package dms + +// Exports for use in tests only. +var ( + TaskSettingsEqual = taskSettingsEqual + ValidEndpointID = validEndpointID + ValidReplicationInstanceID = validReplicationInstanceID + ValidReplicationSubnetGroupID = validReplicationSubnetGroupID + ValidReplicationTaskID = validReplicationTaskID +) diff --git a/internal/service/dms/task_settings_json_test.go b/internal/service/dms/task_settings_json_test.go index c73657bae94..8d5f46f1b0b 100644 --- a/internal/service/dms/task_settings_json_test.go +++ b/internal/service/dms/task_settings_json_test.go @@ -1,12 +1,13 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package dms +package dms_test import ( "testing" "github.com/hashicorp/terraform-provider-aws/internal/acctest" + tfdms "github.com/hashicorp/terraform-provider-aws/internal/service/dms" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -162,7 +163,7 @@ func TestTaskSettingsEqual(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() - if taskSettingsEqual(test.a, test.b) != test.expected { + if tfdms.TaskSettingsEqual(test.a, test.b) != test.expected { t.Fatalf("expected %v, got %v", test.expected, !test.expected) } }) diff --git a/internal/service/dms/validate_test.go b/internal/service/dms/validate_test.go index e16967deeaa..881385adcb3 100644 --- a/internal/service/dms/validate_test.go +++ b/internal/service/dms/validate_test.go @@ -1,10 +1,12 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package dms +package dms_test import ( "testing" + + tfdms "github.com/hashicorp/terraform-provider-aws/internal/service/dms" ) func TestValidEndpointID(t *testing.T) { @@ -16,7 +18,7 @@ func TestValidEndpointID(t *testing.T) { } for _, s := range validIds { - _, errors := validEndpointID(s, "endpoint_id") + _, errors := tfdms.ValidEndpointID(s, "endpoint_id") if len(errors) > 0 { t.Fatalf("%q should be a valid endpoint id: %v", s, errors) } @@ -33,7 +35,7 @@ func TestValidEndpointID(t *testing.T) { } for _, s := range invalidIds { - _, errors := validEndpointID(s, "endpoint_id") + _, errors := tfdms.ValidEndpointID(s, "endpoint_id") if len(errors) == 0 { t.Fatalf("%q should not be a valid endpoint id: %v", s, errors) } @@ -49,7 +51,7 @@ func TestValidReplicationInstanceID(t *testing.T) { } for _, s := range validIds { - _, errors := validReplicationInstanceID(s, "replicaiton_instance_id") + _, errors := tfdms.ValidReplicationInstanceID(s, "replicaiton_instance_id") if len(errors) > 0 { t.Fatalf("%q should be a valid replication instance id: %v", s, errors) } @@ -66,7 +68,7 @@ func TestValidReplicationInstanceID(t *testing.T) { } for _, s := range invalidIds { - _, errors := validReplicationInstanceID(s, "replication_instance_id") + _, errors := tfdms.ValidReplicationInstanceID(s, "replication_instance_id") if len(errors) == 0 { t.Fatalf("%q should not be a valid replication instance id: %v", s, errors) } @@ -85,7 +87,7 @@ func TestValidReplicationSubnetGroupID(t *testing.T) { } for _, s := range validIds { - _, errors := validReplicationSubnetGroupID(s, "replication_subnet_group_id") + _, errors := tfdms.ValidReplicationSubnetGroupID(s, "replication_subnet_group_id") if len(errors) > 0 { t.Fatalf("%q should be a valid replication subnet group id: %v", s, errors) } @@ -98,7 +100,7 @@ func TestValidReplicationSubnetGroupID(t *testing.T) { } for _, s := range invalidIds { - _, errors := validReplicationSubnetGroupID(s, "replication_subnet_group_id") + _, errors := tfdms.ValidReplicationSubnetGroupID(s, "replication_subnet_group_id") if len(errors) == 0 { t.Fatalf("%q should not be a valid replication subnet group id: %v", s, errors) } @@ -114,7 +116,7 @@ func TestValidReplicationTaskID(t *testing.T) { } for _, s := range validIds { - _, errors := validReplicationTaskID(s, "replication_task_id") + _, errors := tfdms.ValidReplicationTaskID(s, "replication_task_id") if len(errors) > 0 { t.Fatalf("%q should be a valid replication task id: %v", s, errors) } @@ -131,7 +133,7 @@ func TestValidReplicationTaskID(t *testing.T) { } for _, s := range invalidIds { - _, errors := validReplicationTaskID(s, "replication_task_id") + _, errors := tfdms.ValidReplicationTaskID(s, "replication_task_id") if len(errors) == 0 { t.Fatalf("%q should not be a valid replication task id: %v", s, errors) }