test(lago): restore schema tests, skip only the docker-dependent case#13716
Open
AlinsRan wants to merge 2 commits into
Open
test(lago): restore schema tests, skip only the docker-dependent case#13716AlinsRan wants to merge 2 commits into
AlinsRan wants to merge 2 commits into
Conversation
t/plugin/lago.t has been skipped as a whole file since apache#12903. TEST 1 is pure schema validation with no external dependency, so the file-level skip_all also took out coverage that never had a reason to be flaky. Narrow the skip to TEST 2, which clones the Lago repository and starts its docker compose stack. TEST 1 runs again. Relates to apache#12904
Contributor
Author
|
Ran the restored file locally against an APISIX build: |
The lint forbids a bare `--- SKIP`, which is the right rule: a bypass without a stated reason is indistinguishable from an accident.
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.
Description
t/plugin/lago.thas been skipped as a whole file since #12903 (plan(skip_all)), leaving the lago plugin with no test-nginx coverage at all.The file has two cases and only one of them can be flaky:
check_schemavalidation, plain Lua, no network, no docker. It was never the problem; it was just collateral damage of the file-level skip.pnpm test plugin/lago.spec.mts, which clonesgetlago/lagoover the network and brings up its docker compose stack. This is the flaky one.So this PR replaces the file-level
plan(skip_all)with a per-block--- SKIPon TEST 2 and restoresuse t::APISIX 'no_plan';. TEST 1 runs again; TEST 2 stays skipped.I chose
--- SKIPover splitting TEST 1 into a separate.tfile because it keeps the diff to three lines, leaves TEST 2 in place for whoever fixes the flake, and does not add a new file that CI has to pick up. The comment at the top of the file points back at #12904 so the skip does not become invisible again.This does not fix the underlying flake and does not touch
apisix/plugins/lago.lua, so it only partially addresses the issue.Which issue(s) this PR fixes:
Relates to #12904
Checklist