github.com/sathish1597/hashicorp-terraform@v0.11.12-beta1/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-test-%x", time.Now().Unix())
    20  
    21  	b := backend.TestBackendConfig(t, New(), map[string]interface{}{
    22  		"container": container,
    23  	}).(*Backend)
    24  
    25  	state, err := b.State(backend.DefaultStateName)
    26  	if err != nil {
    27  		t.Fatal(err)
    28  	}
    29  
    30  	defer deleteSwiftContainer(t, b.client, container)
    31  
    32  	remote.TestClient(t, state.(*remote.State).Client)
    33  }