opentofu/state/remote/state_test.go
Mitchell Hashimoto efe754183b
state/remote: export ClientLocker, test for implementation
This adds unit tests (that will fail at compile time) if various structs
don't implement the right interfaces for locking
2017-02-15 14:20:59 -08:00

29 lines
565 B
Go

package remote
import (
"testing"
"github.com/hashicorp/terraform/state"
)
func TestState(t *testing.T) {
s := &State{
Client: new(InmemClient),
state: state.TestStateInitial(),
readState: state.TestStateInitial(),
}
if err := s.PersistState(); err != nil {
t.Fatalf("err: %s", err)
}
state.TestState(t, s)
}
func TestState_impl(t *testing.T) {
var _ state.StateReader = new(State)
var _ state.StateWriter = new(State)
var _ state.StatePersister = new(State)
var _ state.StateRefresher = new(State)
var _ state.Locker = new(State)
}