-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: exclude list may contain glob entries (#62)
* fix: input list may contain glob entries When the input/exclude list is very large, it may be more convenient to specify the entries as globs Signed-off-by: Ramkumar Chinchani <[email protected]> * fix: ignore paths that don't exist Signed-off-by: Ramkumar Chinchani <[email protected]> --------- Signed-off-by: Ramkumar Chinchani <[email protected]>
- Loading branch information
Showing
4 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
load helpers | ||
|
||
function setup() { | ||
common_setup | ||
} | ||
|
||
function teardown() { | ||
common_teardown | ||
} | ||
|
||
@test "build workflow" { | ||
# create folders and files | ||
mkdir -p $BATS_TEST_TMPDIR/dir1/ | ||
truncate -s 1k $BATS_TEST_TMPDIR/dir1/file1 | ||
truncate -s 1k $BATS_TEST_TMPDIR/dir1/file2 | ||
|
||
# directory scan | ||
${TOPDIR}/bin/stacker-bom-linux-amd64 build --name dir1 --pkgname pkg1 --pkgversion 1.0.0 --license MIT --path $BATS_TEST_TMPDIR/dir1 -o $BATS_TEST_TMPDIR/dir1.json | ||
[ -f $BATS_TEST_TMPDIR/dir1.json ] | ||
cat $BATS_TEST_TMPDIR/dir1.json | jq . | ||
rm $BATS_TEST_TMPDIR/dir1.json | ||
|
||
# directory scan with glob | ||
${TOPDIR}/bin/stacker-bom-linux-amd64 build --name dir1 --pkgname pkg1 --pkgversion 1.0.0 --license MIT --path $BATS_TEST_TMPDIR/dir1/.* -o $BATS_TEST_TMPDIR/dir1.json | ||
[ -f $BATS_TEST_TMPDIR/dir1.json ] | ||
cat $BATS_TEST_TMPDIR/dir1.json | jq . | ||
rm $BATS_TEST_TMPDIR/dir1.json | ||
|
||
# file scan with glob | ||
${TOPDIR}/bin/stacker-bom-linux-amd64 build --name dir1 --pkgname pkg1 --pkgversion 1.0.0 --license MIT --path "$BATS_TEST_TMPDIR/dir1/file*" -o $BATS_TEST_TMPDIR/dir1.json | ||
[ -f $BATS_TEST_TMPDIR/dir1.json ] | ||
cat $BATS_TEST_TMPDIR/dir1.json | jq . | ||
rm $BATS_TEST_TMPDIR/dir1.json | ||
} |
File renamed without changes.