Commit 77bd0240 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/*: fix flaky tests, get tests passing

parent 5f5e9471
......@@ -37,6 +37,7 @@ func (a *Artifact) Id() string {
parts = append(parts, fmt.Sprintf("%s:%s", region, amiId))
}
sort.Strings(parts)
return strings.Join(parts, ",")
}
......@@ -47,7 +48,7 @@ func (a *Artifact) String() string {
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"))
}
......
......@@ -46,7 +46,7 @@ func TestBuilderPrepare_Defaults(t *testing.T) {
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)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment