config: fix order-dependent tests

This commit is contained in:
Mitchell Hashimoto 2014-07-02 10:05:39 -07:00
parent 7ab7ce17d9
commit 49e8477e9d
1 changed files with 10 additions and 2 deletions

View File

@ -161,7 +161,15 @@ func resourcesStr(rs []*Resource) string {
if len(r.RawConfig.Variables) > 0 {
result += fmt.Sprintf(" vars\n")
for _, rawV := range r.RawConfig.Variables {
ks := make([]string, 0, len(r.RawConfig.Variables))
for k, _ := range r.RawConfig.Variables {
ks = append(ks, k)
}
sort.Strings(ks)
for _, k := range ks {
rawV := r.RawConfig.Variables[k]
kind := "unknown"
str := rawV.FullKey()
@ -227,8 +235,8 @@ aws_instance[web]
network_interface
security_groups
vars
user: var.foo
resource: aws_security_group.firewall.foo
user: var.foo
`
const basicVariablesStr = `