kratix test stage
A command for testing Kratix Promise stages
Description
The command for testing Kratix Promise stages. This command will run your container stage and validate that the output generated by the container matches the contents of the --output-dir. Example: kratix test stage LIFECYCLE/ACTION/PIPELINE-NAME my-stage-name --input-dir input-directory/ --expected-output-dir expected-outputs/
Usage
test stage [flags]
Flags
--build Build the image from the workflow path before running the test
--build-args string Extra build arguments to pass to the container run command
--buildx Run the test containers using Buildx
--command string The command to run on the specified container
-d, --dir string Directory to read the Promise from (default ".")
-e, --engine string The container engine to use when running the test containers (default "docker")
--env strings The environment variables to provide to the test container (e.g. DRY_RUN=true,ENVIRONMENT=dev)
-o, --expected-output-dir string The directory containing the expected output files to compare to the generated output
-h, --help help for stage
--image-tag string Name and a tag of the container image
See Also
- kratix test: The kratix test CLI command
