From 477ea0d360f95c9244a38d7b79d70b02dbd3f1b4 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 1 Oct 2018 15:00:32 -0700 Subject: [PATCH] state/remote: Make tests compile and run to completion One of the tests was hanging, so for now it's stubbed out until we can get to the bottom of the hang on a subsequent pass. --- state/remote/remote_test.go | 5 +++-- state/remote/state_test.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/state/remote/remote_test.go b/state/remote/remote_test.go index a9c55b9db2..665e49a20c 100644 --- a/state/remote/remote_test.go +++ b/state/remote/remote_test.go @@ -5,14 +5,15 @@ import ( "testing" "github.com/hashicorp/terraform/state" - "github.com/hashicorp/terraform/terraform" + "github.com/hashicorp/terraform/states/statefile" ) // testClient is a generic function to test any client. func testClient(t *testing.T, c Client) { var buf bytes.Buffer s := state.TestStateInitial() - if err := terraform.WriteState(s, &buf); err != nil { + sf := &statefile.File{State: s} + if err := statefile.Write(sf, &buf); err != nil { t.Fatalf("err: %s", err) } data := buf.Bytes() diff --git a/state/remote/state_test.go b/state/remote/state_test.go index 26a031b7e3..847b0bc5fb 100644 --- a/state/remote/state_test.go +++ b/state/remote/state_test.go @@ -16,6 +16,7 @@ func TestState_impl(t *testing.T) { } func TestStateRace(t *testing.T) { + t.Fatal("FIXME: this test is either hanging or getting into an infinite loop") s := &State{ Client: nilClient{}, }