This test suite aims to cover Trusted Artifact Signer deployment with end-to-end (E2E) tests, primarily focused on OpenShift deployment.
- Trusted Artifact Signer (TAS): For secure signing capabilities.
- OpenShift Pipelines: To support CI/CD workflows.
-
Set environment variables using provided scripts:
- Linux/macOS:
tas-env-variables.sh - Windows Command Prompt:
tas-env-variables.bat - Windows PowerShell:
tas-env-variables.ps1
- Linux/macOS:
-
Optional: Set
CLI_STRATEGYenvironment variable to configure how CLI binaries are obtained:
export CLI_STRATEGY=openshift
Available strategies:
local(default) — uses binaries already on$PATHopenshift— downloads from the cluster'sConsoleCLIDownloadresourcescli_server— downloads from a CLI server (requiresCLI_SERVER_URL)cgw— downloads from the Red Hat content gateway (requiresCGW_URL)
For the cgw strategy, set the base URL including the RHTAS version:
export CLI_STRATEGY=cgw
# GA
export CGW_URL=https://developers.redhat.com/content-gateway/file/cgw/RHTAS/1.4.0
# Stage
# export CGW_URL=https://developers.qa.redhat.com/content-gateway/file/cgw/RHTAS/1.4.0
- Optional: To use a manual image setup, set the
MANUAL_IMAGE_SETUPenvironment variable totrueand specify theTARGET_IMAGE_NAME.
export MANUAL_IMAGE_SETUP=true
export TARGET_IMAGE_NAME="ttl.sh/$(uuidgen):10m"
podman push $TARGET_IMAGE_NAME
For daemonless runners, you can use tools like skopeo.
skopeo copy docker://docker.io/library/alpine:latest docker://$TARGET_IMAGE_NAME
Options:
- Follow instructions at https://github.com/securesign/sigstore-ocp/tree/main
- Install from OperatorHub
make all
make env test
You can also run the tests using go test command or using the ginkgo client.
If you decide to do so, you need to set ENV variables
source tas-env-variables.sh && go test -v ./test/... --ginkgo.v
To run tests in specific directories:
ginkgo -v test/cosign test/gitsign
- Some tests may require specific configurations (e.g., GitHub token) and will be skipped if not fulfilled.
- The test suite uses the Ginkgo framework.
- Environment variables are defined in values.go.