vbehar/helm3-unittest

It's possible to use multiple files?

Opened this issue · 1 comments

Hi!

I'm trying to use more than one file test and everything that I try test outside of deployment_test.yaml gives me:

Error:
documentIndex 0 out of range

Am I doing something wrong?

Deployment Test

suite: test deployment
values:
  - values.yaml
templates:
  - deployment.yaml
tests:
  - it: should pass all kinds of assertion
    asserts:
      - isNotEmpty:
          path: spec.template.spec.containers[0].image
      - isNotEmpty:
          path: metadata.name
      - isNotEmpty:
          path: spec.template.spec.containers[0].livenessProbe
      - isNotEmpty:
          path: spec.template.spec.containers[0].readinessProbe
      - isNotEmpty:
          path: spec.template.spec.containers[0].resources
      - isNotEmpty:
          path: spec.template.spec.serviceAccountName   
      - notMatchRegex:
          path: metadata.name
          pattern: ^.*-foobar$
      - isNotNull:
          path: spec.template
      - isKind:
          of: Deployment

Service Test

suite: test service
values:
  - values.yaml
templates:
  - service.yaml
tests:
  - it: should pass
    asserts:
      - isNotEmpty:
            path: spec.ports
      - isNotEmpty:
            path: spec.ports.port
      - isNotEm
<img width="530" alt="deployment_test yaml — helm-charts 2022-05-06 16-47-50" src="https://user-images.githubusercontent.com/51094510/167207854-e701ca75-21dc-4c96-ba81-36dcc3e53983.png">
pty:
            path: spec.ports.targetPort
      - equal:
            path: spec.type
            value: ClusterIP

Sorry for the novice question!

Thanks!