diff --git a/builtin/providers/docker/resource_docker_image_test.go b/builtin/providers/docker/resource_docker_image_test.go index 3a1c5b138..81c508742 100644 --- a/builtin/providers/docker/resource_docker_image_test.go +++ b/builtin/providers/docker/resource_docker_image_test.go @@ -1,6 +1,7 @@ package docker import ( + "regexp" "testing" "github.com/hashicorp/terraform/helper/resource" @@ -14,17 +15,14 @@ func TestAccDockerImage_basic(t *testing.T) { resource.TestStep{ Config: testAccDockerImageConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "docker_image.foo", - "latest", - "8dd8107abd2e22bfd3b45b05733f3d2677d4078b09b5edce56ee3d8677d3c648"), + resource.TestMatchResourceAttr("docker_image.foo", "latest", regexp.MustCompile(`\A[a-f0-9]{64}\z`)), ), }, }, }) } -func TestAddDockerImage_private(t *testing.T) { +func TestAccDockerImage_private(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -32,10 +30,7 @@ func TestAddDockerImage_private(t *testing.T) { resource.TestStep{ Config: testAddDockerPrivateImageConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "docker_image.foobar", - "latest", - "2c40b0526b6358710fd09e7b8c022429268cc61703b4777e528ac9d469a07ca1"), + resource.TestMatchResourceAttr("docker_image.foobar", "latest", regexp.MustCompile(`\A[a-f0-9]{64}\z`)), ), }, },