github.com/raghuse92/packer@v1.3.2/post-processor/vsphere/artifact_test.go (about)

     1  package vsphere
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/packer/packer"
     7  )
     8  
     9  func TestArtifact_ImplementsArtifact(t *testing.T) {
    10  	var raw interface{}
    11  	raw = &Artifact{}
    12  	if _, ok := raw.(packer.Artifact); !ok {
    13  		t.Fatalf("Artifact should be a Artifact")
    14  	}
    15  }
    16  
    17  func TestArtifact_Id(t *testing.T) {
    18  	artifact := NewArtifact("datastore", "vmfolder", "vmname", nil)
    19  	if artifact.Id() != "datastore::vmfolder::vmname" {
    20  		t.Fatalf("must return datastore, vmfolder and vmname splitted by :: as Id")
    21  	}
    22  }