Skip to content
Snippets Groups Projects
Commit aa464cb0 authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

test unit-tests

parent 9b8a3d09
No related branches found
No related tags found
3 merge requests!71Draft: Resolve "Create DB connection instead of using memory only",!66Resolve "Enable TLS between KMS",!49Improve general project repo (Tests, etc.)
Pipeline #186732 failed
...@@ -63,6 +63,24 @@ code-vulnerability: ...@@ -63,6 +63,24 @@ code-vulnerability:
- govulncheck ./... - govulncheck ./...
needs: [] needs: []
unit-tests:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:$GOLANG_VERSION
stage: test
before_script:
- apt update && apt install -y make
script:
- make test
- go tool cover -func=coverage.out
- gocover-cobertura < coverage.out > coverage.xml
artifacts:
expire_in: 1 week
when: always
reports:
junit: report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
needs: []
integration-test-kms: integration-test-kms:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:$GOLANG_VERSION-bookworm image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:$GOLANG_VERSION-bookworm
......
...@@ -39,8 +39,7 @@ lint-fix: install-tools ...@@ -39,8 +39,7 @@ lint-fix: install-tools
./$(TOOLS_DIR)/golangci-lint run --config .golangci.yml --fix | jq ./$(TOOLS_DIR)/golangci-lint run --config .golangci.yml --fix | jq
test: test:
go test -v ./ekms/... go test -coverprofile=coverage.out -v ./ekms/... ./quantumlayer/...
go test -v ./quantumlayer/...
build-ekms: pre build-ekms: pre
CGO_ENABLED=0 $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/ekms ./ekms/main.go CGO_ENABLED=0 $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/ekms ./ekms/main.go
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment