Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.95 KB

running-test.md

File metadata and controls

64 lines (43 loc) · 1.95 KB

How to run Assisted-service subsystem tests

Assisted-service subsystem tests require deploying the assisted-service on a k8s cluster together with DB and storage services. The subsystem tests are located on the subsystem directory.

Subsystem tests pre-configuration

minikube start
minikube addons enable registry
  • Set LOCAL_ASSISTED_ORG to point to your local registry address
export LOCAL_ASSISTED_ORG=localhost:5000
  • Redirect the local registry to the minikube registry:
nohup kubectl port-forward svc/registry 5000:80 -n kube-system &>/dev/null &
  • Make a tunnel to make minikube services reachable (the command will ask for root password):
nohup minikube tunnel &>/dev/null &
  • Deploy services:
skipper make deploy-test

Run tests

skipper make [test|unit-test] [environment variables]
  • test - Runs subsystem tests.
  • unit-test - Runs unit tests.

Environment variables:

  • FOCUS="install_cluster" - An optional flag used for focused specs with regular expression.
  • SKIP="install_cluster" - An optional flag to skip scopes with regular expressions.
  • TEST="./internal/host" - An optional flag used for testing a specific package.
  • VERBOSE=true - An optional flag to print verbosed data.

Update service for the subsystem tests

if you are making changes and don't want to deploy everything once again you can simply run this command:

skipper make patch-service

It will build and push a new image of the service to your Docker registry, then delete the service pod from minikube, the deployment will handle the update and pull the new image to start the service again.