36 lines
747 B
Go
36 lines
747 B
Go
package inmem
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/backend"
|
|
"github.com/hashicorp/terraform/state/remote"
|
|
)
|
|
|
|
func TestRemoteClient_impl(t *testing.T) {
|
|
var _ remote.Client = new(RemoteClient)
|
|
var _ remote.ClientLocker = new(RemoteClient)
|
|
}
|
|
|
|
func TestRemoteClient(t *testing.T) {
|
|
defer Reset()
|
|
b := backend.TestBackendConfig(t, New(), nil)
|
|
|
|
s, err := b.State(backend.DefaultStateName)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
remote.TestClient(t, s.(*remote.State).Client)
|
|
}
|
|
|
|
func TestInmemLocks(t *testing.T) {
|
|
defer Reset()
|
|
s, err := backend.TestBackendConfig(t, New(), nil).State(backend.DefaultStateName)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
remote.TestRemoteLocks(t, s.(*remote.State).Client, s.(*remote.State).Client)
|
|
}
|