Skip to content

test(lago): restore schema tests, skip only the docker-dependent case#13716

Open
AlinsRan wants to merge 2 commits into
apache:masterfrom
AlinsRan:test/restore-lago-schema-tests
Open

test(lago): restore schema tests, skip only the docker-dependent case#13716
AlinsRan wants to merge 2 commits into
apache:masterfrom
AlinsRan:test/restore-lago-schema-tests

Conversation

@AlinsRan

Copy link
Copy Markdown
Contributor

Description

t/plugin/lago.t has 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:

  • TEST 1 — pure check_schema validation, plain Lua, no network, no docker. It was never the problem; it was just collateral damage of the file-level skip.
  • TEST 2 — runs pnpm test plugin/lago.spec.mts, which clones getlago/lago over 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 --- SKIP on TEST 2 and restores use t::APISIX 'no_plan';. TEST 1 runs again; TEST 2 stays skipped.

I chose --- SKIP over splitting TEST 1 into a separate .t file 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

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible

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
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 20, 2026
@AlinsRan

Copy link
Copy Markdown
Contributor Author

Ran the restored file locally against an APISIX build: t/plugin/lago.t passes, with TEST 2 skipped as intended. So the schema assertions in TEST 1 are still valid against the current plugin schema — they were only collateral damage from the file-level skip_all.

The lint forbids a bare `--- SKIP`, which is the right rule: a bypass
without a stated reason is indistinguishable from an accident.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant