-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test script for car verify (#236)
* Add test script for car verify * Add test script for filter
- Loading branch information
Showing
8 changed files
with
83 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# To prevent CRLF breakages on Windows for fragile files, like testdata. | ||
* -text |
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,30 @@ | ||
# basic filter | ||
stdin filteredcids.txt | ||
car filter ${INPUTS}/sample-wrapped-v2.car out.car | ||
stderr 'warning: no roots defined after filtering' | ||
car list out.car | ||
! stderr . | ||
cmp stdout filteredcids.txt | ||
|
||
# filter with root CID | ||
stdin filteredroot.txt | ||
car filter ${INPUTS}/sample-wrapped-v2.car out.car | ||
! stderr . | ||
car list out.car | ||
! stderr . | ||
cmp stdout filteredroot.txt | ||
|
||
# append other cids | ||
stdin filteredcids.txt | ||
car filter -append ${INPUTS}/sample-wrapped-v2.car out.car | ||
! stderr . | ||
car list out.car | ||
stdout -count=4 '^bafy' | ||
|
||
|
||
-- filteredcids.txt -- | ||
bafy2bzacebohz654namrgmwjjx4qmtwgxixsd7pn4tlanyrc3g3hwj75hlxrw | ||
bafy2bzaceaqtiesyfqd2jibmofz22oolguzf5wscwh73rmeypglfu2xhkptri | ||
bafy2bzacebct3dm7izgyauijzkaf3yd7ylni725k66rq7dfp3jr5ywhpprj3k | ||
-- filteredroot.txt -- | ||
bafy2bzaced4ueelaegfs5fqu4tzsh6ywbbpfk3cxppupmxfdhbpbhzawfw5oy |
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,3 @@ | ||
# "verify" should exit with code 0 on reasonable cars. | ||
car verify ${INPUTS}/sample-v1.car | ||
car verify ${INPUTS}/sample-wrapped-v2.car |
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