github.com/ns1/terraform@v0.7.10-0.20161109153551-8949419bef40/state/remote/consul_test.go (about)

     1  package remote
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  	"time"
     7  
     8  	"github.com/hashicorp/terraform/helper/acctest"
     9  )
    10  
    11  func TestConsulClient_impl(t *testing.T) {
    12  	var _ Client = new(ConsulClient)
    13  }
    14  
    15  func TestConsulClient(t *testing.T) {
    16  	acctest.RemoteTestPrecheck(t)
    17  
    18  	client, err := consulFactory(map[string]string{
    19  		"address": "demo.consul.io:80",
    20  		"path":    fmt.Sprintf("tf-unit/%s", time.Now().String()),
    21  	})
    22  	if err != nil {
    23  		t.Fatalf("bad: %s", err)
    24  	}
    25  
    26  	testClient(t, client)
    27  }