2015-02-21 20:52:55 +01:00
|
|
|
package remote
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/state"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestState(t *testing.T) {
|
2015-02-24 06:30:59 +01:00
|
|
|
s := &State{
|
|
|
|
Client: new(InmemClient),
|
|
|
|
state: state.TestStateInitial(),
|
|
|
|
readState: state.TestStateInitial(),
|
|
|
|
}
|
2015-02-21 20:52:55 +01:00
|
|
|
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)
|
2017-02-15 23:20:59 +01:00
|
|
|
var _ state.Locker = new(State)
|
2015-02-21 20:52:55 +01:00
|
|
|
}
|