33 lines
684 B
Go
33 lines
684 B
Go
|
package docker
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/hashicorp/terraform/helper/resource"
|
||
|
)
|
||
|
|
||
|
func TestAccDockerImage_basic(t *testing.T) {
|
||
|
resource.Test(t, resource.TestCase{
|
||
|
PreCheck: func() { testAccPreCheck(t) },
|
||
|
Providers: testAccProviders,
|
||
|
Steps: []resource.TestStep{
|
||
|
resource.TestStep{
|
||
|
Config: testAccDockerImageConfig,
|
||
|
Check: resource.ComposeTestCheckFunc(
|
||
|
resource.TestCheckResourceAttr(
|
||
|
"docker_image.foo",
|
||
|
"latest",
|
||
|
"d0955f21bf24f5bfffd32d2d0bb669d0564701c271bc3dfc64cfc5adfdec2d07"),
|
||
|
),
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|
||
|
|
||
|
const testAccDockerImageConfig = `
|
||
|
resource "docker_image" "foo" {
|
||
|
name = "ubuntu:trusty-20150320"
|
||
|
keep_updated = true
|
||
|
}
|
||
|
`
|