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.
This commit is contained in:
Martin Atkins 2018-10-01 15:00:32 -07:00
parent 4bdaffb586
commit 477ea0d360
2 changed files with 4 additions and 2 deletions

View File

@ -5,14 +5,15 @@ import (
"testing" "testing"
"github.com/hashicorp/terraform/state" "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. // testClient is a generic function to test any client.
func testClient(t *testing.T, c Client) { func testClient(t *testing.T, c Client) {
var buf bytes.Buffer var buf bytes.Buffer
s := state.TestStateInitial() 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) t.Fatalf("err: %s", err)
} }
data := buf.Bytes() data := buf.Bytes()

View File

@ -16,6 +16,7 @@ func TestState_impl(t *testing.T) {
} }
func TestStateRace(t *testing.T) { func TestStateRace(t *testing.T) {
t.Fatal("FIXME: this test is either hanging or getting into an infinite loop")
s := &State{ s := &State{
Client: nilClient{}, Client: nilClient{},
} }