add unit tests for various utility functions,
add integration test for LDAPClient, add aiutomatic openldap configuration for testing through make, add make targets for tests improve make targets for build/clean, update README with build and test instructions
This commit is contained in:
24
Makefile
24
Makefile
@@ -1,9 +1,23 @@
|
||||
build: clean
|
||||
CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/ .
|
||||
.PHONY: build test clean dev-init
|
||||
|
||||
test: clean
|
||||
go run .
|
||||
build: clean
|
||||
@echo "======================== Building Binary ======================="
|
||||
CGO_ENABLED=0 go build -ldflags="-s -w" -v -o dist/ .
|
||||
|
||||
tests: dev-reinit
|
||||
@echo "======================== Running Tests ========================="
|
||||
go test -v -cover -coverpkg=./app/ -coverprofile coverage ./test/
|
||||
@echo "======================= Coverage Report ========================"
|
||||
go tool cover -func=coverage
|
||||
@rm -f coverage
|
||||
|
||||
clean:
|
||||
@echo "======================== Cleaning Project ======================"
|
||||
go clean
|
||||
rm -f dist/*
|
||||
rm -f dist/*
|
||||
|
||||
dev-init:
|
||||
@cd scripts; make dev-init
|
||||
|
||||
dev-reinit:
|
||||
@cd scripts; make dev-reinit
|
Reference in New Issue
Block a user