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:
parent
6a8d905d2e
commit
0ed6fdc90b
2 changed files with 15 additions and 3 deletions
|
@ -37,6 +37,7 @@ pipeline {
|
|||
"IMAGETAG=${env.GIT_COMMIT}",
|
||||
]) {
|
||||
sh "make"
|
||||
sh "make run-unit-tests"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
17
Makefile
17
Makefile
|
@ -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) .
|
||||
|
|
Loading…
Reference in a new issue