https://garden.io logo
#🌱|help-and-getting-started
Run tests on an existing Pod
# 🌱|help-and-getting-started
b

bored-grass-81679

02/03/2023, 9:11 AM
Hey! I might be missing something, but Garden is currently always creating a new Pod and running the tests on it. I would like to run integration tests on an existing Pod.Is there a way to achieve this? Here is a snippet from my helm module:
Copy code
tests:
  - name: integration
    dependencies: [secrets, ic-be-helm-ci-integration]
    disabled: ${ !var.integration }
    timeout: 600
    command:
    - /bin/sh
    - '-c'
    - 'python manage.py test instance_api/tests/integration --keepdb'
    resource:
      podSelector:
        layer: backend
        type: controller
        app: lex
UPDATE: I read the documentation and determined that this is the intended behaviour. I still would like to know though, if there is a way to bypass this behaviour? This is particularly important as tests currently do not copy volumeMounts(https://github.com/garden-io/garden/issues/1766), which makes the test pods unusable for me :(. Alternatively, a quick/dirty fix for the volumeMount problem would also be appreciated. For now Im juste gonna use kubectl exec.
k

kind-france-89777

02/03/2023, 4:47 PM
kubectl exec in a local exec task is exactly how I’ve been handling this as well
2 Views