test(tools): add unit tests for error handling functions
* Implement tests for error functions like errRequiredField, errInvalidField, and errEntityNotFound. * Ensure proper metadata is returned for various error scenarios. * Validate error handling in CRM, Files, and other tools. * Introduce tests for parsing stored file IDs and UUIDs. * Enhance coverage for helper functions related to project resolution and session management.
This commit is contained in:
11
Makefile
11
Makefile
@@ -1,6 +1,15 @@
|
||||
BIN_DIR := bin
|
||||
SERVER_BIN := $(BIN_DIR)/amcs-server
|
||||
CMD_SERVER := ./cmd/amcs-server
|
||||
BUILDINFO_PKG := git.warky.dev/wdevs/amcs/internal/buildinfo
|
||||
VERSION_TAG ?= $(shell git describe --tags --exact-match 2>/dev/null || echo dev)
|
||||
COMMIT_SHA ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||
BUILD_DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
LDFLAGS := -s -w \
|
||||
-X $(BUILDINFO_PKG).Version=$(VERSION_TAG) \
|
||||
-X $(BUILDINFO_PKG).TagName=$(VERSION_TAG) \
|
||||
-X $(BUILDINFO_PKG).Commit=$(COMMIT_SHA) \
|
||||
-X $(BUILDINFO_PKG).BuildDate=$(BUILD_DATE)
|
||||
|
||||
.PHONY: all build clean migrate
|
||||
|
||||
@@ -8,7 +17,7 @@ all: build
|
||||
|
||||
build:
|
||||
@mkdir -p $(BIN_DIR)
|
||||
go build -o $(SERVER_BIN) $(CMD_SERVER)
|
||||
go build -ldflags "$(LDFLAGS)" -o $(SERVER_BIN) $(CMD_SERVER)
|
||||
|
||||
migrate:
|
||||
./scripts/migrate.sh
|
||||
|
||||
Reference in New Issue
Block a user