-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: AbstractionFactory <[email protected]>
- Loading branch information
1 parent
5cc5308
commit 2942d1c
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) The OpenTofu Authors | ||
// SPDX-License-Identifier: MPL-2.0 | ||
// Copyright (c) 2023 HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
//go:build go1.24 | ||
|
||
package tofutestutils | ||
|
||
import ( | ||
"context" | ||
"github.com/opentofu/tofutestutils/testcontext" | ||
"testing" | ||
) | ||
|
||
// Context creates a context with a deadline that allows for enough time to clean up a test before the testing framework | ||
// unceremoniously kills the process. Starting with Go 1.24, this function is an alias for t.Context(). In Go 1.23 and | ||
// lower this function reserves 25% of the test timeout, minimum 1 minute, maximum 5 minutes for cleanup. | ||
// | ||
// Deprecated: Consider using t.Context() instead. | ||
func Context(t *testing.T) context.Context { | ||
return testcontext.Context(t) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters