Skip to content

testing: about 21 more helm-unittest cases select a document by position or assert absence with no selector #4665

Open

Description

#3634 covered the helm-unittest cases that pick a document by its index, or that assert absence on a template wrapped in a top-level if with no document selector. Both shapes pass when the template stops rendering what they check. #4664 fixes the cases #3634 listed. The same shapes have been added since #3634 was filed, about 21 cases:

  • mongodb tls_test.yaml: 8
  • mariadb tls_test.yaml: 6
  • redis tls_test.yaml: 2 (the external=false ones)
  • kamaji managed args: 2
  • one each in kafka dashboard-resourcemap_test.yaml, cert-manager-issuers solver_test.yaml and seaweedfs volume_resize_hook

Fix shape: select each target document by kind or metadata.name (documentSelector), so an empty or reordered render fails with "document not found". Then add a static check that rejects a new documentIndex on a multi-document template, so the shape stops coming back. Two multi-document test files (kubernetes-nodes/tests/nodegroup_test.yaml, opensearch/tests/tls_test.yaml) were not scanned and need a look too.

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/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