quintush / helm-unittest

BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin.
MIT License
344 stars 69 forks source link

Support for array filtering in paths #158

Closed rquinio1A closed 1 year ago

rquinio1A commented 2 years ago

Instead of

- matchRegex:
      path: spec.template.spec.containers[0].env[2].value

it would be more maintainable to filter on the properties of the array elements:

- matchRegex:
      path: spec.template.spec.containers[0].env[@name==JAVA_OPTS].value

Even better would be to replacing the custom path traversal implementation (https://github.com/quintush/helm-unittest/blob/master/pkg/unittest/valueutils/valueutils.go#L156) by a dedicated lib.

There seems to be 2 standards:

quintush commented 1 year ago

Feature is implemented in version v0.3.0 available in the main helm-unittest/helm-unittest repo.

Greetings, @quintush