mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-21 07:21:40 -04:00
builder/*: fix flaky tests, get tests passing
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user