# Source: jenkins/templates/tests/jenkins-test.yaml
apiVersion: v1
kind: Pod
metadata:
  name: "jenkins-ui-test-tndu4"
  namespace: myjenkins
  annotations:
    "helm.sh/hook": test-success
    meta.helm.sh/release-name: 'jenkins'
  labels:
    gitops.jenkins-x.io/pipeline: 'namespaces'
spec:
  initContainers:
    - name: "test-framework"
      image: "bats/bats:1.2.1"
      command:
        - "bash"
        - "-c"
      args:
        - |
          # copy bats to tools dir
          set -ex
          cp -R /opt/bats /tools/bats/
      volumeMounts:
        - mountPath: /tools
          name: tools
  containers:
    - name: jenkins-ui-test
      image: jenkins/jenkins:2.289.1-jdk11
      command: ["/tools/bats/bin/bats", "-t", "/tests/run.sh"]
      volumeMounts:
        - mountPath: /tests
          name: tests
          readOnly: true
        - mountPath: /tools
          name: tools
  volumes:
    - name: tests
      configMap:
        name: jenkins-tests
    - name: tools
      emptyDir: {}
  restartPolicy: Never
