From 8ee18e2e14c7a343cf1a6d1ff4ddf2ee811706ec Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 20 Apr 2015 14:27:44 -0700 Subject: [PATCH] config: happy case test for multiple providers --- config/config_test.go | 7 +++++++ config/test-fixtures/validate-provider-multi-good/main.tf | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 config/test-fixtures/validate-provider-multi-good/main.tf diff --git a/config/config_test.go b/config/config_test.go index 6d2b3998f..7ed7f5cb4 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -210,6 +210,13 @@ func TestConfigValidate_providerMulti(t *testing.T) { } } +func TestConfigValidate_providerMultiGood(t *testing.T) { + c := testConfig(t, "validate-provider-multi-good") + if err := c.Validate(); err != nil { + t.Fatalf("should be valid: %s", err) + } +} + func TestConfigValidate_provConnSplatOther(t *testing.T) { c := testConfig(t, "validate-prov-conn-splat-other") if err := c.Validate(); err != nil { diff --git a/config/test-fixtures/validate-provider-multi-good/main.tf b/config/test-fixtures/validate-provider-multi-good/main.tf new file mode 100644 index 000000000..c02464be9 --- /dev/null +++ b/config/test-fixtures/validate-provider-multi-good/main.tf @@ -0,0 +1,7 @@ +provider "aws" { + alias = "bar" +} + +provider "aws" { + alias = "foo" +}