Files
mtusi2026lab3/student.mk
T
2026-10-16 19:50:49 +03:00

24 lines
799 B
Makefile

LOAD_ARGS = $(if $(LOAD_WORKERS),-workers=$(LOAD_WORKERS),) \
$(if $(LOAD_DURATION),-duration=$(LOAD_DURATION),) \
$(if $(LOAD_RATE),-rate=$(LOAD_RATE),)
.PHONY: help-go contract-go race-go load-go failure-go
help-go:
@echo "contract-go: contract tests"
@echo "race-go: concurrency tests (-race)"
@echo "load-go: load test"
@echo "failure-go: dependency failure tests (stops redis/postgres containers)"
contract-go:
go test -tags=contract ./student-tests/... -v -args -base-url=$(BASE_URL)
race-go:
go test -tags=race ./student-tests/... -race -v -args -base-url=$(BASE_URL)
load-go:
go test -tags=load ./student-tests/... -v -args -base-url=$(BASE_URL) $(LOAD_ARGS)
failure-go:
go test -tags=failure ./student-tests/... -v -args -base-url=$(BASE_URL)