This project has retired. For details please refer to its Attic page.
How to Run Integration K8s Test | Apache Submarine
Skip to main content
Version: master 🏃

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

  1. Ensure you have setup the KinD cluster or minikube cluster. If you haven't, follow this minikube tutorial

  2. Build the submarine from source and upgrade the server pod through this guide

  3. Forward port

    kubectl port-forward --address 0.0.0.0 service/submarine-traefik 8080:80
  4. Install the latest package "submarine-server-core" into the local repository, for use as a dependency in the module test-k8s

    mvn install -DskipTests
  5. 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.