A testing tool for running Maistra tasks on AWS OpenShift 4.x cluster.
This project aims to automate the running Maistra tasks on an AWS OpenShift 4.x Cluster.
The testing follows Istio Doc Tasks and Maistra Doc.
Name | Version |
---|---|
OS | Fedora 28+ |
Golang | 1.13+ |
- Maistra has been installed on an OpenShift OCP4 cluster.
- Several test cases require nginx or mongoDB running on OCP4 and we need to configure additional scc permission for them after login as a cluster admin user.
$ oc login -u kubeadmin -p [token] --server=[OCP API server] $ chmod +x scripts/setup_ocp_scc_anyuid.sh; $ scripts/setup_ocp_scc_anyuid.sh
- Completed CLI login an OCP cluster as a regular user. Run
oc login -u [user] -p [token] --server=[OCP API server]
login command in a shell. - For the test case using JWT token, the system needs python3 installed to be able to run the python script.
- All test cases and testdata are in the
tests
directory. - The test cases include several changes for an OpenShift environment. Currently, those changes will not work in origin Kubernetes environments.
- To run all the test cases:
go test -timeout 3h -v
. It is required to use the-timeout
flag. Otherwise, the go test by default will fall into panic after 10 minutes. - In order to save results in a junit report, we can run a go test command with "github.com/jstemmer/go-junit-report", e.g.
$ cd tests $ go get -u github.com/jstemmer/go-junit-report $ go test -timeout 3h -v 2>&1 | tee >(${GOPATH}/bin/go-junit-report > results.xml) test.log
- All case numbers are mapped in the
test_cases.go
file. Users can run a single test with the-run [case number]
flag, e.g.go -test -run 15 -timeout 1h -v
. - The testdata
samples
andsamples_extend
are pulling from Istio 1.4.6 and Istio 1.4 Doc.