test(e2e): isolate enterprise sso test runs#8660
Conversation
Suffix the SAML connection name/domain with a random per-run id, and skip the afterAll delete when beforeAll never assigned the connection. A single failed run on the long-running staging instance no longer leaves a stale connection that 422s every subsequent create, and a beforeAll failure now surfaces in the report instead of being masked by a TypeError in afterAll.
🦋 Changeset detectedLatest commit: a8ff252 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR isolates enterprise SSO test runs by generating unique identifiers per execution. The test now imports Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
This was causing persistent E2E failures on unrelated PRs. This change should avoid same-type failures in the future.
The enterprise SSO test pinned a single connection name + domain (
E2E Test SAML Connection/e2e-enterprise-test.dev) on a shared long-running staging instance. When a run failed between the create inbeforeAlland the delete inafterAll, the connection survived and every subsequent run got a 422 from BAPI on the duplicate domain. The 422 inbeforeAllleftenterpriseConnectionundefined, andafterAllthen crashed reading.id, masking the real error.Suffix the connection name and domain with a 4-byte hex per run, and guard the
afterAlldelete onenterpriseConnectionbeing defined so abeforeAllfailure surfaces in the report instead of being shadowed by aTypeError.Stale connection on the staging instance was deleted out of band.