app/vmagent/prometheusimport: delete the temporary directory created by vmagent after the test is complete

This is a follow-up for 1cfa183c2b
This commit is contained in:
Aliaksandr Valialkin 2023-01-26 23:21:03 -08:00
parent 73256fe438
commit cb374677a9
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -10,6 +10,7 @@ import (
"testing" "testing"
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmagent/remotewrite" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmagent/remotewrite"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/fs"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/common" "github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/common"
) )
@ -53,4 +54,7 @@ func tearDown() {
common.StopUnmarshalWorkers() common.StopUnmarshalWorkers()
srv.Close() srv.Close()
logger.ResetOutputForTest() logger.ResetOutputForTest()
tmpDataDir := flag.Lookup("remoteWrite.tmpDataPath").Value.String()
fs.MustRemoveAll(tmpDataDir)
} }