suite: pod smb-pv-pvc volume test
templates:
  - common.yaml
tests:
  - it: should pass with smb-pv-pvc volume
    set:
      workload:
        workload-name1:
          enabled: true
          primary: true
          type: Deployment
          podSpec: {}
      persistence:
        my-volume1:
          enabled: true
          type: smb-pv-pvc
          server: my-server
          share: my-share
          username: my-user
          password: my-pass
        my-volume2:
          enabled: true
          type: smb-pv-pvc
          server: my-server2
          share: my-share2
          username: my-user2
          password: my-pass2
          size: 2Gi
        my-volume3:
          enabled: true
          type: smb-pv-pvc
          server: my-server2
          share: my-share2
          username: my-user2
          password: my-pass2
          size: 3Gi
    asserts:
      - documentIndex: &pvDoc 1
        isKind:
          of: PersistentVolume
      - documentIndex: *pvDoc
        equal:
          path: metadata.name
          value: release-name-common-test-my-volume1-1479673868
      - documentIndex: &otherPvDoc 4
        isKind:
          of: PersistentVolume
      - documentIndex: *otherPvDoc
        equal:
          path: metadata.name
          value: release-name-common-test-my-volume2-1734805617
      - documentIndex: &deploymentDoc 9
        isKind:
          of: Deployment
      - documentIndex: *deploymentDoc
        contains:
          path: spec.template.spec.volumes
          content:
            name: my-volume1
            persistentVolumeClaim:
              claimName: release-name-common-test-my-volume1-1479673868
      - documentIndex: *deploymentDoc
        contains:
          path: spec.template.spec.volumes
          content:
            name: my-volume2
            persistentVolumeClaim:
              claimName: release-name-common-test-my-volume2-1734805617
      - documentIndex: *deploymentDoc
        contains:
          path: spec.template.spec.volumes
          content:
            name: my-volume3
            persistentVolumeClaim:
              claimName: release-name-common-test-my-volume3-1736378482
