builder/*: fix flaky tests, get tests passing
This commit is contained in:
parent
5f5e94711c
commit
77bd024079
|
@ -37,6 +37,7 @@ func (a *Artifact) Id() string {
|
||||||
parts = append(parts, fmt.Sprintf("%s:%s", region, amiId))
|
parts = append(parts, fmt.Sprintf("%s:%s", region, amiId))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Strings(parts)
|
||||||
return strings.Join(parts, ",")
|
return strings.Join(parts, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +48,7 @@ func (a *Artifact) String() string {
|
||||||
amiStrings = append(amiStrings, single)
|
amiStrings = append(amiStrings, single)
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Sort(sort.StringSlice(amiStrings))
|
sort.Strings(amiStrings)
|
||||||
return fmt.Sprintf("AMIs were created:\n\n%s", strings.Join(amiStrings, "\n"))
|
return fmt.Sprintf("AMIs were created:\n\n%s", strings.Join(amiStrings, "\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ func TestBuilderPrepare_Defaults(t *testing.T) {
|
||||||
t.Errorf("bad guest OS type: %s", b.config.GuestOSType)
|
t.Errorf("bad guest OS type: %s", b.config.GuestOSType)
|
||||||
}
|
}
|
||||||
|
|
||||||
if b.config.VMName != "packer-foo" {
|
if b.config.VMName == "" {
|
||||||
t.Errorf("bad vm name: %s", b.config.VMName)
|
t.Errorf("bad vm name: %s", b.config.VMName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue