Skip to content

tests: use mock servers for schema loading#311

Open
HNO3Miracle wants to merge 1 commit into
pb33f:mainfrom
HNO3Miracle:hno3/mock-schema-loading
Open

tests: use mock servers for schema loading#311
HNO3Miracle wants to merge 1 commit into
pb33f:mainfrom
HNO3Miracle:hno3/mock-schema-loading

Conversation

@HNO3Miracle

Copy link
Copy Markdown

Make the OpenAPI 3.0 and 3.1 schema source URLs replaceable within package tests, then point the remote-schema cases at their existing httptest servers. This makes the assertions validate the supplied remote content instead of depending on GitHub network access. Defaults remain unchanged for library users.

Tested with go test ./....

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.26%. Comparing base (f309f59) to head (03f8429).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
- Coverage   98.27%   98.26%   -0.01%     
==========================================
  Files          75       75              
  Lines        9192     9190       -2     
==========================================
- Hits         9033     9031       -2     
  Misses        132      132              
  Partials       27       27              
Flag Coverage Δ
unittests 98.26% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant