Skip to content

Commit

Permalink
Update pkg/fanal/analyzer/pkg/apk/apk_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Teppei Fukuda <[email protected]>
  • Loading branch information
AliDatadog and knqyf263 authored Aug 24, 2023
1 parent 1d5ff73 commit 27c4364
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/fanal/analyzer/pkg/apk/apk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ func TestParseApkInfo(t *testing.T) {
for testname, tt := range tests {
t.Run(testname, func(t *testing.T) {
a := alpinePkgAnalyzer{}
read, err := os.Open(tt.path)
f, err := os.Open(tt.path)
defer f.Close()
require.NoError(t, err)
scanner := bufio.NewScanner(read)
gotPkgs, gotFiles := a.parseApkInfo(scanner, &analyzer.AnalysisOptions{RetainSystemInstalledFiles: tt.RetainSystemInstalledFiles})
Expand Down

0 comments on commit 27c4364

Please sign in to comment.