2015-02-22 00:13:28 +01:00
|
|
|
package remote
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
"time"
|
2016-01-21 22:44:18 +01:00
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
2015-02-22 00:13:28 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestConsulClient_impl(t *testing.T) {
|
|
|
|
var _ Client = new(ConsulClient)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestConsulClient(t *testing.T) {
|
2016-01-21 22:44:18 +01:00
|
|
|
acctest.RemoteTestPrecheck(t)
|
2015-02-22 00:13:28 +01:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|