You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: improvements to remote-bindings tests to reduce flakes (#10380)
* chore: improvements to remote-bindings tests to reduce flakes
* retry wrangler-remote-resources checks a few times
* move the getPlatformProxy remote-bindings tests to the e2e CI job
* move `startDev` into its own module so it is possible to mock it
* move `startRemoteProxySession` into its own module so it is possible to mock it
* add missing types to `Binding` type
* add missing `remote` property and update jsdoc for Config type
* Allow config watching in unit tests
The tests were previously failing because the controller had not been been torn down before the end of the test, rather than the actual watching being a problem in itself.
When the tests end, the current working directory gets reverted from the temporary directory that was created for it. Since the controller had not been torn down, the config file change triggered a config change event which then tries to read the config from the wrong current working directory, causing an exception.
* Remove wrangler-remote-resources e2e test
This is now covered by a combination of:
- `packages/wrangler/e2e/remote-binding/miniflare-remote-resources.test.ts` - actually tests that we can create, deploy and connect to the remote dev session worker.
- `packages/wrangler/src/__tests__/dev/remote-bindings.test.ts` - tests that we generate the correct config for the remote session proxy worker and local miniflare session.
The removed e2e test was very flaky and slow as it required creating and deleting a lot of resources in Cloudflare.
The new test runs entirely without any dependency on Cloudflare and is super fast (<20 secs).
* add Wrangler remote bindings unit tests
* ensure configcontroller is torn down before tmp directory is deleted
* wait for config watching to be updated
* ignore changes if the watcher is closed
* Allow the "too large" upload test more time to pass
Sometimes timesout on Windows
* abort if this config controller is no longer viable
* remove unnecessary `console.dir()` calls in tests
* update ubuntu in CI tests
* run wrangler tests before fixtures
* Update packages/wrangler/e2e/helpers/e2e-wrangler-test.ts
Co-authored-by: Dario Piotrowicz <[email protected]>
* run all linux tests on ubuntu 24
---------
Co-authored-by: Dario Piotrowicz <[email protected]>
echo: "E2E tests cannot run on pull requests created from forks due to security reasons. Please reach out to a workers-sdk maintainer to run the E2E tests on behalf of this PR."
0 commit comments