1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Fixed unit test execution

This commit is contained in:
Ewout Prangsma 2018-02-27 15:32:09 +01:00
parent 6a8d905d2e
commit 0ed6fdc90b
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698
2 changed files with 15 additions and 3 deletions

View file

@ -37,6 +37,7 @@ pipeline {
"IMAGETAG=${env.GIT_COMMIT}",
]) {
sh "make"
sh "make run-unit-tests"
}
}
}

View file

@ -149,6 +149,19 @@ endif
# Testing
run-unit-tests: $(GOBUILDDIR) $(SOURCES)
docker run \
--rm \
-v $(SRCDIR):/usr/code \
-e GOPATH=/usr/code/.gobuild \
-e GOOS=linux \
-e GOARCH=amd64 \
-e CGO_ENABLED=0 \
-w /usr/code/ \
golang:$(GOVERSION) \
go test -v \
$(REPOPATH)/pkg/apis/arangodb/v1alpha
$(TESTBIN): $(GOBUILDDIR) $(SOURCES)
@mkdir -p $(BINDIR)
docker run \
@ -160,9 +173,7 @@ $(TESTBIN): $(GOBUILDDIR) $(SOURCES)
-e CGO_ENABLED=0 \
-w /usr/code/ \
golang:$(GOVERSION) \
go test -c -installsuffix cgo -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o /usr/code/bin/$(TESTBINNAME) \
$(REPOPATH)/pkg/apis/arangodb/v1alpha \
$(REPOPATH)/tests
go test -c -installsuffix cgo -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o /usr/code/bin/$(TESTBINNAME) $(REPOPATH)/tests
docker-test: $(TESTBIN)
docker build --quiet -f $(DOCKERTESTFILE) -t $(TESTIMAGE) .