Skip to content

test(api): gate the live-validation record test behind OASF_SCHEMA_URL - #1981

Open
conorbronsdon wants to merge 1 commit into
agntcy:mainfrom
conorbronsdon:test/record-validate-network
Open

test(api): gate the live-validation record test behind OASF_SCHEMA_URL#1981
conorbronsdon wants to merge 1 commit into
agntcy:mainfrom
conorbronsdon:test/record-validate-network

Conversation

@conorbronsdon

@conorbronsdon conorbronsdon commented Aug 5, 2026

Copy link
Copy Markdown
Member

Follow-up to #1953, from @akijakya's review note there: TestRecord_Validate in api/core/v1/record_test.go also 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 when OASF_SCHEMA_URL is set (the variable #1953 introduces for the cli validate tests) and skips otherwise. The hermetic fakeValidator tests 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/... (from api/) skips the live test and passes offline in 0.008s; with OASF_SCHEMA_URL=https://schema.oasf.outshift.com the integration test runs its five cases and passes.

Note on checks: the Test / E2E / Test Client failure is a pre-existing intermittent race in tests/e2e/client/02_events_test.go (a case-sensitive assertion loses to RST_STREAM ... CANCEL), in a module this PR can't reach — the same job passes on the base commit on main.

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>
@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Aug 5, 2026
@conorbronsdon
conorbronsdon marked this pull request as ready for review August 6, 2026 15:37
@conorbronsdon
conorbronsdon requested a review from a team as a code owner August 6, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-49 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant