Skip to content

Fix http-specs e2e test failures and exit code masking#9970

Open
Copilot wants to merge 4 commits intomainfrom
copilot/fix-http-specs-e2e-tests
Open

Fix http-specs e2e test failures and exit code masking#9970
Copilot wants to merge 4 commits intomainfrom
copilot/fix-http-specs-e2e-tests

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

  • Fix validate-client-server script to return non-zero exit code on failure
  • Fix Encode_Duration_Header_float* scenarios (4 failures): add missing request headers to createHeaderFloatServerTests
  • Fix Payload_MultiPart_FormData_File_upload* scenarios (3 failures): replace invalid content-type header with proper multipart body
  • Fix Payload_Pageable_XmlPagination_* scenarios (4 failures):
    • Fix response content-type header from application/xml to application/xml; charset=utf-8
    • Fix listWithNextLink response body to use dynamic base URL via Resolver
  • Fix server-test.ts bug: use raw (resolved content) instead of body.rawContent in XML/text body comparison
  • Verified all 11 failing scenarios now pass (✓ 749 passed, exit code 0)
  • Add changelog entry
  • Format code with prettier
Original prompt

This section details on the original issue you should resolve

<issue_title>http-specs e2e tests are not passing in main.</issue_title>
<issue_description>The server and client test are not passing

runniong pnpm test:e2e doesn't pass, not sure why we are not running this in the CI

Seems like command doesn't actually return non zero exit code

Image</issue_description>

<agent_instructions>Check why the test:e2e command in packages/http-specs is not returning non zero exit code and fix the mock api. The server implementation is probably correct it's most likely the client definition that is not</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Fix validate-client-server script to properly propagate exit code
- Fix Duration Header float scenarios: add missing request headers
- Fix Multipart File upload scenarios: use proper multipart body
- Fix Pageable XML content-type header to include charset=utf-8
- Fix Pageable XML listWithNextLink response body to use dynamic Resolver
- Fix server-test.ts bug: compare resolved content (raw) not rawContent

Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added lib:http-specs For issues/prs related to the @typespec/http-specs package spector Issues related to spector and the spec sets labels Mar 9, 2026
Copilot AI changed the title [WIP] Fix http-specs e2e tests to pass in main Fix http-specs e2e test failures and exit code masking Mar 9, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-specs@9970
npm i https://pkg.pr.new/@typespec/spector@9970

commit: ba59a03

@timotheeguerin
Copy link
Member

@copilot add changelog and format

- Add chronus changeset for http-specs and spector fixes
- Format mockapi.ts with prettier

Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 9, 2026

@copilot add changelog and format

Done in commit 0b56418 — added a chronus changeset for @typespec/http-specs and @typespec/spector, and ran prettier to format the code.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build node pec/�� ebsite/src/conte--llmstxt node de_modules/pnpm/dist/node-gyp-bin/sh --no-emit tsconfig.build.j/home/REDACTED/work/typespec/typespec/packages/http-specs/node_modules�� /.bin/node node sion�� rs &amp;&amp; pnpm build:src tsconfig.build.json pec/node_modules/.bin/sh import @typespecnode SE_fce680ab2cc46/home/REDACTED/work/typespec/typespec/packages/http-server-js/node_modules/.bin/..hint rsioning/referendoc uname (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

All changed packages have been documented.

  • @typespec/http-specs
  • @typespec/spector
Show changes

@typespec/http-specs - internal ✏️

Fix e2e test failures: duration header float scenarios, multipart file upload scenarios, XML pagination content-type mismatch, and response body data mismatch validation

@typespec/spector - internal ✏️

Fix e2e test failures: duration header float scenarios, multipart file upload scenarios, XML pagination content-type mismatch, and response body data mismatch validation

@timotheeguerin timotheeguerin marked this pull request as ready for review March 9, 2026 22:03
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib:http-specs For issues/prs related to the @typespec/http-specs package spector Issues related to spector and the spec sets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http-specs e2e tests are not passing in main.

3 participants