Skip to content

Commit

Permalink
improve(wrangler): fix subdomain tests
Browse files Browse the repository at this point in the history
Many tests had mocks that weren't called,
or had false assertions about not updating subdomain routes when they
actually were being updated.

Additionally, available_on_subdomain is now unecessary during
script-upload, as it is not read there, due to being handled entirely
within triggers-deploy. This also saves a double call to get /subdomain
in the new-api path.

The get/update subdomain helpers are refactored from deploy/version
tests, and unified to standardize default workername and legacyEnv.

I wanted to remove the getSubdomain mock from mockUpload entirely, but
there were a bit too many callsites... At least every test now that
makes assertions about workers.dev deployments does explicitly reset the
mock return value.
  • Loading branch information
taylorlee committed Nov 9, 2024
1 parent f0e6e15 commit 9ae9c6c
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 150 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-tigers-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

Avoid an unnecessary GET request during `wrangler deploy`.
Loading

0 comments on commit 9ae9c6c

Please sign in to comment.