From f6af61f9909c30c7dd35d7ba90a107354014eb9d Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 22 Feb 2019 10:14:53 -0500 Subject: [PATCH] fix test that never worked The 0.12 update left this test broken. Make sure we're working with the correct objects here. --- backend/remote-state/s3/backend_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/remote-state/s3/backend_test.go b/backend/remote-state/s3/backend_test.go index be711884d..3fc939c80 100644 --- a/backend/remote-state/s3/backend_test.go +++ b/backend/remote-state/s3/backend_test.go @@ -199,6 +199,11 @@ func TestBackendExtraPaths(t *testing.T) { } // remove the state with extra subkey + if err := client.Delete(); err != nil { + t.Fatal(err) + } + + // delete the real workspace if err := b.DeleteWorkspace("s2"); err != nil { t.Fatal(err) } @@ -216,7 +221,7 @@ func TestBackendExtraPaths(t *testing.T) { t.Fatal(err) } - if stateMgr.StateSnapshotMeta().Lineage == s2Lineage { + if s2Mgr.(*remote.State).StateSnapshotMeta().Lineage == s2Lineage { t.Fatal("state s2 was not deleted") } s2 = s2Mgr.State()