The Local Framework is used to run end to end and integration tests on GitLab-Controller.
The framework depends on a running instance of Kubernetes.
The framework also provides scripts for starting Kubernetes using minikube
so users can
quickly spin up a Kubernetes cluster.The Local framework is designed to install GitLab-Controller,
run tests, and uninstall GitLab-Controller.
- Docker version => 1.2 && < 17.0
- Ubuntu 16, Fedora 29 (the framework has only been tested on these versions of linux distributions)
- Kubernetes with kubectl configured
- GitLab-Controller
You can choose any Kubernetes flavor of your choice. The test framework only depends on kubectl being configured. The framework also provides scripts to install Kubernetes.
- Minikube (recommended for MacOS): Run minikube.sh to setup a single-node Minikube Kubernetes.
- Minikube v0.28.2 and higher is supported
Starting the cluster on Minikube is as simple as running:
cluster/local/minikube.sh up
To copy GitLab-Controller image generated from your local build into the Minikube VM, run the
following commands after minikube.sh up
succeeded:
cluster/local/minikube.sh helm-install
Stopping the cluster and destroying the Minikube VM can be done with:
cluster/local/minikube.sh clean
For complete list of subcommands supported by minikube.sh
, run:
cluster/local/minikube.sh
From the project root do the following:
make build
cluster/local/minikube.sh up
cluster/local/minikube.sh helm-install
Use kubectl
to create and/or delete external resources CRD's in your Minikube cluster
make test
cluster/local/minikube.sh helm-delete
cluster/local/minikube.sh down