suite: test service_account
templates:
  - service_account.yaml
tests:
  # test options related to service accounts
  - it: should set name to \"logdna-agent\"
    asserts:
      - equal:
          path: metadata.name
          value: logdna-agent
  - it: should set name to overriden value
    set:
      serviceAccount.name: my-service-account
    asserts:
      - equal:
          path: metadata.name
          value: my-service-account
  - it: should not be created if specified not to
    set:
      serviceAccount.create: false
    asserts:
      - hasDocuments:
         count: 0
  - it: should not be created if specified not to even with overriden service account name
    set:
      serviceAccount.create: false
      serviceAccount.name: my-service
    asserts:
      - hasDocuments:
         count: 0
