From 6b036998d03cd4e3bdb5fd09aab95f459b8cdc2d Mon Sep 17 00:00:00 2001 From: AliDatadog Date: Tue, 25 Jul 2023 15:11:25 +0200 Subject: [PATCH] move pkg analyzer inside the test --- pkg/fanal/analyzer/pkg/apk/apk_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/fanal/analyzer/pkg/apk/apk_test.go b/pkg/fanal/analyzer/pkg/apk/apk_test.go index 6c13887ca32d..fa46a28258e0 100644 --- a/pkg/fanal/analyzer/pkg/apk/apk_test.go +++ b/pkg/fanal/analyzer/pkg/apk/apk_test.go @@ -408,9 +408,9 @@ func TestParseApkInfo(t *testing.T) { wantFiles: files, }, } - a := alpinePkgAnalyzer{} for testname, tt := range tests { t.Run(testname, func(t *testing.T) { + a := alpinePkgAnalyzer{} read, err := os.Open(tt.path) require.NoError(t, err) scanner := bufio.NewScanner(read)