@@ -12,7 +12,6 @@ import (
1212 "github.com/scaleway/terraform-provider-scaleway/v2/internal/acctest"
1313 "github.com/scaleway/terraform-provider-scaleway/v2/internal/httperrors"
1414 "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/container"
15- containerchecks "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/container/testfuncs"
1615)
1716
1817func TestAccContainer_Basic (t * testing.T ) {
@@ -220,51 +219,32 @@ func TestAccContainer_WithIMG(t *testing.T) {
220219 Steps : []resource.TestStep {
221220 {
222221 Config : fmt .Sprintf (`
223- resource scaleway_container_namespace main {
224- name = "%s"
225- description = "test container"
226- }
227- ` , containerNamespace ),
228- },
229- {
230- Config : fmt .Sprintf (`
231- resource scaleway_container_namespace main {
232- name = "%s"
233- description = "test container"
234- }
235- ` , containerNamespace ),
236- Check : resource .ComposeTestCheckFunc (
237- containerchecks .TestConfigContainerNamespace (tt , "scaleway_container_namespace.main" ),
238- ),
239- },
240- {
241- Config : fmt .Sprintf (`
242- resource scaleway_container_namespace main {
243- name = "%s"
244- description = "test container"
245- }
246-
247- resource scaleway_container main {
248- name = "my-container-02"
249- description = "environment variables test"
250- namespace_id = scaleway_container_namespace.main.id
251- registry_image = "${scaleway_container_namespace.main.registry_endpoint}/nginx:test"
252- port = 80
253- cpu_limit = 140
254- memory_limit = 256
255- min_scale = 3
256- max_scale = 5
257- timeout = 600
258- max_concurrency = 80
259- privacy = "private"
260- protocol = "h2c"
261- deploy = true
262-
263- environment_variables = {
264- "foo" = "var"
265- }
266- }
267- ` , containerNamespace ),
222+ resource scaleway_container_namespace main {
223+ name = "%s"
224+ description = "test container"
225+ }
226+
227+ resource scaleway_container main {
228+ name = "my-container-02"
229+ description = "environment variables test"
230+ namespace_id = scaleway_container_namespace.main.id
231+ registry_image = "docker.io/library/nginx:latest"
232+ port = 80
233+ cpu_limit = 140
234+ memory_limit = 256
235+ min_scale = 3
236+ max_scale = 5
237+ timeout = 600
238+ max_concurrency = 80
239+ privacy = "private"
240+ protocol = "h2c"
241+ deploy = true
242+
243+ environment_variables = {
244+ "foo" = "var"
245+ }
246+ }
247+ ` , containerNamespace ),
268248 Check : resource .ComposeTestCheckFunc (
269249 isContainerPresent (tt , "scaleway_container.main" ),
270250 acctest .CheckResourceAttrUUID ("scaleway_container.main" , "id" ),
@@ -493,7 +473,7 @@ func TestAccContainer_ScalingOption(t *testing.T) {
493473 {
494474 Config : `
495475 resource scaleway_container_namespace main {}
496-
476+
497477 resource scaleway_container main {
498478 namespace_id = scaleway_container_namespace.main.id
499479 deploy = false
@@ -512,7 +492,7 @@ func TestAccContainer_ScalingOption(t *testing.T) {
512492 {
513493 Config : `
514494 resource scaleway_container_namespace main {}
515-
495+
516496 resource scaleway_container main {
517497 namespace_id = scaleway_container_namespace.main.id
518498 deploy = false
@@ -534,7 +514,7 @@ func TestAccContainer_ScalingOption(t *testing.T) {
534514 {
535515 Config : `
536516 resource scaleway_container_namespace main {}
537-
517+
538518 resource scaleway_container main {
539519 namespace_id = scaleway_container_namespace.main.id
540520 deploy = false
0 commit comments