Skip to content

Commit

Permalink
test: add testcase with recursive symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin committed May 7, 2024
1 parent 5155dbd commit e0bc1eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/iac/scanners/helm/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func TestParseFS(t *testing.T) {
// mkdir -p dir && cp -p Chart.yaml dir/Chart.yaml
// mkdir -p sym-to-file && ln -s ../Chart.yaml sym-to-file/Chart.yaml
// ln -s dir sym-to-dir
// mkdir rec-sym && touch rec-sym/Chart.yaml
// ln -s . ./rec-sym/a
// cd .. && tar -czvf chart.tar.gz chart && rm -rf chart
p, err := New(".")
require.NoError(t, err)
Expand All @@ -39,6 +41,8 @@ func TestParseFS(t *testing.T) {
expectedFiles := []string{
"chart/Chart.yaml",
"chart/dir/Chart.yaml",
"chart/rec-sym/Chart.yaml",
"chart/rec-sym/a/Chart.yaml",
"chart/sym-to-dir/Chart.yaml",
"chart/sym-to-file/Chart.yaml",
}
Expand Down
Binary file not shown.

0 comments on commit e0bc1eb

Please sign in to comment.