# This test is due to an inconsistency in devfile/api semantics; see
# issue https://github.com/devfile/api/issues/290

name: "Handles container with mountSources and explicit projects volume"

input:
  components:
    - name: testing-container-1
      container:
        image: testing-image-1
        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
        sourceMapping: "/testdir1"
        mountSources: true
        volumeMounts:
          - name: "projects"
            path: "/not-source-mapping"

output:
  podAdditions:
    containers:
      - name: testing-container-1
        image: testing-image-1
        imagePullPolicy: Always
        resources:
          requests:
            memory: "-1"
            cpu: "-1"
          limits:
            memory: "-1"
            cpu: "-1"
        volumeMounts:
          - name: "projects"
            mountPath: "/not-source-mapping"
        env:
          - name: "DEVWORKSPACE_COMPONENT_NAME"
            value: "testing-container-1"
          - name: "PROJECTS_ROOT"
            value: "/not-source-mapping"
          - name: "PROJECTS_SOURCE"
            value: "/not-source-mapping" # Temp value until projects is figured out
