Use t.Tempdir
Signed-off-by: Julien <roidelapluie@o11y.eu>
This commit is contained in:
parent
2c553b1772
commit
1f02c2177b
|
@ -22,10 +22,7 @@ import (
|
|||
)
|
||||
|
||||
func TestGenerateChecksum(t *testing.T) {
|
||||
// Create a temporary directory to hold the test files.
|
||||
tmpDir, err := os.MkdirTemp("", "checksum_test")
|
||||
require.NoError(t, err)
|
||||
defer os.RemoveAll(tmpDir) // Clean up.
|
||||
tmpDir := t.TempDir()
|
||||
|
||||
// Define paths for the temporary files.
|
||||
yamlFilePath := filepath.Join(tmpDir, "test.yml")
|
||||
|
|
Loading…
Reference in New Issue