-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: use car fixtures in sharness t0123
- Loading branch information
1 parent
adb6b38
commit b667cd8
Showing
3 changed files
with
50 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Dataset description/sources | ||
|
||
- dag-cbor-traversal.car | ||
|
||
- dag-json-traversal.car | ||
|
||
- dag-pb.car | ||
|
||
- dag-pb.json | ||
|
||
- fixtures.car | ||
- raw CARv1 | ||
|
||
generated with: | ||
|
||
```sh | ||
mkdir -p rootDir/ipfs && | ||
mkdir -p rootDir/ipns && | ||
mkdir -p rootDir/api && | ||
mkdir -p rootDir/ą/ę && | ||
echo "{ \"test\": \"i am a plain json file\" }" > rootDir/ą/ę/t.json && | ||
echo "I am a txt file on path with utf8" > rootDir/ą/ę/file-źł.txt && | ||
echo "I am a txt file in confusing /api dir" > rootDir/api/file.txt && | ||
echo "I am a txt file in confusing /ipfs dir" > rootDir/ipfs/file.txt && | ||
echo "I am a txt file in confusing /ipns dir" > rootDir/ipns/file.txt && | ||
DIR_CID=$(ipfs add -Qr --cid-version 1 rootDir) && | ||
FILE_JSON_CID=$(ipfs files stat --enc=json /ipfs/$DIR_CID/ą/ę/t.json | jq -r .Hash) && | ||
FILE_CID=$(ipfs files stat --enc=json /ipfs/$DIR_CID/ą/ę/file-źł.txt | jq -r .Hash) && | ||
FILE_SIZE=$(ipfs files stat --enc=json /ipfs/$DIR_CID/ą/ę/file-źł.txt | jq -r .Size) | ||
echo "$FILE_CID / $FILE_SIZE" | ||
|
||
echo DIR_CID=${DIR_CID} # ./rootDir | ||
echo FILE_JSON_CID=${FILE_JSON_CID} # ./rootDir/ą/ę/t.json | ||
echo FILE_CID=${FILE_CID} # ./rootDir/ą/ę/file-źł.txt | ||
echo FILE_SIZE=${FILE_SIZE} | ||
|
||
ipfs dag export ${DIR_CID} > fixtures.car | ||
|
||
# DIR_CID=bafybeiafyvqlazbbbtjnn6how5d6h6l6rxbqc4qgpbmteaiskjrffmyy4a # ./rootDir | ||
# FILE_JSON_CID=bafkreibrppizs3g7axs2jdlnjua6vgpmltv7k72l7v7sa6mmht6mne3qqe # ./rootDir/ą/ę/t.json | ||
# FILE_CID=bafkreialihlqnf5uwo4byh4n3cmwlntwqzxxs2fg5vanqdi3d7tb2l5xkm # ./rootDir/ą/ę/file-źł.txt | ||
# FILE_SIZE=34 | ||
``` |
Binary file not shown.