Skip to content

Commit 83505d7

Browse files
committed
linter fix
1 parent 12867f6 commit 83505d7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

internal/provider/helper_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ func randomString(t *testing.T) string {
273273
return v
274274
}
275275

276-
type retryableFn func() (interface{}, error)
276+
type retryableFn func() (any, error)
277277

278-
func retryFn(maxRetries, secondsBetween int, f retryableFn) (interface{}, error) {
278+
func retryFn(maxRetries, secondsBetween int, f retryableFn) (any, error) {
279279
tick := time.NewTicker(time.Duration(secondsBetween) * time.Second)
280280
retries := 0
281281

internal/provider/resource_tfe_workspace_run_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func testAccCheckTFEWorkspaceRunDestroy(workspaceID string, expectedDestroyCount
258258
return func(s *terraform.State) error {
259259
config := testAccProvider.Meta().(ConfiguredClient)
260260

261-
_, err := retryFn(10, 1, func() (interface{}, error) {
261+
mustBeNil, err := retryFn(10, 1, func() (any, error) {
262262
runList, err := config.Client.Runs.List(ctx, workspaceID, &tfe.RunListOptions{
263263
Operation: "destroy",
264264
})
@@ -273,6 +273,11 @@ func testAccCheckTFEWorkspaceRunDestroy(workspaceID string, expectedDestroyCount
273273
return nil, nil
274274
})
275275

276+
// This just makes the unparam linter happy and will always be nil
277+
if mustBeNil != nil {
278+
return fmt.Errorf("expected mustBeNil to be nil, but was %v", mustBeNil)
279+
}
280+
276281
return err
277282
}
278283
}

0 commit comments

Comments
 (0)