mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-10 15:45:33 -06:00
29 lines
519 B
Go
29 lines
519 B
Go
package consul
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/hashicorp/consul/testutil"
|
|
"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()
|
|
|
|
// Get the backend
|
|
b := backend.TestBackendConfig(t, New(), map[string]interface{}{
|
|
"address": srv.HTTPAddr,
|
|
"path": fmt.Sprintf("tf-unit/%s", time.Now().String()),
|
|
})
|
|
|
|
// Test
|
|
backend.TestBackend(t, b)
|
|
}
|