A Ginkgo-based test suite for installing, verifying, and testing Red Hat Trusted Artifact Signer (RHTAS) configurations on OpenShift clusters.
Run all tests:
go test -v ./test/... --ginkgo.vRun a specific scenario by YAML filename:
go test -v ./test/... --ginkgo.v --ginkgo.focus "rhtas-basic-default.yaml"Run multiple scenarios (use regex with OR):
go test -v ./test/... --ginkgo.v --ginkgo.focus "rhtas-(basic|simple)-default.yaml"Run a specific scenario by scenario name:
go test -v ./test/... --ginkgo.v --ginkgo.focus "Scenario.*basic"Run specific test group across all scenarios:
go test -v ./test/... --ginkgo.v --ginkgo.focus "Config Loading"Skip a specific scenario:
go test -v ./test/... --ginkgo.v --ginkgo.skip "rhtas-simple-default.yaml"Run all tests:
go run github.com/onsi/ginkgo/v2/ginkgo -v test/...Run specific scenario (using focus):
go run github.com/onsi/ginkgo/v2/ginkgo --focus "Basic Scenario" -v test/...Run from a specific test directory:
cd test/rhtas
go run github.com/onsi/ginkgo/v2/ginkgo -vNote: If you have ginkgo installed in your PATH, you can use it directly:
ginkgo -v test/...For faster feedback during development, you can run tests in "dry run" mode. This mode:
- ✅ Processes templates and configs
- ✅ Validates configuration structure
- ✅ Verifies placeholder replacement
- ❌ Skips Kubernetes client initialization
- ❌ Skips namespace creation
- ❌ Skips actual CR installation
- ❌ Skips readiness verification
Enable dry run mode:
DRY_RUN=true go test -v ./test/... --ginkgo.vOr use 1 instead of true:
DRY_RUN=1 go test -v ./test/... --ginkgo.vDry run mode is useful for:
- Testing template and config processing without OpenShift access
- Fast validation of configuration changes
- CI/CD pipelines that don't have cluster access
- Local development and debugging
-vor--verbose: Verbose output--focus <regex>: Run tests matching the regex--skip <regex>: Skip tests matching the regex--label-filter <expression>: Filter by labels (e.g.,scenario=basic)--until-it-fails: Keep running until a test fails--repeat <n>: Run tests n times--randomize-all: Randomize test execution order--seed <n>: Set random seed for reproducible runs
pkg/- Reusable packages (api, config, clients, kubernetes, installer, verifier)test/rhtas/- Main RHTAS test suitescenarios/- Test scenarios organized by subfolder (e.g.,scenarios/basic/)
Tests are organized by scenario folders. Each scenario folder contains YAML configuration files that define the RHTAS setup to test.
scenarios/basic/- Basic RHTAS configuration