-
-
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(gateway-conformance): also run gateway conformance tests against…
… a gateway-over-libp2p endpoint
- Loading branch information
1 parent
7920327
commit ae66308
Showing
1 changed file
with
49 additions
and
0 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 |
---|---|---|
|
@@ -60,6 +60,7 @@ jobs: | |
run: | | ||
./ipfs init | ||
./ipfs config --json Gateway.PublicGateways "$GATEWAY_PUBLIC_GATEWAYS" | ||
./ipfs config --json Experimental.Libp2pStreamMounting true | ||
working-directory: kubo-gateway/cmd/ipfs | ||
|
||
# 4. Populate the Kubo gateway with the gateway-conformance fixtures | ||
|
@@ -115,3 +116,51 @@ jobs: | |
with: | ||
name: gateway-conformance.json | ||
path: output.json | ||
|
||
# 8. Setup a kubo http-p2p-proxy to run gateway conformance tests | ||
- name: Init p2p-proxy kubo node | ||
env: | ||
IPFS_PATH: "~/.kubo-p2p-proxy" | ||
run: | | ||
./ipfs init --profile=randomports | ||
./ipfs config --json Experimental.Libp2pStreamMounting true | ||
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/8081" | ||
working-directory: kubo-gateway/cmd/ipfs | ||
|
||
# 9. Start the kubo http-p2p-proxy and setup the forwarder | ||
- name: Start kubo-gateway | ||
env: | ||
IPFS_PATH: "~/.kubo-p2p-proxy" | ||
run: | | ||
gatewayNodeId=$(ipfs id -f="<id>" --api=/ip4/127.0.0.1/tcp/5001) | ||
./ipfs daemon --offline & | ||
./ipfs p2p forward --allow-custom-protocol /http/1.1 /ip4/127.0.0.1/tcp/8082 /p2p/$gatewayNodeId | ||
working-directory: kubo-gateway/cmd/ipfs | ||
|
||
# 10. Run the gateway-conformance tests | ||
- name: Run gateway-conformance tests over libp2p | ||
uses: ipfs/gateway-conformance/.github/actions/[email protected] | ||
with: | ||
gateway-url: http://127.0.0.1:8081 | ||
json: output.json | ||
xml: output.xml | ||
html: output.html | ||
markdown: output.md | ||
args: --specs "trustless-gateway,-trustless-ipns-gateway" -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length' | ||
|
||
# 11. Upload the results | ||
- name: Upload MD summary | ||
if: failure() || success() | ||
run: cat output.md >> $GITHUB_STEP_SUMMARY | ||
- name: Upload HTML report | ||
if: failure() || success() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: gateway-conformance-libp2p.html | ||
path: output.html | ||
- name: Upload JSON report | ||
if: failure() || success() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: gateway-conformance-libp2p.json | ||
path: output.json |