-
Make sure you have golang 1.10 installed
-
Make sure you have
dep
installed -
Make sure you have
kubebuilder
installed (currently only required to run some of the tests) -
Clone this repository into
$GOPATH/src/github.com/DevFactory/smartnat
-
Run
dep
dep ensure --vendor-only
-
You should be able to run unit tests now and you're good to go
go test ./pkg/...
If you don't want to install all the gp dependencies on your machine, you can easily get started by setting up development environment in a docker container.
Start by building docker image:
docker build -f ./Dockerfile.devenv -t smartnat_devenv:latest .
Now, you can start a ready container that has all the dependencies, code and vim ready:
docker run -it --name smartnat-dev smartnat_devenv:latest
Everything should be in place and you should be able to run all tests:
go test ./...