diff --git a/terraform/context_test.go b/terraform/context_test.go index 8368df95f..3f51483de 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -98,6 +98,25 @@ func TestContextValidate_resourceConfig_bad(t *testing.T) { } } +func TestContextValidate_resourceConfig_good(t *testing.T) { + config := testConfig(t, "validate-bad-rc") + p := testProvider("aws") + c := testContext(t, &ContextOpts{ + Config: config, + 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_requiredVar(t *testing.T) { config := testConfig(t, "validate-required-var") c := testContext(t, &ContextOpts{