From 5ab5c980bf80fcaf28fc5293d5914c467d1267c4 Mon Sep 17 00:00:00 2001 From: Nedyalko Andreev Date: Sat, 5 Mar 2022 15:13:07 +0200 Subject: [PATCH] Fix TestArchiveThresholds to not leave archive in repo --- cmd/archive_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/archive_test.go b/cmd/archive_test.go index 0b53a651866..3e1d36d6e18 100644 --- a/cmd/archive_test.go +++ b/cmd/archive_test.go @@ -40,10 +40,12 @@ func TestArchiveThresholds(t *testing.T) { t.Run(testCase.name, func(t *testing.T) { t.Parallel() + tmpPath := filepath.Join(t.TempDir(), "archive.tar") + cmd := getArchiveCmd(testutils.NewLogger(t), newCommandFlags()) filename, err := filepath.Abs(testCase.testFilename) require.NoError(t, err) - args := []string{filename} + args := []string{filename, "--archive-out", tmpPath} if testCase.noThresholds { args = append(args, "--no-thresholds") }