Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 80fab23

Browse files
committed
Don't test consul using demo.consul.io
We shoudn't require an external service for unit test. TODO: create some proper acceptance tests for consul
1 parent 14d9657 commit 80fab23

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

backend/remote-state/consul/client_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88

99
"github.com/hashicorp/terraform/backend"
1010
"github.com/hashicorp/terraform/backend/remote-state"
11-
"github.com/hashicorp/terraform/helper/acctest"
1211
"github.com/hashicorp/terraform/state/remote"
1312
)
1413

@@ -17,11 +16,15 @@ func TestRemoteClient_impl(t *testing.T) {
1716
}
1817

1918
func TestRemoteClient(t *testing.T) {
20-
acctest.RemoteTestPrecheck(t)
19+
addr := os.Getenv("CONSUL_HTTP_ADDR")
20+
if addr == "" {
21+
t.Log("consul tests require CONSUL_HTTP_ADDR")
22+
t.Skip()
23+
}
2124

2225
// Get the backend
2326
b := backend.TestBackendConfig(t, New(), map[string]interface{}{
24-
"address": "demo.consul.io:80",
27+
"address": addr,
2528
"path": fmt.Sprintf("tf-unit/%s", time.Now().String()),
2629
})
2730

0 commit comments

Comments
 (0)