Merge pull request #1305 from lflux/sort-ami-strings
Sort AMI names in Artifact.String - fixes random test failures
This commit is contained in:
commit
f74a093eca
|
@ -6,6 +6,7 @@ import (
|
||||||
"github.com/mitchellh/goamz/ec2"
|
"github.com/mitchellh/goamz/ec2"
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/mitchellh/packer/packer"
|
||||||
"log"
|
"log"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ func (a *Artifact) String() string {
|
||||||
amiStrings = append(amiStrings, single)
|
amiStrings = append(amiStrings, single)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Sort(sort.StringSlice(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"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue