Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ It also forwards gRPC on port `50051` to your local machine.

## Running Tests

Keep `devspace dev` running in another terminal, then use:

```sh
devspace enter
pnpm test
DOCKER_RUNNER_SHARED_SECRET=change-me pnpm test:e2e
devspace run test
devspace run test:e2e
devspace run enter
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] devspace run enter duplicates the built-in devspace enter, which already targets the dev container defined in the dev: section. Consider whether the custom command is needed — if the goal is a consistent devspace run * interface, that's fine, but it's worth a brief note in the README that devspace enter also works.

```

`pnpm test` runs unit + integration tests; the integration suite requires
Docker, provided by the DinD sidecar in the dev pod. The e2e suite requires the
shared secret env var shown above.
`devspace run test` runs unit + integration tests; the integration suite
requires Docker, provided by the DinD sidecar in the dev pod. `devspace run
test:e2e` runs the e2e suite, with `DOCKER_RUNNER_SHARED_SECRET` already
provided by the Helm deployment. `devspace run enter` opens an interactive shell
in the dev container.

## Troubleshooting

Expand Down
20 changes: 20 additions & 0 deletions devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ version: v2beta1
vars:
DOCKER_RUNNER_NAMESPACE: platform

commands:
test: |-
exec_container \
--label-selector "app.kubernetes.io/name=docker-runner,app.kubernetes.io/instance=docker-runner" \
--container docker-runner \
-n ${DOCKER_RUNNER_NAMESPACE} \
-- pnpm test
test:e2e: |-
exec_container \
--label-selector "app.kubernetes.io/name=docker-runner,app.kubernetes.io/instance=docker-runner" \
--container docker-runner \
-n ${DOCKER_RUNNER_NAMESPACE} \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] The label selector, --container, and -n flags are identical across all three commands. If the selector or namespace changes, you'd need to update it in three places here plus the dev: section (four total).

Consider extracting the common selector into a variable:

vars:
  DOCKER_RUNNER_NAMESPACE: platform
  DOCKER_RUNNER_SELECTOR: "app.kubernetes.io/name=docker-runner,app.kubernetes.io/instance=docker-runner"

Then each command becomes:

  test: |-
    exec_container \
      --label-selector "${DOCKER_RUNNER_SELECTOR}" \
      --container docker-runner \
      -n ${DOCKER_RUNNER_NAMESPACE} \
      -- pnpm test

This keeps the selector definition in one place alongside the dev: config.

-- pnpm test:e2e
enter: |-
exec_container \
--label-selector "app.kubernetes.io/name=docker-runner,app.kubernetes.io/instance=docker-runner" \
--container docker-runner \
-n ${DOCKER_RUNNER_NAMESPACE} \
-- sh

pipelines:
dev: |-
if kubectl get application docker-runner -n argocd >/dev/null 2>&1; then
Expand Down
Loading