github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/backend/remote-state/swift/client_test.go (about) 1 package swift 2 3 import ( 4 "fmt" 5 "testing" 6 "time" 7 8 "github.com/hashicorp/terraform/backend" 9 "github.com/hashicorp/terraform/state/remote" 10 ) 11 12 func TestRemoteClient_impl(t *testing.T) { 13 var _ remote.Client = new(RemoteClient) 14 } 15 16 func TestRemoteClient(t *testing.T) { 17 testACC(t) 18 19 container := fmt.Sprintf("terraform-state-swift-testclient-%x", time.Now().Unix()) 20 21 b := backend.TestBackendConfig(t, New(), backend.TestWrapConfig(map[string]interface{}{ 22 "container": container, 23 })).(*Backend) 24 25 state, err := b.StateMgr(backend.DefaultStateName) 26 if err != nil { 27 t.Fatal(err) 28 } 29 30 client := &RemoteClient{ 31 client: b.client, 32 container: b.container, 33 } 34 35 defer client.deleteContainer() 36 37 remote.TestClient(t, state.(*remote.State).Client) 38 }