github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/state/testing.go (about) 1 package state 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/states" 7 "github.com/hashicorp/terraform/states/statemgr" 8 ) 9 10 // TestState is a helper for testing state implementations. It is expected 11 // that the given implementation is pre-loaded with the TestStateInitial 12 // state. 13 func TestState(t *testing.T, s State) { 14 t.Helper() 15 statemgr.TestFull(t, s) 16 } 17 18 // TestStateInitial is the initial state that a State should have 19 // for TestState. 20 func TestStateInitial() *states.State { 21 return statemgr.TestFullInitialState() 22 }