Skip to content

testing: the helm unit sweep never visits packages/tests, so the library's whole suite hangs on one delegation line in another package's Makefile #3646

Closed

Description

Summary

The helm unit-test sweep iterates packages/apps packages/core packages/extra packages/system packages/library (hack/helm-unit-tests.sh:36) and never visits packages/tests/. The whole cozy-lib-tests suite runs only because packages/library/cozy-lib/Makefile carries a delegating target, test: $(MAKE) -C ../../tests/cozy-lib-tests/ test. Deleting that one line makes the library's entire test coverage vanish silently: the sweep stays green, exits 0, and prints "All Helm unit tests passed", because the tests_found backstop is satisfied by the other packages.

Measured at 85fd592 by removing the delegation line and re-running the sweep: package visited 1 to 0, suite executions 1 to 0, run still green.

Why the existing checks cannot catch it

Correction to an earlier version of this description, which named "suite-shadowing" and "positive-evidence" guards: no mechanisms by those names exist in the tree. What the sweep actually does is check each visited directory for a Makefile, probe it with make -n test, and increment tests_found. Both of the first two presuppose the directory was visited at all, so they cannot see a directory the loop never reaches; and tests_found counts across the whole run rather than per package, so the other directories satisfy it and the run stays green. The effect is the same as originally described, the reason is simply the loop's scope plus an aggregate counter, not per-package coverage machinery.

Fix shape

Add packages/tests to the sweep's directory list. Today it holds a single package (cozy-lib-tests), so the cost is one visited directory; the suite then runs on its own standing and the delegation line in the library Makefile becomes a convenience rather than the single point of coverage. The delegation itself can stay for make -C packages/library/cozy-lib test ergonomics.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/testingIssues or PRs related to testing (e2e, bats, unit tests)
    on Aug 8, 2026
  2. lexfrei commented on Sep 23, 2026

    @lexfrei
    ContributorAuthor

    Fixed by #3670. hack/helm-unit-tests.sh now walks packages/tests directly, so cozy-lib-tests no longer depends on the delegation line in the cozy-lib Makefile. #3629 is about the same gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/testingIssues or PRs related to testing (e2e, bats, unit tests)kind/bugCategorizes issue or PR as related to a bugtriage/not-reproducibleIndicates an issue can not be reproduced as described

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions