Skip to content

feat: add e2e test infrastructure with k3d and Camunda 8#30

Open
lenaschoenburg wants to merge 6 commits intomainfrom
e2e-tests
Open

feat: add e2e test infrastructure with k3d and Camunda 8#30
lenaschoenburg wants to merge 6 commits intomainfrom
e2e-tests

Conversation

@lenaschoenburg
Copy link
Copy Markdown
Owner

Summary

Adds end-to-end test infrastructure for testing c8-backup against a real Kubernetes cluster with Camunda 8.

Changes

  • lib+bin restructure: Split main.rs into lib.rs + thin main.rs so integration tests can import crate modules directly
  • E2E tests (ES mode): tests/e2e_es.rs — tests list and create commands against a Camunda 8 cluster with Elasticsearch secondary storage
  • E2E tests (RDBMS mode): tests/e2e_rdbms.rs — tests list and create commands against a Camunda 8 cluster with PostgreSQL + filesystem backup store
  • k3d setup scripts: scripts/e2e-setup.sh and scripts/e2e-teardown.sh for local cluster management
  • CI workflow: .github/workflows/e2e.yml with two parallel jobs (ES and RDBMS), each deploying a k3d cluster with the appropriate Camunda 8 configuration
  • Test Helm values: Minimal Camunda 8 deployment values for both modes

Local usage

./scripts/e2e-setup.sh           # Create k3d cluster + deploy Camunda
cargo test --test e2e_es -- --nocapture --ignored   # Run ES tests
cargo test --test e2e_rdbms -- --nocapture --ignored # Run RDBMS tests
./scripts/e2e-teardown.sh        # Cleanup

Design decisions

  • Tests use #[ignore] and skip gracefully when no cluster is available, so cargo test still works without a cluster
  • 22 existing unit tests continue to pass unchanged
  • 4 new e2e tests are ignored by default (require live cluster)

Test plan

  • cargo build passes
  • cargo test — 22 passed, 4 ignored
  • cargo fmt --check clean
  • E2E tests pass on k3d cluster (CI will validate)

- Restructure to lib+bin for test importability (src/lib.rs)
- Add e2e tests for both ES and RDBMS storage modes
- Add proper Helm values for RDBMS mode (secondaryStorage.type=rdbms)
- Add k3d setup/teardown scripts for local testing
- Add CI workflow with separate ES and RDBMS test jobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant