Fixed tests & minor changes in Makefile

This commit is contained in:
Anton Krivenko
2021-01-23 03:58:58 +03:00
parent cd70db9922
commit 82e53669b8
2 changed files with 5 additions and 10 deletions
+5 -1
View File
@@ -1,5 +1,7 @@
GOPATH=$(shell go env GOPATH) GOPATH=$(shell go env GOPATH)
all: lint test
linters-install: linters-install:
@echo "+ $@" @echo "+ $@"
@$(GOPATH)/bin/golangci-lint --version >/dev/null 2>&1 || { \ @$(GOPATH)/bin/golangci-lint --version >/dev/null 2>&1 || { \
@@ -12,6 +14,8 @@ lint: linters-install
$(GOPATH)/bin/golangci-lint run ./... $(GOPATH)/bin/golangci-lint run ./...
test: test:
GO111MODULE=on go test -cover -race ./... @echo "+ $@"
GO111MODULE=on go test -covermode=atomic -race ./...
.PHONY: test lint linters-install .PHONY: test lint linters-install
.DEFAULT_GOAL := all
-9
View File
@@ -274,15 +274,6 @@ func TestJobHooks(t *testing.T) {
filename string filename string
headers http.Header headers http.Header
}{ }{
{
name: "JobEvent",
events: []Event{JobEvents},
typ: JobEventPayload{},
filename: "../testdata/gitlab/job-event.json",
headers: http.Header{
"X-Gitlab-Event": []string{"Job Hook"},
},
},
{ {
name: "JobEvent", name: "JobEvent",
events: []Event{JobEvents, BuildEvents}, events: []Event{JobEvents, BuildEvents},