test(api): gate the live-validation record test behind OASF_SCHEMA_URL - #1981
Open
conorbronsdon wants to merge 1 commit into
Open
test(api): gate the live-validation record test behind OASF_SCHEMA_URL#1981conorbronsdon wants to merge 1 commit into
conorbronsdon wants to merge 1 commit into
Conversation
TestRecord_Validate hard-codes the live OASF schema server, so the default unit run for api/core/v1 depends on that host being reachable. It now runs only when OASF_SCHEMA_URL is set, the same variable the cli/cmd/validate tests use, and skips otherwise. The hermetic fakeValidator tests in the same file keep covering the validation path by default. Follow-up to agntcy#1953, from the review note there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Conor Bronsdon <cmbronsdon@gmail.com>
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.
Follow-up to #1953, from @akijakya's review note there:
TestRecord_Validateinapi/core/v1/record_test.goalso calls the live OASF schema server, so the default unit run for that module still depends on the host being reachable. It now runs only whenOASF_SCHEMA_URLis set (the variable #1953 introduces for the cli validate tests) and skips otherwise. The hermeticfakeValidatortests in the same file keep covering the validation plumbing by default; live-schema coverage for record pushes stays in the e2e suite.Verified both ways: the default
go test ./core/v1/...(fromapi/) skips the live test and passes offline in 0.008s; withOASF_SCHEMA_URL=https://schema.oasf.outshift.comthe integration test runs its five cases and passes.Note on checks: the
Test / E2E / Test Clientfailure is a pre-existing intermittent race intests/e2e/client/02_events_test.go(a case-sensitive assertion loses toRST_STREAM ... CANCEL), in a module this PR can't reach — the same job passes on the base commit on main.