From 81bfa8970aebb46ca171b3eb55099c14c51301bc Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 24 May 2014 14:02:49 -0700 Subject: [PATCH] config: make the tests a bit more intense --- config/config_test.go | 4 ++++ config/test-fixtures/resource_graph.tf | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index bc945bee1..cc97f9f8d 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -67,10 +67,14 @@ const resourceGraphValue = ` root: root root -> aws_security_group.firewall root -> aws_instance.web + root -> aws_load_balancer.weblb aws_security_group.firewall aws_instance.web aws_instance.web -> aws_security_group.firewall +aws_load_balancer.weblb + aws_load_balancer.weblb -> aws_instance.web root root -> aws_security_group.firewall root -> aws_instance.web + root -> aws_load_balancer.weblb ` diff --git a/config/test-fixtures/resource_graph.tf b/config/test-fixtures/resource_graph.tf index 9eebc208a..1ff19d02c 100644 --- a/config/test-fixtures/resource_graph.tf +++ b/config/test-fixtures/resource_graph.tf @@ -3,13 +3,16 @@ variable "foo" { description = "bar"; } -resource "aws_security_group" "firewall" { -} +resource "aws_security_group" "firewall" {} -resource aws_instance "web" { +resource "aws_instance" "web" { ami = "${var.foo}" security_groups = [ "foo", "${aws_security_group.firewall.foo}" ] } + +resource "aws_load_balancer" "weblb" { + members = "${aws_instance.web.id_list}" +}