quintush / helm-unittest

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

[feature] unable to lookup template in folder in sub-chart automatically #192

Closed x0ddf closed 1 year ago

x0ddf commented 1 year ago

Feature description

I have the following chart structure in one of my charts:

├── Chart.yaml
├── templates
│   ├── app1
│   │   ├── configmap.yaml
│   │   ├── deployment.yaml
│   │   └── service.yaml
│   ├── app2
│   │   ├── configmap.yaml
│   │   ├── deployment.yaml
│   │   └── service.yaml
│   ├── app3
│   │   ├── deployment.yaml
│   │   ├── secret.yaml
│   │   └── service.yaml
│   └── app4
│       ├── configmap.yaml
│       ├── deployment.yaml
│       └── service.yaml
├── tests
│   ├── __snapshot__
│   └── security_test.yaml
└── values.yaml

When I'm trying to run tests against this chart, I see the error message: template "<chart-name>/templates/deployment.yaml" not exists or not selected in test suite

Expected result

Test run against every deployment.yaml in the chart

Workaround

Use relative paths for every deployment as shown here