- Ensure yq 4.x is installed
- This script performs three actions
- Clones samples from provided
extraDevfileEntries.yamlundersamples/.cache - Creates a
parents.yamlwhich contains the dependency tree for parent stacks - Outputs the child sample paths of parent stacks,
TEST_DELTA=truewill result in only outputting child samples which have changed parent stacks
- Clones samples from provided
- The build script takes one optional argument and works off of the current working directory
bash tests/build_parents_file.sh, default samples file isextraDevfileEntries.yamlbash tests/build_parents_file.sh <path_to_extraDevfileEntries>
- One can test the child samples using the validate_devfile_schemas test suite by performing the following:
export STACKS=$(bash tests/build_parents_file.sh)
STACKS_DIR=.cache/samples bash tests/validate_devfile_schemas.sh --samples- Minikube installed, and running.
minikube start --memory 8gbis a good starting point.- The
nonedriver cannot be used. Any other driver (docker,hyperkit, etc) should suffice.
- From the root of this repository, run
bash tests/check_non_terminating.sh.- The test script will validate each devfile stack under
stacks/, verifying that the components of type container are terminating.- The test script retrieves the
image,commandandargsof a container component and uses them to run a pod and wait until it reaches theRunningstate:kubectl run test-terminating -n default --attach=false --restart=Never --image="<image>" --command=true -- "<command>" "<args>"
- The test script retrieves the
- Each container component must be non-terminating. If the default
imageentrypoint is terminating anargs(preferred) orcommandshould be specified in the defile (e.g.["tail", "-f", "/dev/null"]).
- The test script will validate each devfile stack under
- Minikube or CRC installed, and running.
- CRC should work with default settings.
- Minikube
minikube start --memory 8gbis a good starting point.- The
nonedriver cannot be used. Any other driver (docker,hyperkit, etc) should suffice.
- odo v3.0.0-rc2 or later.
- Go 1.21 or later installed
$GOPATH/binshould be in your$PATHor you will have to modifycheck_with_odov3.shto findginkgobinary.
- Ginkgo CLI installed (
go install github.com/onsi/ginkgo/v2/ginkgo@latest)
- Ensure minikube is running and
minikube ipreports a valid IP address - From the root of this repository, run
bash tests/check_odov3.sh.- The test script will validate that every devfile under
stacksdirectory works with all the starter projects defined in a given stack.
- The test script will validate that every devfile under
- Currently, the test expects that all starter projects are web applications that return
HTTP 200status code on the root path (/).
- Minikube installed, and running.
minikube start --memory 8gbis a good starting point.- The
nonedriver cannot be used. Any other driver (docker,hyperkit, etc) should suffice.
- The ingress minikube addon must be installed with the
minikube addons enable ingresscommand - latest odo v2 (currently 2.5.1)
-
Ensure minikube is running and
minikube ipreports a valid ip address -
From the root of this repository, run
bash tests/check_odov2.sh.- The test script will validate each devfile stack under
stacks/with odo, verifying that the stack can be used to build a starter project and that the application is properly built and exposed.- The test script checks for an HTTP 200 status code to determine "properly exposed".
- Each devfile stack must have at least one starter project specified in the devfile.yaml
- The test script will validate each devfile stack under
- If there are multiple starter projects, odo will only use the first starter project mentioned.
- Only
odo create,odo url create, andodo pushare tested right now. If your devfile stack exposes additional functionality (such as debug, viaodo debug), we recommend either manually testing that functionality, or setting up your own test scripts in the stack's repository