tests: gate remote flatten fixtures as long tests#222
Open
HNO3Miracle wants to merge 1 commit into
Open
Conversation
Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #222 +/- ##
==========================================
- Coverage 91.83% 91.44% -0.39%
==========================================
Files 30 30
Lines 3393 4244 +851
==========================================
+ Hits 3116 3881 +765
- Misses 194 281 +87
+ Partials 83 82 -1 ☔ View full report in Codecov by Harness. |
fredbi
requested changes
Jul 23, 2026
fredbi
left a comment
Member
There was a problem hiding this comment.
Instead of simply disabling the test, I'd prefer that the spec is served on an embedded httpttest server.
| } | ||
|
|
||
| func TestFlatten_RemoteAbsolute(t *testing.T) { | ||
| if !antest.LongTestsEnabled() { |
Member
There was a problem hiding this comment.
Disabling the test is not desirable, and I disagree with weakening the test suite.
What is needed instead to really improve this test is to serve the entire spec locally (e.g. with a httptest server like you've seen in your "go-openapi/validate" PR). But the fixture needs some tweaking to resolve remotes against a localhost test server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestFlatten_RemoteAbsolutefetches the CloudEvents v0.2 schema fromraw.githubusercontent.com. Reuse the existing-enable-longtest switch so the default unit suite works offline while preserving an explicit path to run the remote fixture coverage.Tested with
go test ./....