diff --git a/builtin/providers/consul/resource_consul_keys_test.go b/builtin/providers/consul/resource_consul_keys_test.go index 2f52be83b..592813310 100644 --- a/builtin/providers/consul/resource_consul_keys_test.go +++ b/builtin/providers/consul/resource_consul_keys_test.go @@ -78,7 +78,7 @@ func testAccCheckConsulKeysValue(n, attr, val string) resource.TestCheckFunc { const testAccConsulKeysConfig = ` resource "consul_keys" "app" { - datacenter = "nyc1" + datacenter = "nyc3" key { name = "time" path = "global/time" diff --git a/builtin/providers/consul/resource_provider_test.go b/builtin/providers/consul/resource_provider_test.go index 5e2746f98..ad2b29898 100644 --- a/builtin/providers/consul/resource_provider_test.go +++ b/builtin/providers/consul/resource_provider_test.go @@ -3,6 +3,7 @@ package consul import ( "testing" + "github.com/armon/consul-api" "github.com/hashicorp/terraform/config" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/terraform" @@ -16,6 +17,13 @@ func init() { testAccProviders = map[string]terraform.ResourceProvider{ "consul": testAccProvider, } + + // Use the demo address for the acceptance tests + testAccProvider.ConfigureFunc = func(d *schema.ResourceData) (interface{}, error) { + conf := consulapi.DefaultConfig() + conf.Address = "demo.consul.io:80" + return consulapi.NewClient(conf) + } } func TestResourceProvider(t *testing.T) { @@ -33,7 +41,7 @@ func TestResourceProvider_Configure(t *testing.T) { raw := map[string]interface{}{ "address": "demo.consul.io:80", - "datacenter": "nyc1", + "datacenter": "nyc3", } rawConfig, err := config.NewRawConfig(raw)