apiVersion: batch/v1
kind: Job
metadata:
  name: oidc-mocha
spec:
  template:
    spec:
      containers:
      - name: node
        image: node
        command:
        - /bin/bash
        - -x
        - -c
        - |
          yarn add puppeteer-core
          yarn add chai
          yarn add mocha
          node_modules/mocha/bin/mocha /tests/04-oidc-login-test.js --timeout 30000
        volumeMounts:
        - name: tests
          mountPath: /tests
      restartPolicy: Never
      volumes:
        - name: tests
          configMap:
            name: 04-oidc-login-test
