From 8552bb18cf1428d250cb76ff2a970e6020324be4 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 8 Feb 2015 18:02:29 -0800 Subject: [PATCH] terraform: more tests --- terraform/context_test.go | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/terraform/context_test.go b/terraform/context_test.go index 976f3b869..99f5bfff7 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -283,6 +283,25 @@ func TestContext2Validate_resourceConfig_bad(t *testing.T) { } } +func TestContext2Validate_resourceConfig_good(t *testing.T) { + m := testModule(t, "validate-bad-rc") + p := testProvider("aws") + c := testContext2(t, &ContextOpts{ + Module: m, + Providers: map[string]ResourceProviderFactory{ + "aws": testProviderFuncFixed(p), + }, + }) + + w, e := c.Validate() + if len(w) > 0 { + t.Fatalf("bad: %#v", w) + } + if len(e) > 0 { + t.Fatalf("bad: %#v", e) + } +} + func TestContext2Validate_selfRef(t *testing.T) { p := testProvider("aws") m := testModule(t, "validate-self-ref") @@ -427,25 +446,6 @@ func TestContextValidate_tainted(t *testing.T) { } } -func TestContextValidate_resourceConfig_good(t *testing.T) { - m := testModule(t, "validate-bad-rc") - p := testProvider("aws") - c := testContext(t, &ContextOpts{ - Module: m, - Providers: map[string]ResourceProviderFactory{ - "aws": testProviderFuncFixed(p), - }, - }) - - w, e := c.Validate() - if len(w) > 0 { - t.Fatalf("bad: %#v", w) - } - if len(e) > 0 { - t.Fatalf("bad: %#v", e) - } -} - func TestContextValidate_resourceNameSymbol(t *testing.T) { p := testProvider("aws") m := testModule(t, "validate-resource-name-symbol")