Add busted unit testing framework for lua code

This commit is contained in:
Zenara Daley 2018-04-23 10:46:28 -04:00
parent 62895ffd0b
commit 4f9865529a
8 changed files with 97 additions and 1 deletions

View file

@ -45,6 +45,8 @@ ALL_ARCH = amd64 arm arm64 ppc64le s390x
QEMUVERSION=v2.9.1-1
BUSTED_ARGS=-v --pattern=_test
IMGNAME = nginx-ingress-controller
IMAGE = $(REGISTRY)/$(IMGNAME)
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
@ -151,6 +153,10 @@ verify-all:
test:
@go test -v -race -tags "$(BUILDTAGS) cgo" $(shell go list ${PKG}/... | grep -v vendor | grep -v '/test/e2e')
.PHONY: lua-test
lua-test:
@busted $(BUSTED_ARGS) ./rootfs/etc/nginx/lua/test;
.PHONY: e2e-image
e2e-image: sub-container-amd64
TAG=$(TAG) IMAGE=$(MULTI_ARCH_IMG) docker tag $(IMAGE):$(TAG) $(IMAGE):test