1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Replace tenv with usetesting (#6313)

The `tenv` linter is deprecated in favor of `usetesting`.
This commit is contained in:
Damien Mathieu
2025-02-13 11:18:37 +01:00
committed by GitHub
parent 44ea53bad8
commit f62232fa1b
4 changed files with 5 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ import (
func TestReadFileExistent(t *testing.T) {
fileContents := "foo"
f, err := os.CreateTemp("", "readfile_")
f, err := os.CreateTemp(t.TempDir(), "readfile_")
require.NoError(t, err)
defer os.Remove(f.Name())
@@ -31,7 +31,7 @@ func TestReadFileExistent(t *testing.T) {
func TestReadFileNonExistent(t *testing.T) {
// create unique filename
f, err := os.CreateTemp("", "readfile_")
f, err := os.CreateTemp(t.TempDir(), "readfile_")
require.NoError(t, err)
// make file non-existent