Skip to content

Commit

Permalink
test: run helm tests as subtests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin committed May 7, 2024
1 parent 01144a7 commit 5155dbd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/iac/scanners/helm/test/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,14 @@ func Test_tar_is_chart(t *testing.T) {
}

for _, test := range tests {

t.Logf("Running test: %s", test.testName)
testPath := filepath.Join("testdata", test.archiveFile)
func() {
t.Run(test.testName, func(t *testing.T) {
testPath := filepath.Join("testdata", test.archiveFile)
file, err := os.Open(testPath)
require.NoError(t, err)
defer file.Close()

assert.Equal(t, test.isHelmChart, detection.IsHelmChartArchive(test.archiveFile, file))
}()
})
}
}

Expand Down

0 comments on commit 5155dbd

Please sign in to comment.