Use t.Tempdir

Signed-off-by: Julien <roidelapluie@o11y.eu>
pull/14769/head
Julien 3 months ago
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…
Cancel
Save