terraform/terraform/state_upgrade_v1_to_v2_test.go

23 lines
384 B
Go

package terraform
import (
"os"
"path/filepath"
"testing"
)
func TestReadStateV1ToV2_noPath(t *testing.T) {
f, err := os.Open(filepath.Join(fixtureDir, "state-upgrade", "v1-to-v2-empty-path.tfstate"))
if err != nil {
t.Fatalf("err: %s", err)
}
defer f.Close()
s, err := ReadState(f)
if err != nil {
t.Fatalf("err: %s", err)
}
checkStateString(t, s, "<no state>")
}