Skip to content
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

test: add test for comparing rendered content vs public gateway #502

Open
2 tasks
SgtPooki opened this issue Dec 5, 2024 · 1 comment
Open
2 tasks

test: add test for comparing rendered content vs public gateway #502

SgtPooki opened this issue Dec 5, 2024 · 1 comment
Labels
P1 High: Likely tackled by core team if no one steps up

Comments

@SgtPooki
Copy link
Member

SgtPooki commented Dec 5, 2024

We want to ensure sw-gateway is rendering content the same as our current public gateways.

steps:

  • decide on CIDs to test
  • write e2e test that will take snapshot of rendered sw-gateway response and compare vs rendered public gateway(ipfs.io/dweb.link) response
@lidel
Copy link
Member

lidel commented Dec 5, 2024

There are too many things, for this to bring any meaningful confidence, we need to reimplement a chunk of conformance test suite, so maybe reframe this to be a basic E2E smoke test?

We could pick most impactful tests to catch regressions, my E2E shortlist would be:

  • JPG or JSON directly (/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR)
  • /ipfs/dir-cid redirecting to /ipfs/dir-cid/ and confirming URL ends with trailing slash
  • /ipfs/dir-cid/ returns HTML from with /ipfs/dir-cid/index.html (normal + HAMT)
  • TBD: dir listing /ipfs/dir-cid/ for directory without index.html (normal + HAMT)
    • this is generated, so we can't expect pixel-perfect copy, all we care is if links to expected child files exist

Failing any of those is very bad. Other things will have limited blast radius.

@lidel lidel added the P1 High: Likely tackled by core team if no one steps up label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

2 participants