From 41f50ddef318cf96c78e6140bfa1d8a7b34030bc Mon Sep 17 00:00:00 2001 From: baude <bbaude@redhat.com> Date: Thu, 19 Sep 2019 12:13:28 -0500 Subject: [PATCH] add tests Signed-off-by: baude <bbaude@redhat.com> --- .cirrus.yml | 10 +++++++++- Makefile | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ea88b7b..d5498eb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -67,10 +67,18 @@ test_task: depends_on: - validate + gce_instance: + matrix: + image_name: ${FEDORA_CACHE_IMAGE_NAME} + image_name: ${PRIOR_UBUNTU_CACHE_IMAGE_NAME} env: PATH: "$PATH:/var/tmp/go/bin" + setup_script: + - OS_RELEASE_ID="$(source /etc/os-release; echo $ID)" + - if [[ "$OS_RELEASE_ID" == "fedora" ]]; then dnf install -y dnsmasq; fi + test_script: - make - - ./bin/dnsname --help # STUB! + - make test diff --git a/Makefile b/Makefile index 7de1296..ed2557f 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ endef .install.ginkgo: if [ ! -x "$(GOBIN)/ginkgo" ]; then \ - $(call go-get,github.com/onsi/ginkgo); \ + $(call go-get,github.com/onsi/ginkgo/ginkgo); \ fi .install.gitvalidation: @@ -66,8 +66,12 @@ install: clean: rm -fr bin/ +test: .install.ginkgo + $(GO) test -v ./... + .PHONY: \ binaries \ + test \ gofmt \ lint \ validate -- GitLab