How to Run Integration K8s Test
Introductionβ
The test cases under the directory
test-k8s
are integration tests to ensure the correctness of the Submarine RESTful API.You can run these tests either locally or on GitHub Actions.
- Before running the tests, the minikube (KinD) cluster must be created.
- Then, compile and package the submarine project in
submarine-dist
directory for building a docker image. - In addition, the 8080 port in submarine-traefik should be forwarded.
Run k8s test locallyβ
Ensure you have setup the KinD cluster or minikube cluster. If you haven't, follow this
minikube tutorial
Build the submarine from source and upgrade the server pod through this
guide
Forward port
kubectl port-forward --address 0.0.0.0 service/submarine-traefik 8080:80
Install the latest package "submarine-server-core" into the local repository, for use as a dependency in the module
test-k8s
mvn install -DskipTests
Execute the test command
mvn verify -DskipRat -pl :submarine-test-k8s -Phadoop-2.9 -B
Run k8s test in GitHub Actionsβ
- Each time a code is submitted, GitHub Actions is triggered automatically.