cleanup metrics_du_test in /tmp

parent a2dbd456
...@@ -507,6 +507,7 @@ func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error) { ...@@ -507,6 +507,7 @@ func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer os.RemoveAll(tmpDir)
out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", tmpDir).CombinedOutput() out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", tmpDir).CombinedOutput()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed command 'du' on %s with error %v", tmpDir, err) return nil, fmt.Errorf("failed command 'du' on %s with error %v", tmpDir, err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment