command: Fix TestApply_plan_remoteState

Some over-zealous bulk updating of this test file caused this test to be
producing a remote state config cache file on disk when it doesn't
actually need one: the backend config comes from the plan file when
applying a saved plan.
This commit is contained in:
Martin Atkins 2018-11-08 15:22:41 -08:00
parent c05a556c0e
commit 592850e22c
1 changed files with 3 additions and 4 deletions

View File

@ -651,9 +651,8 @@ func TestApply_plan_remoteState(t *testing.T) {
// Create a remote state
state := testState()
backendState, srv := testRemoteState(t, state, 200)
_, srv := testRemoteState(t, state, 200)
defer srv.Close()
testStateFileRemote(t, backendState)
_, snap := testModuleWithSnapshot(t, "apply")
backendConfig := cty.ObjectVal(map[string]cty.Value{
@ -702,8 +701,8 @@ func TestApply_plan_remoteState(t *testing.T) {
}
// Check that there is no remote state config
if _, err := os.Stat(remoteStatePath); err == nil {
t.Fatalf("has remote state config")
if src, err := ioutil.ReadFile(remoteStatePath); err == nil {
t.Fatalf("has %s file; should not\n%s", remoteStatePath, src)
}
}