mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-16 11:42:58 -06:00
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:
parent
c05a556c0e
commit
592850e22c
@ -651,9 +651,8 @@ func TestApply_plan_remoteState(t *testing.T) {
|
|||||||
|
|
||||||
// Create a remote state
|
// Create a remote state
|
||||||
state := testState()
|
state := testState()
|
||||||
backendState, srv := testRemoteState(t, state, 200)
|
_, srv := testRemoteState(t, state, 200)
|
||||||
defer srv.Close()
|
defer srv.Close()
|
||||||
testStateFileRemote(t, backendState)
|
|
||||||
|
|
||||||
_, snap := testModuleWithSnapshot(t, "apply")
|
_, snap := testModuleWithSnapshot(t, "apply")
|
||||||
backendConfig := cty.ObjectVal(map[string]cty.Value{
|
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
|
// Check that there is no remote state config
|
||||||
if _, err := os.Stat(remoteStatePath); err == nil {
|
if src, err := ioutil.ReadFile(remoteStatePath); err == nil {
|
||||||
t.Fatalf("has remote state config")
|
t.Fatalf("has %s file; should not\n%s", remoteStatePath, src)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user