packer-cn/post-processor/vagrant/artifact_test.go

22 lines
417 B
Go
Raw Normal View History

package vagrant
import (
2017-04-04 16:39:01 -04:00
"github.com/hashicorp/packer/packer"
"testing"
)
func TestArtifact_ImplementsArtifact(t *testing.T) {
var raw interface{}
raw = &Artifact{}
if _, ok := raw.(packer.Artifact); !ok {
t.Fatalf("Artifact should be a Artifact")
}
}
func TestArtifact_Id(t *testing.T) {
artifact := NewArtifact("vmware", "./")
if artifact.Id() != "vmware" {
t.Fatalf("should return name as Id")
}
}