github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/backend/remote-state/inmem/client_test.go (about) 1 package inmem 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/hcl/v2" 7 "github.com/hashicorp/terraform/backend" 8 "github.com/hashicorp/terraform/state/remote" 9 ) 10 11 func TestRemoteClient_impl(t *testing.T) { 12 var _ remote.Client = new(RemoteClient) 13 var _ remote.ClientLocker = new(RemoteClient) 14 } 15 16 func TestRemoteClient(t *testing.T) { 17 defer Reset() 18 b := backend.TestBackendConfig(t, New(), hcl.EmptyBody()) 19 20 s, err := b.StateMgr(backend.DefaultStateName) 21 if err != nil { 22 t.Fatal(err) 23 } 24 25 remote.TestClient(t, s.(*remote.State).Client) 26 } 27 28 func TestInmemLocks(t *testing.T) { 29 defer Reset() 30 s, err := backend.TestBackendConfig(t, New(), hcl.EmptyBody()).StateMgr(backend.DefaultStateName) 31 if err != nil { 32 t.Fatal(err) 33 } 34 35 remote.TestRemoteLocks(t, s.(*remote.State).Client, s.(*remote.State).Client) 36 }