opentofu/internal/backend
Eng Zer Jun fedd315275
test: use T.TempDir to create temporary test directory (#30803)
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-08 17:34:16 +01:00
..
init Initial commit of 'cloud' package 2021-10-28 19:29:09 -05:00
local test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
remote Upgrade go-tfe dependency to use 1.0 version. It contains breaking changes, so we are updating method signatures, method names and the type of optional parameters, as needed. (#30626) 2022-03-23 13:58:47 -07:00
remote-state internal/backend/remote-state/oss: fix dropped error (#30352) 2022-04-01 08:07:31 +01:00
backend_test.go Move backend/ to internal/backend/ 2021-05-17 14:09:07 -07:00
backend.go backend/local: Remove unused DisablePlanFileStateLineageChecks flag 2022-01-13 11:00:10 -06:00
cli.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
operation_type.go Move backend/ to internal/backend/ 2021-05-17 14:09:07 -07:00
operationtype_string.go Move backend/ to internal/backend/ 2021-05-17 14:09:07 -07:00
testing.go command/workspace_delete: Allow deleting a workspace with empty husks 2021-10-13 13:54:11 -07:00
unparsed_value_test.go core and backend: remove redundant handling of default variable values 2022-01-10 12:26:54 -08:00
unparsed_value.go core and backend: remove redundant handling of default variable values 2022-01-10 12:26:54 -08:00