terraform/backend/remote-state/consul/backend_test.go

29 lines
519 B
Go
Raw Normal View History

2017-03-02 07:58:51 +01:00
package consul
import (
"fmt"
"testing"
"time"
"github.com/hashicorp/consul/testutil"
2017-03-02 07:58:51 +01:00
"github.com/hashicorp/terraform/backend"
)
func TestBackend_impl(t *testing.T) {
var _ backend.Backend = new(Backend)
}
func TestBackend(t *testing.T) {
srv := testutil.NewTestServer(t)
defer srv.Stop()
2017-03-02 07:58:51 +01:00
// Get the backend
b := backend.TestBackendConfig(t, New(), map[string]interface{}{
"address": srv.HTTPAddr,
2017-03-02 07:58:51 +01:00
"path": fmt.Sprintf("tf-unit/%s", time.Now().String()),
})
// Test
backend.TestBackend(t, b)
}