Skip to content

Latest commit

 

History

History
123 lines (86 loc) · 2.94 KB

File metadata and controls

123 lines (86 loc) · 2.94 KB

Getting Started

New to HyperFleet E2E? This guide will help you run your first test in 10 minutes.

Prerequisites

  • Go 1.25+ - Required for building the framework
  • HyperFleet API access - API endpoint URL
  • 10 minutes - Time to complete this guide

Installation

Clone and Build

git clone https://github.com/openshift-hyperfleet/hyperfleet-e2e.git
cd hyperfleet-e2e
make build

Verify Installation

./bin/hyperfleet-e2e --help

You should see the command help output.

Your First Test

Step 1: Set API URL

export HYPERFLEET_API_URL=https://api.hyperfleet.example.com

Step 2: Run tests

./bin/hyperfleet-e2e test --label-filter=critical

What happens:

  1. Framework creates a new cluster via API
  2. Waits for cluster to reach Ready state
  3. Validates adapter conditions
  4. Deletes cluster after test completes

What Just Happened?

The framework:

  1. Loaded configuration - Merged config file, environment variables, and CLI flags
  2. Executed tests - Ran all tests matching your filter
  3. Managed resources - Created and deleted temporary test clusters
  4. Generated results - Displayed test outcomes

Running Specific Tests

# Run critical tests only
./bin/hyperfleet-e2e test --label-filter=critical

# Run all cluster suite tests
./bin/hyperfleet-e2e test --focus "\[Suite: cluster\]"

# Run cluster lifecycle tests
./bin/hyperfleet-e2e test --label-filter="lifecycle && critical"


# Deep debug mode (add API calls and framework internals)
./bin/hyperfleet-e2e test --log-level=debug

Note: The default output already shows detailed test execution steps. If a test fails, you can usually diagnose the issue from the logs without re-running in debug mode. Use --log-level=debug when you need to see API calls and framework internals. See Troubleshooting for more debugging techniques.

Common Commands

make build      # Build binary
make test       # Run unit tests
make e2e        # Run E2E tests
make lint       # Run linter
make generate   # Regenerate OpenAPI client

Troubleshooting

Common Issues

API connection errors:

# Verify API URL
echo $HYPERFLEET_API_URL
curl -I $HYPERFLEET_API_URL

Test timeouts:

**Configuration not taking effect**:

Priority order (highest to lowest):
1. CLI flags (`--api-url`)
2. Environment variables (`HYPERFLEET_API_URL`)
3. Config file (`configs/config.yaml`)
4. Built-in defaults

**Need detailed logs**:
```bash
# Default (info) shows test execution steps
./bin/hyperfleet-e2e test

# Debug mode shows API calls and framework internals
./bin/hyperfleet-e2e test --log-level=debug

Next Steps

  • Architecture - Understand how the framework works
  • Development - Write your own tests
  • CLI Reference - Run ./bin/hyperfleet-e2e --help
  • Configuration - See detailed comments in configs/config.yaml