mit einem Klick
e2e-test-runner
// Provides the ability to run and iterate on HyperShift e2e tests. Auto-applies when implementing features that require e2e validation, fixing e2e test failures, or working on tasks that need live cluster testing.
// Provides the ability to run and iterate on HyperShift e2e tests. Auto-applies when implementing features that require e2e validation, fixing e2e test failures, or working on tasks that need live cluster testing.
Accesses archived Konflux PipelineRuns, TaskRuns, and pod logs via KubeArchive. Auto-applies when checking Konflux PipelineRun results, investigating enterprise contract failures, or retrieving logs from completed Konflux CI runs.
Build and push control-plane-operator container image. Auto-applies when testing CPO changes that require deploying to a live cluster.
Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.
Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.
Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).
Create development environments with git worktrees, branches, commits, and push to remote. Auto-applies for git workflow tasks.
| name | E2E Test Runner |
| description | Provides the ability to run and iterate on HyperShift e2e tests. Auto-applies when implementing features that require e2e validation, fixing e2e test failures, or working on tasks that need live cluster testing. |
This skill enables autonomous iteration on e2e tests - running tests, analyzing failures, making fixes, and re-running until tests pass.
This skill automatically applies when:
test/e2e/ directorySource the environment file before using this skill:
source dev/claude-env.sh
Environment variables from dev/claude-env.sh:
| Variable | Description |
|---|---|
E2E_PLATFORM | Test platform (AWS, Azure, etc.) |
AWS_CREDENTIALS | Path to AWS credentials file |
OIDC_BUCKET | S3 bucket for OIDC |
BASE_DOMAIN | Base DNS domain |
PULL_SECRET | Path to pull secret file |
AWS_REGION | AWS region |
E2E_ARTIFACT_DIR | Directory for test artifacts |
MGMT_KUBECONFIG | Path to management cluster kubeconfig |
CPO_IMAGE_REPO | Custom CPO image repository |
RUNTIME | Container runtime (podman/docker) |
CRITICAL: Before running any e2e test, you MUST check if the test binary needs rebuilding:
# Check if binary exists
if [ ! -f ./bin/test-e2e ]; then
echo "Test binary missing, building..."
make e2e
fi
# Check if any test files are newer than the binary
NEWEST_TEST=$(find test/e2e -name "*.go" -newer ./bin/test-e2e 2>/dev/null | head -1)
if [ -n "$NEWEST_TEST" ]; then
echo "Test files changed (e.g., $NEWEST_TEST), rebuilding..."
make e2e
fi
Build and execute the test command:
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/test-e2e -test.v -test.timeout 2h \
-test.run "TEST_PATTERN" \
-test.v \
--e2e.platform $E2E_PLATFORM \
--e2e.aws-credentials-file $AWS_CREDENTIALS \
--e2e.aws-oidc-s3-bucket-name $OIDC_BUCKET \
--e2e.base-domain $BASE_DOMAIN \
--e2e.pull-secret-file $PULL_SECRET \
--e2e.aws-region $AWS_REGION \
--e2e.artifact-dir $E2E_ARTIFACT_DIR
If you've made changes to control-plane-operator code and built a custom image, add:
-e2e.control-plane-operator-image $CPO_IMAGE_REPO:TAG
When working autonomously on a task that requires e2e validation:
Run the test to establish baseline:
KUBECONFIG=$MGMT_KUBECONFIG ./bin/test-e2e -test.v -test.run "TestName" [flags...]
$E2E_ARTIFACT_DIR/ directory for:
test/e2e/*.go files, the binary will be rebuilt automatically on next runIf you modified control-plane-operator code: Use the build-cpo-image skill to build and push a new image.
$RUNTIME build -f Dockerfile.control-plane --platform linux/amd64 -t $CPO_IMAGE_REPO:NEW_TAG .
$RUNTIME push $CPO_IMAGE_REPO:NEW_TAG
Run the test again with updated code/images. Repeat until passing.
| Test Pattern | Description |
|---|---|
TestNodePool | All NodePool tests |
TestNodePool/HostedCluster0/Main/TestSpotTerminationHandler | Specific spot test |
TestNodePool.*Karpenter | All Karpenter-related tests |
TestCreateCluster | Cluster creation tests |
TestUpgrade | Upgrade tests |
The test output includes:
After a test failure, examine:
ls -la $E2E_ARTIFACT_DIR/
# Contains: cluster manifests, pod logs, events, resource dumps
| Pattern | Likely Cause |
|---|---|
context deadline exceeded | Resource didn't reach expected state in time |
not found | Resource wasn't created or was deleted prematurely |
connection refused | Service not ready or network issue |
forbidden | RBAC or permission issue |
When test code changes, rebuild:
make e2e
This compiles ./bin/test-e2e with all tests from test/e2e/.
-test.timeout to set appropriate timeouts (default: 2h)