Skip to content

e2e: two BATS suites left in hack/e2e-apps/ are not run by anything #3786

Description

hack/e2e-apps/ still holds two BATS suites, and nothing runs them.

$ git ls-tree -r main --name-only | grep '^hack/e2e-apps/'
hack/e2e-apps/monitoring-oidc-customconfig.bats
hack/e2e-apps/monitoring-oidc-system.bats

$ git grep -l e2e-apps -- .github/ Makefile hack/select-e2e.sh
(no matches)

The three places that could pick them up do not. BATS_UNIT_FILES := $(filter-out hack/e2e-%.bats,$(wildcard hack/*.bats)) is not recursive, so make unit-tests never sees the subdirectory. hack/select-e2e.sh matches hack/[^/]+\.bats$, which excludes it by the same shape. packages/core/testing/Makefile does run BATS through hack/cozytest.sh, but only for three files named one by one: e2e-prepare-cluster.bats, e2e-install-cozystack.bats, e2e-test-openapi.bats.

This is not an oversight in wiring. hack/e2e-chainsaw/README.md says what happened:

This directory replaces the per-app BATS suite that used to live in hack/e2e-apps/*.bats.

Most of that suite was ported, and the ported files carry it in their headers ("Chainsaw port of hack/e2e-apps/bucket.bats", and so on). Two were left behind when the directory stopped being wired up, so they now sit in the tree looking like tests while being dead weight.

What makes it worth an issue rather than a cleanup commit is that the two are not obviously disposable. They cover monitoring OIDC in two shapes, custom config and system, and the Chainsaw tree has no equivalent. So the choice is between porting them and deleting them, and that needs someone who knows whether the coverage is still wanted.

Whichever way it goes, the current state is the worst of the three: a reader grepping for OIDC monitoring coverage finds them and reasonably concludes it exists.

One consequence worth stating because it bit during unrelated work: assertions in these two files are unverifiable by any run, so a defect in them is invisible until someone reads the file. Two of the negated assertions there were rewritten recently and could only be checked by reasoning, not by running anything.

Activity

  1. lexfrei commented on Sep 7, 2026

    @lexfrei
    ContributorAuthor

    A second reason to resolve these rather than leave them sitting, found while reworking the OIDC chainsaw suites.

    Both files describe themselves as render-side: monitoring-oidc-system.bats:3 says "render-side", :82 says "which the render-side test deliberately avoids", and monitoring-oidc-customconfig.bats:4 says "render-side only". That mode is what #3802 removes for the chainsaw OIDC suites. A test that applies a tenant Kubernetes CR cannot end at its render-side asserts, because the release is still installing and the remainder gets billed to the cleanup budget on top of the teardown.

    So these two are not merely unexecuted. They document an approach the tree is moving away from, and being unexecuted is what let that go unnoticed. Whichever way this resolves, wired in or deleted, the render-side framing should not survive it unexamined.

  2. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
  3. lexfrei commented on Sep 23, 2026

    @lexfrei
    ContributorAuthor

    Duplicate of #3638, which tracks the same two files in hack/e2e-apps/. The monitoring OIDC port is in #4051.

  4. added
    triage/duplicateIndicates an issue is a duplicate of another issue
    and removed
    triage/acceptedIndicates an issue is ready to be actively worked on
    on Sep 23, 2026
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 bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/duplicateIndicates an issue is a duplicate of another issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions