Skip to content

Gateway test build needs canvas:a2ui:bundle for renamed canvas-auth test #64

@arubis

Description

@arubis

Context

Upstream commit 2dcb2449 ("refactor(test): dedupe gateway and web scaffolding") renamed server.canvas-auth.e2e.test.ts to server.canvas-auth.test.ts. The vitest base config excludes **/*.e2e.test.ts, so this test was never running in the gateway suite before the rename.

The test asserts that a scoped A2UI fetch returns HTTP 200, but that requires a2ui.bundle.js to exist on disk. Our gateway-tests-build.sh only does pnpm install — it doesn't run canvas:a2ui:bundle, so the test gets 503 ("A2UI assets not found").

Current workaround

PR #63 patches the test expectation from 200 to 503 in gateway-postpatch.sh to unblock CI.

Proposed fix

Expand gateway-tests-build.sh to run the canvas:a2ui:bundle step (with the rolldown PATH shim, native dep rebuild, etc.) so the test environment has the assets it needs. This would bring the test build closer to production parity.

Considerations

  • Increases test build time and complexity
  • Requires the same rolldown shim from gateway-build.sh
  • Need chmod -R u+w node_modules and pnpm rebuild for native deps
  • Alternative: keep the 503 patch if upstream changes their test expectations

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions