Skip to content

test(e2e): migrate the E2E app suite from BATS to Kyverno Chainsaw #2979

Closed

Description

@myasnikovdaniil

Goal

Migrate the E2E app test suite from BATS to Kyverno Chainsaw — a declarative, Kubernetes-native E2E framework (CNCF, KUTTL successor) — replacing the per-app BATS loop in hack/e2e-apps/.

Context

This was piloted and grown to the full suite in #2826 (postgres + bucket → all 18 app suites). That PR is being postponed out of the immediate #2397 "move E2E off the PR pipeline" push and tracked here, so the Chainsaw exploration doesn't gate the keystone E2E work. The branch feat/e2e-chainsaw-example stands as the reference implementation.

Why

Scope (from the #2826 prototype)

  • Port all 18 app suites under hack/e2e-chainsaw/: postgres, bucket, mariadb, mongodb, redis, qdrant, clickhouse, kafka, etcd, openbao, harbor, foundationdb, external-dns, kuberture, vminstance, gateway, kubernetes-latest, kubernetes-previous.
  • Keep imperative logic in script steps (openbao init/unseal, kuberture external-dns probes, vminstance, gateway admission/impersonation, kubernetes-*); reuse hack/e2e-chainsaw/_lib/run-kubernetes.sh verbatim.
  • CI: the e2e job runs chainsaw test hack/e2e-chainsaw/ via a new test-chainsaw target and uploads the JUnit chainsaw-report.xml; add the chainsaw binary to the e2e-sandbox image. install-cozystack and test-openapi stay BATS.

Open questions / risks to resolve before adopting

  • Chainsaw v0.2.15 JMESPath bug: number-literal comparisons (ports[?port == + "N" + ]) mis-evaluate; the prototype works around it with the (ports[*].port) projection form. Confirm fixed/tracked upstream before relying on number-literal filters.
  • TIA integration: how Chainsaw test directories map to select-e2e.sh per-app selection (today keyed on hack/e2e-apps/*.bats).
  • BATS retirement cadence: dual-run (Chainsaw alongside BATS) vs hard cutover. test(e2e): migrate app suite from BATS to Chainsaw and wire into CI #2826 removes the .bats files outright — decide whether to soak in parallel first.
  • Soak the three platform-dependent suites (gateway, kuberture, external-dns) and the two heavyweight kubernetes-* suites on full-platform CI before cutover.

References

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    area/ciIssues or PRs related to CI workflows, GitHub Actions, automation
    area/testingIssues or PRs related to testing (e2e, bats, unit tests)
    on Jun 22, 2026
  2. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete
    on Jul 1, 2026
  3. myasnikovdaniil commented on Aug 14, 2026

    @myasnikovdaniil
    ContributorAuthor

    Done in #2826. hack/e2e-chainsaw/ carries 22 app suites on main, 21 enabled plus backup disabled, and bats stays for cluster bootstrap and the OpenAPI checks by design.

    One thing the migration left behind, worth knowing before this closes: hack/e2e-apps/ still holds monitoring-oidc-system.bats and monitoring-oidc-customconfig.bats, and no Makefile, hack script or workflow invokes either. Their 11 assertions on Grafana auth.generic_oauth, the per-instance KeycloakClient and KeycloakClientScope, the 32-char client-secret Secret, skip_org_role_sync and the users-Job are the only e2e coverage monitoring OIDC has, and the kubernetes-oidc-* chainsaw suites are the tenant apiserver path, not this one. So that coverage reads as present and runs nowhere. #3453 carries it, and #3778 is the gate that makes this class loud instead of silent.

    Closing this one.

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

Metadata

Metadata

Labels

area/ciIssues or PRs related to CI workflows, GitHub Actions, automationarea/testingIssues or PRs related to testing (e2e, bats, unit tests)kind/featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions