suite: service name test
templates:
  - common.yaml
release:
  name: test-release-name
  namespace: test-release-namespace
tests:
  - it: should generate correct name
    set:
      service:
        my-service1:
          enabled: true
          primary: true
          ports:
            port-name:
              enabled: true
              primary: true
              port: 12344
        my-service2:
          enabled: true
          ports:
            port-name:
              enabled: true
              primary: true
              port: 12345
        my-service3:
          enabled: true
          expandObjectName: false
          ports:
            port-name:
              enabled: true
              primary: true
              port: 12345
      workload:
        my-workload:
          enabled: true
          primary: true
          type: Deployment
          podSpec: {}
    asserts:
      - documentIndex: &serviceDoc 1
        isKind:
          of: Service
      - documentIndex: *serviceDoc
        isAPIVersion:
          of: v1
      - documentIndex: *serviceDoc
        equal:
          path: metadata.name
          value: test-release-name-common-test
      - documentIndex: &otherServiceDoc 2
        isKind:
          of: Service
      - documentIndex: *otherServiceDoc
        isAPIVersion:
          of: v1
      - documentIndex: *otherServiceDoc
        equal:
          path: metadata.name
          value: test-release-name-common-test-my-service2
      - documentIndex: &thirdServiceDoc 3
        isKind:
          of: Service
      - documentIndex: *thirdServiceDoc
        isAPIVersion:
          of: v1
      - documentIndex: *thirdServiceDoc
        equal:
          path: metadata.name
          value: my-service3
