diff --git a/docker/resource_docker_secret_test.go b/docker/resource_docker_secret_test.go index b4fbe7b1..5ee2a378 100644 --- a/docker/resource_docker_secret_test.go +++ b/docker/resource_docker_secret_test.go @@ -101,10 +101,10 @@ func TestAccDockerSecret_labels(t *testing.T) { spew.Dump(s.RootModule().Resources["docker_secret.foo"].Primary.Attributes) return nil }, - resource.TestCheckResourceAttr("docker_secret.foo", "labels.0.label", "test1"), - resource.TestCheckResourceAttr("docker_secret.foo", "labels.0.value", "foo"), - resource.TestCheckResourceAttr("docker_secret.foo", "labels.1.label", "test1"), - resource.TestCheckResourceAttr("docker_secret.foo", "labels.1.value", "bar"), + resource.TestCheckResourceAttr("docker_secret.foo", fmt.Sprintf("labels.%v.label", hashStringLabel("test1")), "test1"), + resource.TestCheckResourceAttr("docker_secret.foo", fmt.Sprintf("labels.%v.value", hashStringLabel("test1")), "foo"), + resource.TestCheckResourceAttr("docker_secret.foo", fmt.Sprintf("labels.%v.label", hashStringLabel("test2")), "test1"), + resource.TestCheckResourceAttr("docker_secret.foo", fmt.Sprintf("labels.%v.value", hashStringLabel("test2")), "bar"), ), }, },