github.com/alouche/packer@v0.3.7/builder/digitalocean/artifact_test.go (about) 1 package digitalocean 2 3 import ( 4 "github.com/mitchellh/packer/packer" 5 "testing" 6 ) 7 8 func TestArtifact_Impl(t *testing.T) { 9 var raw interface{} 10 raw = &Artifact{} 11 if _, ok := raw.(packer.Artifact); !ok { 12 t.Fatalf("Artifact should be artifact") 13 } 14 } 15 16 func TestArtifactString(t *testing.T) { 17 a := &Artifact{"packer-foobar", 42, nil} 18 expected := "A snapshot was created: packer-foobar" 19 20 if a.String() != expected { 21 t.Fatalf("artifact string should match: %v", expected) 22 } 23 }