Skip to content

Commit

Permalink
tmp: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Mar 11, 2024
1 parent 55530cf commit eab694d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env-gwc
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ USE_DELEGATED_ROUTING=true

# Uncomment the below to see request & response headers in the logs
# ECHO_HEADERS=true
GWC_DOCKER_IMAGE=ghcr.io/ipfs/gateway-conformance:v0.5.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test:gwc-kubo": "node ./scripts/kubo-init.js",
"test:gwc-helia": "npm run build && node -r dotenv/config --trace-warnings dist/src/index.js dotenv_config_path=./.env-gwc",
"test:gwc-setup": "concurrently -k -s all -n \"kubo,helia\" -c \"magenta,blue\" \"npm run test:gwc-kubo\" \"wait-on 'tcp:8080' && npm run test:gwc-helia\"",
"test:gwc-execute": "docker run --network host -v $PWD:/workspace -w /workspace ghcr.io/ipfs/gateway-conformance:v0.4.2 test --gateway-url='http://helia-http-gateway.localhost' --subdomain-url='http://helia-http-gateway.localhost' --verbose --json gwc-report.json --specs subdomain-ipns-gateway,subdomain-ipfs-gateway -- -timeout 30m",
"test:gwc-execute": "docker run --network host -v $PWD:/workspace -w /workspace $GWC_DOCKER_IMAGE test --gateway-url='http://localhost:8090' --subdomain-url='http://localhost:8090' --verbose --json gwc-report.json --specs subdomain-ipns-gateway,subdomain-ipfs-gateway -- -timeout 30m",
"test:gwc": "concurrently -k -s all -n \"kubo&helia,gateway-conformance\" -c \"magenta,blue\" \"npm run test:gwc-setup\" \"wait-on 'tcp:8090' && npm run test:gwc-execute\"",
"healthcheck": "node dist/src/healthcheck.js",
"debug:until-death": "./debugging/until-death.sh",
Expand Down
3 changes: 2 additions & 1 deletion scripts/kubo-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ debug.enable('kubo-init*')

const kuboFilePath = './scripts/tmp/kubo-path.txt'
const GWC_FIXTURES_PATH = `${dirname(kuboFilePath)}/fixtures`
const GWC_DOCKER_IMAGE = process.env.GWC_DOCKER_IMAGE || 'ghcr.io/ipfs/gateway-conformance:v0.5.0'

async function main () {
await $`mkdir -p ${dirname(kuboFilePath)}`
Expand Down Expand Up @@ -97,7 +98,7 @@ async function configureKubo (tmpDir) {
async function downloadFixtures () {
log('Downloading fixtures')
try {
await $`docker run -v ${process.cwd()}:/workspace -w /workspace ghcr.io/ipfs/gateway-conformance:v0.4.2 extract-fixtures --directory ${GWC_FIXTURES_PATH} --merged false`
await $`docker run -v ${process.cwd()}:/workspace -w /workspace ${GWC_DOCKER_IMAGE} extract-fixtures --directory ${GWC_FIXTURES_PATH} --merged false`
} catch (e) {
error('Error downloading fixtures, assuming current or previous success', e)
}
Expand Down

0 comments on commit eab694d

Please sign in to comment.