Fixed tests & minor changes in Makefile
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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},
|
||||||
|
|||||||
Reference in New Issue
Block a user