diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/terraform/testing.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/terraform/testing.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/terraform/testing.go b/vendor/github.com/hashicorp/terraform/terraform/testing.go new file mode 100644 index 00000000..3f0418d9 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/terraform/testing.go @@ -0,0 +1,19 @@ +package terraform + +import ( + "os" + "testing" +) + +// TestStateFile writes the given state to the path. +func TestStateFile(t *testing.T, path string, state *State) { + f, err := os.Create(path) + if err != nil { + t.Fatalf("err: %s", err) + } + defer f.Close() + + if err := WriteState(state, f); err != nil { + t.Fatalf("err: %s", err) + } +} |