go
command to your PATH: export PATH=$PATH:/usr/local/go/bin
export GOPATH=$(go env GOPATH)
export PATH=$PATH:$(go env GOPATH)/bin
mkdir -p $GOPATH/src/github.com/
cd $GOPATH/src/github.com/
git clone <project>
cd <project>
export GO111MODULE=on
to be able to compile locally.To compile, type: go build -o ingress-ats main/main.go
The project includes unit tests for the controller written in Golang and the ATS plugin written in Lua.
To run the Golang unit tests: go test ./watcher/ && go test ./redis/
The Lua unit tests use busted
for testing. busted
can be installed using luarocks
:luarocks install busted
. More information on how to install busted is available here.
:warning: Note that the project uses Lua 5.1 version
To run the Lua unit tests:
cd pluginats
busted connect_redis_test.lua
The repository comes with basic support for both vscode and vim
.
If you're using vscode
:
.vscode/settings.json
contains some basic settings for whitespaces and tabs.vscode/extensions.json
contains a few recommended extensions for this project.If you're using vim
, a vimrc
file with basic whitespace and tab configurations is also provided