|
|
|
|
@ -10,7 +10,7 @@ func getFakeSasUrl(name string) string {
|
|
|
|
|
return fmt.Sprintf("SAS-%s", name)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestArtifactId(t *testing.T) {
|
|
|
|
|
func TestArtifactIdVHD(t *testing.T) {
|
|
|
|
|
template := CaptureTemplate{
|
|
|
|
|
Resources: []CaptureResources{
|
|
|
|
|
{
|
|
|
|
|
@ -41,6 +41,20 @@ func TestArtifactId(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestArtifactIDManagedImage(t *testing.T) {
|
|
|
|
|
artifact, err := NewManagedImageArtifact("Linux", "fakeResourceGroup", "fakeName", "fakeLocation", "fakeID")
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("err=%s", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
expected := "fakeID"
|
|
|
|
|
|
|
|
|
|
result := artifact.Id()
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Fatalf("bad: %s", result)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestArtifactString(t *testing.T) {
|
|
|
|
|
template := CaptureTemplate{
|
|
|
|
|
Resources: []CaptureResources{
|
|
|
|
|
|