opentofu/state/remote/consul_test.go
Paul Hinze 6bafa74011 tests: allow opt-out of remote tests via env var
Adds the `TF_SKIP_REMOTE_TESTS` env var to be used in cases where the
`http.Get()` smoke test passes but the network is not able to service
the needs of the tests.

Fixes #4421
2016-01-21 15:44:18 -06:00

28 lines
475 B
Go

package remote
import (
"fmt"
"testing"
"time"
"github.com/hashicorp/terraform/helper/acctest"
)
func TestConsulClient_impl(t *testing.T) {
var _ Client = new(ConsulClient)
}
func TestConsulClient(t *testing.T) {
acctest.RemoteTestPrecheck(t)
client, err := consulFactory(map[string]string{
"address": "demo.consul.io:80",
"path": fmt.Sprintf("tf-unit/%s", time.Now().String()),
})
if err != nil {
t.Fatalf("bad: %s", err)
}
testClient(t, client)
}