Black-box end-to-end testing for validating the HyperFleet cluster lifecycle management.
HyperFleet E2E is a Ginkgo-based testing framework that validates HyperFleet cluster lifecycle management through black-box tests. It creates ephemeral test clusters for each test, providing complete isolation and supporting parallel execution.
# Clone and build
git clone https://github.com/openshift-hyperfleet/hyperfleet-e2e.git
cd hyperfleet-e2e
make build
# Set API URL and run tests
export HYPERFLEET_API_URL=https://api.hyperfleet.example.com
./bin/hyperfleet-e2e test --label-filter=tier0Done! The framework created a cluster, validated adapters, and cleaned up resources.
# Critical severity tests (Release gate)
./bin/hyperfleet-e2e test --label-filter=tier0
# Exclude slow tests
./bin/hyperfleet-e2e test --label-filter="!slow"# Debug mode (API calls and framework internals)
./bin/hyperfleet-e2e test --log-level=debug
# Run specific test suite
./bin/hyperfleet-e2e test --focus "\[Suite: cluster\]"Run ./bin/hyperfleet-e2e test --help for all options.
Configuration priority (highest to lowest):
- CLI flags (
--api-url) - Environment variables (
HYPERFLEET_API_URL) - Config file (
configs/config.yaml) - Built-in defaults
Example:
export HYPERFLEET_API_URL=https://staging.api.example.com
./bin/hyperfleet-e2e testSee configs/config.yaml for all configuration options with detailed comments.
hyperfleet-e2e/
├── cmd/ - CLI entry point
│ └── hyperfleet-e2e/
├── pkg/ - Core packages
│ ├── api/ - OpenAPI generated client
│ ├── client/ - HyperFleet API client wrapper
│ ├── config/ - Configuration loading and validation
│ ├── e2e/ - Test execution engine (Ginkgo)
│ ├── helper/ - Test helper utilities
│ ├── labels/ - Test label definitions
│ └── logger/ - Structured logging (slog)
├── e2e/ - Test suites
│ ├── cluster/ - Cluster lifecycle tests
│ └── nodepool/ - NodePool management tests
├── testdata/ - Test payloads and fixtures
│ └── payloads/
│ ├── clusters/ - Cluster creation payloads
│ └── nodepools/ - NodePool creation payloads
├── configs/ - Configuration files
│ └── config.yaml - Default configuration
└── docs/ - Documentation
- Ephemeral Resources: Each test creates and cleans up its own cluster for complete isolation
- Payload Templates: Dynamic resource naming with template variables to prevent naming conflicts
- Flexible Filtering: Run tests by labels, focus patterns, or skip patterns
- Comprehensive Validation: Verifies cluster phases, adapter conditions, and health status
- Structured Logging: JSON or text logging with configurable levels
- Parallel Execution: Full isolation enables safe parallel test runs
- Getting Started - Run your first test in 10 minutes
- Architecture - Understand the framework design
- Development - Write new tests
# Set API URL
export HYPERFLEET_API_URL=$CI_API_URL
# Run critical severity tests with JUnit output
./bin/hyperfleet-e2e test \
--label-filter=tier0 \
--junit-report=results.xml \
--log-format=jsonmake image
podman run --rm \
-e HYPERFLEET_API_URL=https://api.example.com \
quay.io/openshift-hyperfleet/hyperfleet-e2e:latest \
test --label-filter=tier0make build # Build binary
make test # Run unit tests
make lint # Run linter
make check # Run all checksSee Development Guide for adding new tests.
- Fork the repository
- Create a feature branch
- Make your changes and add tests
- Run
make check - Submit a pull request
See OWNERS for approval requirements.
Apache License 2.0 - See LICENSE for details.