Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

Add comprehensive integration tests for Enterprise CLI commands that run against a Docker Redis Enterprise cluster.

Test Coverage (34 tests)

Cluster Operations

  • enterprise cluster get with table/JSON/YAML output
  • JMESPath query support

Node Operations

  • enterprise node list and enterprise node get
  • JSON output formatting

Database Operations

  • enterprise database list and enterprise database get
  • Dynamic database ID discovery (handles empty clusters)
  • CRUD workflow with license limitation handling

User/Role/ACL Operations

  • List operations with JSON output
  • Validates admin user exists

Additional Coverage

  • License, Module, Proxy operations
  • Logs list, Alerts list, Stats cluster
  • Raw API access (api enterprise get /v1/...)
  • Error handling (nonexistent resources, bad credentials)

Running the Tests

# Start Docker Redis Enterprise
docker compose up -d

# Wait for initialization
docker compose logs -f redis-enterprise-init

# Run integration tests
cargo test --test enterprise_docker_integration_tests -- --ignored

Notes

  • Tests are #[ignore] by default since they require Docker
  • Some endpoints (stats for node/database) are commented out as they don't exist in the Docker test image
  • Database CRUD test gracefully handles license limitations

Addresses #462 (test coverage)

Add comprehensive integration tests for Enterprise CLI commands that run
against a Docker Redis Enterprise cluster. Tests cover:

- Cluster operations (get, JSON/YAML output, JMESPath queries)
- Node operations (list, get)
- Database operations (list, get with dynamic ID discovery)
- User, Role, ACL operations
- License, Module, Proxy operations
- Logs (list) and Alerts (list)
- Stats (cluster)
- Raw API access (/v1/cluster, /v1/nodes, /v1/bdbs)
- Error handling (nonexistent resources, bad credentials)
- Database CRUD workflow (create/get/delete with license handling)

Tests are marked with #[ignore] and run with:
  cargo test --test enterprise_docker_integration_tests -- --ignored

Requires Docker Redis Enterprise cluster:
  docker compose up -d

34 tests total covering major Enterprise CLI functionality.
Add additional Enterprise CLI integration tests:

Workflow tests:
- workflow list (with JSON output)
- init-cluster help validation
- init-cluster missing password validation

Support package tests:
- support-package cluster (generates and validates tar.gz file)
- support-package cluster with --optimize flag
- support-package node
- support-package help validation

Debug info tests:
- debug-info list (gracefully handles missing endpoint)

Total: 44 tests (40 ignored Docker tests + 4 non-Docker help tests)
All tests pass against Docker Redis Enterprise cluster.
@joshrotenberg joshrotenberg merged commit 8704c93 into main Jan 7, 2026
16 checks passed
@joshrotenberg joshrotenberg deleted the test/enterprise-docker-integration branch January 7, 2026 19:51
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.

2 participants