Add comprehensive config validation and race testing target
Split config validation into validateFields() (pure logic) and validateFiles() (filesystem checks) for testability. New validations: TLS file existence, token TTL parseability/positivity, Argon2 params > 0, valid log level, non-empty listen addresses. Added 18 tests covering all validation paths. Added `make test-race` target. Resolves A-015 and A-017. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
Makefile
5
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: build test vet lint proto proto-lint clean all
|
||||
.PHONY: build test test-race vet lint proto proto-lint clean all
|
||||
|
||||
LDFLAGS := -trimpath -ldflags="-s -w -X main.version=$(shell git describe --tags --always --dirty 2>/dev/null || echo dev)"
|
||||
|
||||
@@ -11,6 +11,9 @@ build:
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
test-race:
|
||||
go test -race ./...
|
||||
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user