Browse Source

Use t.Tempdir

Signed-off-by: Julien <roidelapluie@o11y.eu>
pull/14769/head
Julien 3 months ago
parent
commit
1f02c2177b
  1. 5
      config/reload_test.go

5
config/reload_test.go

@ -22,10 +22,7 @@ import (
) )
func TestGenerateChecksum(t *testing.T) { func TestGenerateChecksum(t *testing.T) {
// Create a temporary directory to hold the test files. tmpDir := t.TempDir()
tmpDir, err := os.MkdirTemp("", "checksum_test")
require.NoError(t, err)
defer os.RemoveAll(tmpDir) // Clean up.
// Define paths for the temporary files. // Define paths for the temporary files.
yamlFilePath := filepath.Join(tmpDir, "test.yml") yamlFilePath := filepath.Join(tmpDir, "test.yml")

Loading…
Cancel
Save