Skip to content

Commit

Permalink
Fix test compilation errors caused by interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSpiker committed Oct 7, 2022
1 parent 7b43fef commit cf761dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,6 @@ github.com/hashicorp/go-slug v0.10.0/go.mod h1:Ib+IWBYfEfJGI1ZyXMGNbu2BU+aa3Dzu4
github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-tfe v1.9.0 h1:jkmyo7WKNA7gZDegG5imndoC4sojWXhqMufO+KcHqrU=
github.com/hashicorp/go-tfe v1.9.0/go.mod h1:uSWi2sPw7tLrqNIiASid9j3SprbbkPSJ/2s3X0mMemg=
github.com/hashicorp/go-tfe v1.10.1-0.20220928193356-874da9f84be6 h1:XKoRN/bE5bGZIZPp+sDRAn5da7j49Pu2oP2+LnnuL1g=
github.com/hashicorp/go-tfe v1.10.1-0.20220928193356-874da9f84be6/go.mod h1:uSWi2sPw7tLrqNIiASid9j3SprbbkPSJ/2s3X0mMemg=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/local/backend_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (b backendWithStateStorageThatFailsRefresh) Configure(cty.Value) tfdiags.Di
return nil
}

func (b backendWithStateStorageThatFailsRefresh) DeleteWorkspace(name string) error {
func (b backendWithStateStorageThatFailsRefresh) DeleteWorkspace(name string, force bool) error {
return fmt.Errorf("unimplemented")
}

Expand Down
8 changes: 4 additions & 4 deletions internal/backend/local/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestLocal_addAndRemoveStates(t *testing.T) {
t.Fatalf("expected %q, got %q", expectedStates, states)
}

if err := b.DeleteWorkspace(expectedA); err != nil {
if err := b.DeleteWorkspace(expectedA, true); err != nil {
t.Fatal(err)
}

Expand All @@ -147,7 +147,7 @@ func TestLocal_addAndRemoveStates(t *testing.T) {
t.Fatalf("expected %q, got %q", expectedStates, states)
}

if err := b.DeleteWorkspace(expectedB); err != nil {
if err := b.DeleteWorkspace(expectedB, true); err != nil {
t.Fatal(err)
}

Expand All @@ -161,7 +161,7 @@ func TestLocal_addAndRemoveStates(t *testing.T) {
t.Fatalf("expected %q, got %q", expectedStates, states)
}

if err := b.DeleteWorkspace(dflt); err == nil {
if err := b.DeleteWorkspace(dflt, true); err == nil {
t.Fatal("expected error deleting default state")
}
}
Expand Down Expand Up @@ -220,7 +220,7 @@ func TestLocal_multiStateBackend(t *testing.T) {
t.Fatal("expected errTestDelegateStates, got:", err)
}

if err := b.DeleteWorkspace("test"); err != errTestDelegateDeleteState {
if err := b.DeleteWorkspace("test", true); err != errTestDelegateDeleteState {
t.Fatal("expected errTestDelegateDeleteState, got:", err)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/remote-state/s3/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func TestBackendExtraPaths(t *testing.T) {
}

// delete the real workspace
if err := b.DeleteWorkspace("s2"); err != nil {
if err := b.DeleteWorkspace("s2", true); err != nil {
t.Fatal(err)
}

Expand Down

0 comments on commit cf761dd

Please sign in to comment.