Stack testing is based on ginkgo framework. Each test is an e2e test that verifies the given stack is running correctly.
Each stack has a
test/ folder that contains the testing code to verify the current stack.
You can take a look at sample stack to see the code in details.
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
go get github.com/onsi/gomega/...
This fetches Ginkgo and installs the ginkgo executable under
$GOBIN - you'll want that on your
$PATH. It also fetches the core Gomega matcher library and its set of supporting libraries.
Install hln by following the previous instructions.
In this example, we will use the stacks repo:
git clone https://github.com/h8r-dev/stacks.git
Set up the environment variables
Before testing the stack, you need to specify the inputs for the stack. For example, if you are tesing sample stack, you should set the following environment variables:
First create an appl from the stack:
hln up my-app
Then run the e2e tests:
cd test/ # Go to the test directory
Clean up your app
cd .. # Go to the gin-vue stack directory
hln down my-app