name: "Gets initContainers correctly"

input:
  components:
    - name: testing-container-1
      container:
        image: testing-image-1
        mountSources: false # isolate test to not include volumes
        memoryRequest: "-1"  # isolate test to not include this field
        memoryLimit: "-1"  # isolate test to not include this field
        cpuRequest: "-1"  # isolate test to not include this field
        cpuLimit: "-1"  # isolate test to not include this field
    - name: testing-container-2
      container:
        image: testing-image-2
        mountSources: false # isolate test to not include volumes
        memoryRequest: "-1"  # isolate test to not include this field
        memoryLimit: "-1"  # isolate test to not include this field
        cpuRequest: "-1"  # isolate test to not include this field
        cpuLimit: "-1"  # isolate test to not include this field
  commands:
    - id: test_preStart_command
      apply:
        component: testing-container-2
  events:
    preStart:
      - "test_preStart_command"
output:
  podAdditions:
    containers:
      - name: testing-container-1
        image: testing-image-1
        imagePullPolicy: Always
        env:
          - name: "DEVWORKSPACE_COMPONENT_NAME"
            value: "testing-container-1"
        resources:
          requests:
            memory: "-1"
            cpu: "-1"
          limits:
            memory: "-1"
            cpu: "-1"
    initContainers:
      - name: testing-container-2
        image: testing-image-2
        imagePullPolicy: Always
        env:
          - name: "DEVWORKSPACE_COMPONENT_NAME"
            value: "testing-container-2"
        resources:
          requests:
            memory: "-1"
            cpu: "-1"
          limits:
            memory: "-1"
            cpu: "-1"
