packer-cn/builder/openstack/artifact_test.go

36 lines
669 B
Go
Raw Normal View History

2013-08-28 01:35:59 -04:00
package openstack
import (
"github.com/mitchellh/packer/packer"
"testing"
)
func TestArtifact_Impl(t *testing.T) {
var _ packer.Artifact = new(Artifact)
2013-08-28 01:35:59 -04:00
}
func TestArtifactId(t *testing.T) {
expected := `b8cdf55b-c916-40bd-b190-389ec144c4ed`
a := &Artifact{
ImageId: "b8cdf55b-c916-40bd-b190-389ec144c4ed",
}
result := a.Id()
if result != expected {
t.Fatalf("bad: %s", result)
}
2013-08-28 01:35:59 -04:00
}
func TestArtifactString(t *testing.T) {
expected := "An image was created: b8cdf55b-c916-40bd-b190-389ec144c4ed"
a := &Artifact{
ImageId: "b8cdf55b-c916-40bd-b190-389ec144c4ed",
}
result := a.String()
if result != expected {
t.Fatalf("bad: %s", result)
}
2013-08-28 01:35:59 -04:00
}