-
Notifications
You must be signed in to change notification settings - Fork 9
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
Minimal E2E tests #134
Comments
Do we want to change the landing page or do you mean we want to confirm new subdomains land on ipfs-sw-config page? or that accessing The rest make sense |
I meant just a quick smoke test to confirm config page is rendered on initial load, when there is no SW. Have separate one for |
#162 was also merged that can allow for testing inbrowser.dev and inbrowser.link. |
This issue tracks the minimal set of end-to-end regression tests we want to have,
along with pointers at preexisting fixtures we could reuse.
Goal
We want a minimal set of regression tests that are easy to maintain, don't take a lot of space.
Coverage does not need to be complete. We will add gateway-conformance in the future. We need something before that happens.
Minimal regression tests
Below is a quick brain dump of E2E tests we need to tackle development going forward.
SW configuration screen
#ipfs-sw-config
- fix: first-hit handling renders redirect page correctly #163Critical gateway modes
We can test these in isolation with
hello
bytes inlined inside of identity CID:http://127.0.0.1:{port}/ipfs/bafkqablimvwgy3y
(no subdomain possible on IPs) and confirm the response was HTTP 200 and the body washello
- test: path-routing of identity CID #146http://sw.localhost:{port}/ipfs/bafkqablimvwgy3y
and confirm the final response was HTTP 301 tohttp://bafkqablimvwgy3y.ipfs.sw.localhost:{port}
http://bafkqablimvwgy3y.ipfs.sw.localhost:{port}
and confirm the final response was HTTP 200 and the body washello
Basic web hosting
We can reuse fixtures from gateway-conformance:
index.html
returnsindex.html
http://127.0.0.1:{port}/ipfs/bafybeifq2rzpqnqrsdupncmkmhs3ckxxjhuvdcbvydkgvch3ms24k5lo7q
the final response was HTTP 301 to the same URL but with trailing/
(http://127.0.0.1:{port}/ipfs/bafybeifq2rzpqnqrsdupncmkmhs3ckxxjhuvdcbvydkgvch3ms24k5lo7q/
)http://127.0.0.1:{port}/ipfs/bafybeifq2rzpqnqrsdupncmkmhs3ckxxjhuvdcbvydkgvch3ms24k5lo7q/
and confirm content type istext/html
and the body matches the expected byte length ofindex.html
/ipfs/bafybeidbclfqleg2uojchspzd4bob56dqetqjsj27gy2cq3klkkgxtpn4i/685.txt
, confirm content type istext/plain
, and body length in bytes matches.Range: bytes=0-0
request for/ipfs/QmYhmPjhFjYFyaoiuNzYv8WGavpSRDwdHWe5B4M5du5Rtk
, expect response to be HTTP 206 with body equal to the first byte of the fileRange: bytes=2200-
request for/ipfs/QmYhmPjhFjYFyaoiuNzYv8WGavpSRDwdHWe5B4M5du5Rtk
, expect response to be HTTP 206 with body equal to the expected tail of the fileThe text was updated successfully, but these errors were encountered: