suite: test migrate extra containers
templates:
  - engine/job-migrate.yaml
release:
  name: oncall
tests:
  - it: migrate.extraContainers="" -> should not create additional containers
    set:
      migrate.extraContainers: ""
    asserts:
      - lengthEqual:
          path: spec.template.spec.containers
          count: 1

  - it: migrate.extraContainers -> should add sidecar containers
    set:
      migrate.extraContainers: |
        - name: cloud-sql-proxy
          image: gcr.io/cloud-sql-connectors/cloud-sql-proxy
    asserts:
      - contains:
          path: spec.template.spec.containers
          content:
            name: cloud-sql-proxy
            image: gcr.io/cloud-sql-connectors/cloud-sql-proxy
