Description
The undeploy e2e test has been consistently failing because the undeployed URL now returns HTTP 200 instead of the expected 404.
Error
expect(received).toEqual(expected)
Expected: 404
Received: 200
Failure at e2e/e2e.js:109. 2 of 3 e2e tests pass; only the undeploy assertion fails.
Root Cause
After calling undeployWeb(), the test fetches the previously deployed URL and asserts a 404. However, the CDN behavior has changed — it now returns 200 (likely serving a cached response or a default page) even after the origin content is removed.
The e2e test file (e2e/e2e.js) was last updated in October 2021 and predates this CDN behavior change.
Expected Fix
Update the undeploy assertion in e2e/e2e.js to account for CDN caching behavior. Options include:
- Wait for cache invalidation before asserting 404 (add a delay or poll)
- Assert on response content rather than status code (e.g., check the body is no longer the deployed content)
- Accept 200 as valid if the CDN returning a cached/default page is expected behavior post-undeploy
Evidence
Related
Description
The
undeploye2e test has been consistently failing because the undeployed URL now returns HTTP200instead of the expected404.Error
Failure at
e2e/e2e.js:109. 2 of 3 e2e tests pass; only the undeploy assertion fails.Root Cause
After calling
undeployWeb(), the test fetches the previously deployed URL and asserts a404. However, the CDN behavior has changed — it now returns200(likely serving a cached response or a default page) even after the origin content is removed.The e2e test file (
e2e/e2e.js) was last updated in October 2021 and predates this CDN behavior change.Expected Fix
Update the undeploy assertion in
e2e/e2e.jsto account for CDN caching behavior. Options include:Evidence
aio-e2e-tests/repositories.jsonRelated