config: fix order-dependent tests
This commit is contained in:
parent
7ab7ce17d9
commit
49e8477e9d
|
@ -161,7 +161,15 @@ func resourcesStr(rs []*Resource) string {
|
||||||
|
|
||||||
if len(r.RawConfig.Variables) > 0 {
|
if len(r.RawConfig.Variables) > 0 {
|
||||||
result += fmt.Sprintf(" vars\n")
|
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"
|
kind := "unknown"
|
||||||
str := rawV.FullKey()
|
str := rawV.FullKey()
|
||||||
|
|
||||||
|
@ -227,8 +235,8 @@ aws_instance[web]
|
||||||
network_interface
|
network_interface
|
||||||
security_groups
|
security_groups
|
||||||
vars
|
vars
|
||||||
user: var.foo
|
|
||||||
resource: aws_security_group.firewall.foo
|
resource: aws_security_group.firewall.foo
|
||||||
|
user: var.foo
|
||||||
`
|
`
|
||||||
|
|
||||||
const basicVariablesStr = `
|
const basicVariablesStr = `
|
||||||
|
|
Loading…
Reference in New Issue