github.com/lorbuschris/terraform@v0.11.12-beta1/backend/remote-state/inmem/client_test.go (about)

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