@@ -68,7 +68,7 @@ func TestAccFunctionNamespace_Basic(t *testing.T) {
68
68
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "description" , "" ),
69
69
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "name" , "test-cr-ns-01" ),
70
70
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "environment_variables.test" , "test" ),
71
- resource . TestCheckResourceAttr ("scaleway_function_namespace.main" , "secret_environment_variables.test_secret" , "test_secret" ),
71
+ passwordMatchHash ("scaleway_function_namespace.main" , "secret_environment_variables.test_secret" , "test_secret" ),
72
72
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "tags.#" , "0" ),
73
73
74
74
acctest .CheckResourceAttrUUID ("scaleway_function_namespace.main" , "id" ),
@@ -92,7 +92,7 @@ func TestAccFunctionNamespace_Basic(t *testing.T) {
92
92
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "description" , "" ),
93
93
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "name" , "test-cr-ns-01" ),
94
94
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "environment_variables.test" , "test" ),
95
- resource . TestCheckResourceAttr ("scaleway_function_namespace.main" , "secret_environment_variables.test_secret" , "test_secret" ),
95
+ passwordMatchHash ("scaleway_function_namespace.main" , "secret_environment_variables.test_secret" , "test_secret" ),
96
96
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "tags.#" , "2" ),
97
97
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "tags.0" , "tag1" ),
98
98
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "tags.1" , "tag2" ),
@@ -142,13 +142,16 @@ func TestAccFunctionNamespace_EnvironmentVariables(t *testing.T) {
142
142
environment_variables = {
143
143
"test" = "test"
144
144
}
145
+ secret_environment_variables = {
146
+ "test_secret" = "test_secret"
147
+ }
145
148
}
146
149
` ,
147
150
Check : resource .ComposeTestCheckFunc (
148
151
testAccCheckFunctionNamespaceExists (tt , "scaleway_function_namespace.main" ),
149
152
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "name" , "tf-env-test" ),
150
153
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "environment_variables.test" , "test" ),
151
-
154
+ passwordMatchHash ( "scaleway_function_namespace.main" , "secret_environment_variables.test_secret" , "test_secret" ),
152
155
acctest .CheckResourceAttrUUID ("scaleway_function_namespace.main" , "id" ),
153
156
),
154
157
},
@@ -159,13 +162,16 @@ func TestAccFunctionNamespace_EnvironmentVariables(t *testing.T) {
159
162
environment_variables = {
160
163
"foo" = "bar"
161
164
}
165
+ secret_environment_variables = {
166
+ "test_secret" = "updated_secret"
167
+ }
162
168
}
163
169
` ,
164
170
Check : resource .ComposeTestCheckFunc (
165
171
testAccCheckFunctionNamespaceExists (tt , "scaleway_function_namespace.main" ),
166
172
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "name" , "tf-env-test" ),
167
173
resource .TestCheckResourceAttr ("scaleway_function_namespace.main" , "environment_variables.foo" , "bar" ),
168
-
174
+ passwordMatchHash ( "scaleway_function_namespace.main" , "secret_environment_variables.test_secret" , "updated_secret" ),
169
175
acctest .CheckResourceAttrUUID ("scaleway_function_namespace.main" , "id" ),
170
176
),
171
177
},
0 commit comments