- OpenShift installed, and running.
- CodeReady Containers is a good starting point if you don't want to install a full OpenShfit cluster.
- odo v2 or later.
- yq v4.x
-
Log in to a running OpenShift instance with
oc
. -
From the root of this repository, run
tests/test.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
- Note: The script will use
yq
to find the name of the first starter project and download it.
- Note: The script will use
- The test script will validate each devfile stack under
- Set
STACK=<path-to-stack-folder>
if you only want to test one specific test (rather than all of the stacks in this repository).- e.g.
STACK=stacks/java-jboss-eap-xp ./tests/test.sh
- e.g.
- If there are multiple starter projects, odo will only use the first starter project mentioned.
- Only
odo create
,odo url create
, andodo push
are 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