github.com/amanya/packer@v0.12.1-0.20161117214323-902ac5ab2eb6/builder/profitbricks/artifact_test.go (about)

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