Skip to content

test: add gateway conformance tests #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .env-gwc
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# ENV vars recommended for running gateway-conformance tests
USE_LIBP2P=false
USE_BITSWAP=true
PORT=8090 # helia-http-gateway should be running here
TRUSTLESS_GATEWAYS=http://127.0.0.1:8080 # Kubo should be running here
DELEGATED_ROUTING_V1_HOST=http://127.0.0.1:8080 # Kubo should be running here
DEBUG='helia-http-gateway*,*helia-fetch*,*helia:trustless-gateway-block-broker*'
USE_TRUSTLESS_GATEWAYS=true
USE_DELEGATED_ROUTING=true
export USE_LIBP2P=true
export USE_BITSWAP=true
export USE_SUBDOMAINS=false
export PORT="8080" # helia-http-gateway should be running here
export KUBO_PORT="8081" # Kubo should be running here
export TRUSTLESS_GATEWAYS="http://127.0.0.1:8081" # Kubo should be running here
export DELEGATED_ROUTING_V1_HOST="http://127.0.0.1:8081" # Kubo should be running here
# DEBUG='helia-http-gateway*,*helia-fetch*,*helia:trustless-gateway-block-broker*'
export DEBUG='helia*,helia*:trace'
export USE_TRUSTLESS_GATEWAYS=true
export USE_DELEGATED_ROUTING=true

# Uncomment the two below to save blockstore and datastore to disk
# FILE_DATASTORE_PATH=./data/datastore
# FILE_BLOCKSTORE_PATH=./data/blockstore

# Uncomment the below to see request & response headers in the logs
# ECHO_HEADERS=true

export GWC_DOCKER_IMAGE=ghcr.io/ipfs/gateway-conformance:v0.5.0

# skip most of the tests
export GWC_SKIP="^.*(TestNativeDag|TestPathing|TestPlainCodec|TestDagPbConversion|TestGatewayJsonCbor|TestCors|TestGatewayJSONCborAndIPNS|TestGatewayIPNSPath|TestRedirectCanonicalIPNS|TestGatewayCache|TestGatewaySubdomains|TestUnixFSDirectoryListingOnSubdomainGateway|TestRedirectsFileWithIfNoneMatchHeader|TestTar|TestRedirects|TestPathGatewayMiscellaneous|TestGatewayUnixFSFileRanges|TestGatewaySymlink|TestUnixFSDirectoryListing|TestGatewayBlock|IPNS|TestTrustless|TestSubdomainGatewayDNSLinkInlining).*$"
export GWC_GATEWAY_URL="http://helia-http-gateway.localhost"
# GWC_SUBDOMAIN_URL="http://helia-http-gateway.localhost"
# GWC_GATEWAY_URL="http://127.0.0.1:8080"
export GWC_GATEWAY_URL="http://host.docker.internal:8080"
export GWC_SUBDOMAIN_URL="http://host.docker.internal:8080"
5 changes: 3 additions & 2 deletions .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ jobs:
# use below to skip specific test if needed
# args: -skip 'TestFooBr/GET_response_for_something'
#
# only-if-cached: helia-ht does not guarantee local cache, we will adjust upstream test (which was Kubo-specific)
# only-if-cached: helia-ht does not guarantee local cache, we will
# adjust upstream test (which was Kubo-specific)
# for now disabling these test cases
args: -skip '^.*(DirectoryListing|TestGatewayCache|TestSubdomainGatewayDNSLinkInlining|proxy|TestGatewaySubdomainAndIPNS|TestGatewaySubdomains|Trustless|TestGatewayIPNSRecord|RedirectsFile|TestGatewayUnixFSFileRanges|TestGatewayJSONCborAndIPNS|TestTar|Symlink|TestPathGatewayMiscellaneous|TestGatewayBlock|TestRedirectCanonicalIPNS|TestGatewayIPNSPath|TestNativeDag|TestPathing|TestPlainCodec|TestDagPbConversion|TestGatewayJsonCbor|TestCors).*$'
args: -skip '^.*(TestDNSLinkGatewayUnixFSDirectoryListing|TestNativeDag|TestPathing|TestPlainCodec|TestDagPbConversion|TestGatewayJsonCbor|TestCors|TestGatewayJSONCborAndIPNS|TestGatewayIPNSPath|TestRedirectCanonicalIPNS|TestGatewayCache|TestGatewaySubdomains|TestUnixFSDirectoryListingOnSubdomainGateway|TestRedirectsFileWithIfNoneMatchHeader|TestTar|TestRedirects|TestPathGatewayMiscellaneous|TestGatewayUnixFSFileRanges|TestGatewaySymlink|TestUnixFSDirectoryListing|TestGatewayBlock|IPNS|TestTrustless|TestSubdomainGatewayDNSLinkInlining).*$'

# 7. Upload the results
- name: Upload MD summary
Expand Down
35 changes: 5 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,10 @@ node_modules
package-lock.json
yarn.lock
.vscode

# env config files
.env*
*.nix
.tool-versions
.direnv

# helia-http-gateway specific files
/test-results/
/playwright-report/
/playwright/.cache/
screenshots
.envrc
scripts/tmp/fixtures
scripts/tmp/kubo-path.txt
test/fixtures/e2e

# helia-http-gateway debugging files
debugging/test-gateways.log
permutation-logs
*.csv
*.log
blockstore
datastore
*.heapsnapshot

# grafana/prometheus files
config/grafana/alerting
config/grafana/grafana.db
.DS_Store
debugging/*.log
scripts/tmp
test
test-results
*-report.json
*.log
.env*
Loading
Loading