-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prevent outbound network requests (#113)
Co-authored-by: Nishant Arora <[email protected]>
- Loading branch information
Showing
17 changed files
with
113 additions
and
51 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,9 @@ | ||
# Load fixtures | ||
|
||
We need to load a fixture with the following command: | ||
|
||
```bash | ||
./bin/load-fixtures.sh bafyreif3tfdpr5n4jdrbielmcapwvbpcthepfkwq2vwonmlhirbjmotedi | ||
``` | ||
|
||
then, we can do `npm run test:node -- -g 'lookup via HTTP Gateway'` to run a test that will tell us of any subsequent fixtures we need to load, and replace the CID in the above command with the CID that the test hangs on, and repeat. |
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,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
function main() { | ||
local CID="$1" | ||
curl -H "Accept: application/vnd.ipld.raw" "https://ipfs.io/ipfs/$CID?format=raw" > test/fixtures/$CID.raw.bin | ||
} | ||
|
||
main "$@" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"rules": { | ||
"no-undef": 0 | ||
} | ||
}, | ||
"ignorePatterns": ["**/fixtures/**"], | ||
} |
Binary file added
BIN
+1.45 KB
test/fixtures/bafyreia7ztv2rhv363az3dd6tnmatjdephcskwsfxfkaqvdobi7c24ni2u.raw.bin
Binary file not shown.
Binary file added
BIN
+1.14 KB
test/fixtures/bafyreibkcamxzxibhtvwgjpefk3s43erwzibujnr7rcd4rxxt2pd2y5vma.raw.bin
Binary file not shown.
Binary file added
BIN
+1.23 KB
test/fixtures/bafyreibwa2zmkzcz4kib74ce6defcxesn25yr2qjxevcqy2stsns5kj2xi.raw.bin
Binary file not shown.
Binary file added
BIN
+1.45 KB
test/fixtures/bafyreice5yg453vvbaso4owpjhpuiobmvvemmjnuvibqlhyxfxkl6tgjcy.raw.bin
Binary file not shown.
Binary file added
BIN
+1.45 KB
test/fixtures/bafyreicm6erjl6zqlsaf3n3fokjfnqyqr6kl2ebh2sngfnwzfa5yos2ife.raw.bin
Binary file not shown.
Binary file added
BIN
+1.45 KB
test/fixtures/bafyreicw73odv37k2pimrnyeadv5pejntop4xokrlrudvmnwu5t4gicaku.raw.bin
Binary file not shown.
Binary file added
BIN
+1.45 KB
test/fixtures/bafyreicyir4fzeucvnesg3qkxzmdszs4ydlmjfn7teesksta5t3oeeprua.raw.bin
Binary file not shown.
Binary file added
BIN
+286 Bytes
test/fixtures/bafyreif3tfdpr5n4jdrbielmcapwvbpcthepfkwq2vwonmlhirbjmotedi.raw.bin
Binary file not shown.
Binary file added
BIN
+1.45 KB
test/fixtures/bafyreif446gqrox2ji4qyqmkhv64fhwccoljjeuqej5ogb5gzjlylmonf4.raw.bin
Binary file not shown.
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