github.com/aquasecurity/trivy-iac@v0.8.1-0.20240127024015-3d8e412cf0ab/pkg/scanners/helm/parser/parser_test.go (about) 1 package parser 2 3 import ( 4 "context" 5 "os" 6 "path/filepath" 7 "testing" 8 9 "github.com/stretchr/testify/assert" 10 "github.com/stretchr/testify/require" 11 ) 12 13 func TestParseFS(t *testing.T) { 14 t.Run("source chart is located next to an same archived chart", func(t *testing.T) { 15 p := New(".") 16 require.NoError(t, p.ParseFS(context.TODO(), os.DirFS(filepath.Join("testdata", "chart-and-archived-chart")), ".")) 17 18 expectedFiles := []string{ 19 "my-chart/Chart.yaml", 20 "my-chart/templates/pod.yaml", 21 } 22 assert.Equal(t, expectedFiles, p.filepaths) 23 }) 24 }