mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-10 01:00:08 -04:00
builder/*: fix flaky tests, get tests passing
This commit is contained in:
parent
5f5e94711c
commit
77bd024079
2 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue