kudobuilder / kudobuilder/kuttl
Allow partial comparison of slices in asserts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 824
- Forks
- 103
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 6
Description
**Edit 2025-02-03:**
Note the [recently added CEL support](https://github.com/kudobuilder/kuttl/issues/76#issuecomment-2630344898) which should help with this issue
---
**What would you like to be added**:
It would be great to check only the subset of a slice in a test step assertion. Currently, it is required to specify all the array elements, otherwise, a test fails with `slice length mismatch` error.
**Why is this needed**:
Here are some real-life pain points:
- if istio injection is enabled, a sidecar is running alongside with the main container in a pod, and it needs to be reflected in test assertions;
- testing mutating webhook, which updates environment variables or volume/volume mounts for some container in a pod, and a test case checks the applied patch;
- pod's status conditions (say, the goal of a test step is to check the only one, final condition);
- and so on
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the KEP process at keps/0001-kep-process.md and review the recent CEL support referenced in the issue comments. Compare the requested partial slice assertions with the existing assertion behavior and determine the intended scope and completion criteria through the KEP process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100