HW15 WIP
parent
1a04dcbefa
commit
bb3e580e67
|
@ -1,11 +1,25 @@
|
||||||
cdir = $(shell pwd)
|
cdir = $(shell pwd)
|
||||||
|
|
||||||
integration-test:
|
inplace-integration-test:
|
||||||
go test -count 10 -race ./cmd/calendar/... --config ./../../configs/calendar.conf
|
go test -count 10 -race ./cmd/calendar/... --config ./../../configs/calendar.conf
|
||||||
|
|
||||||
bdd:
|
bdd:
|
||||||
docker build -t bdd --network host -f test/Dockerfile .
|
docker build -t bdd --network host -f test/Dockerfile .
|
||||||
|
|
||||||
|
integration-test:
|
||||||
|
set -e ;\
|
||||||
|
docker-compose -f ./cicd/dc_sup.yml up -d --build ;\
|
||||||
|
docker-compose -f ./cicd/dc_calendar.yml up -d --build ;\
|
||||||
|
docker-compose -f ./cicd/dc_sender.yml up -d --build ;\
|
||||||
|
docker-compose -f ./cicd/dc_sheduler.yml up -d --build ;\
|
||||||
|
test_status_code=0 ;\
|
||||||
|
docker build -t bdd --network host -f test/Dockerfile . || test_status_code=$$? ;\
|
||||||
|
docker-compose -f ./cicd/dc_sup.yml down --rmi local --volumes --remove-orphans --timeout 60 ;\
|
||||||
|
docker-compose -f ./cicd/dc_calendar.yml down --rmi local --volumes --remove-orphans --timeout 60 ;\
|
||||||
|
docker-compose -f ./cicd/dc_sender.yml down --rmi local --volumes --remove-orphans --timeout 60 ;\
|
||||||
|
docker-compose -f ./cicd/dc_sheduler.yml down --rmi local --volumes --remove-orphans --timeout 60 ;\
|
||||||
|
exit $$test_status_code
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -race ./internal/... ./pkg/...
|
go test -race ./internal/... ./pkg/...
|
||||||
|
|
||||||
|
@ -43,7 +57,4 @@ sup-up:
|
||||||
sup-down:
|
sup-down:
|
||||||
docker-compose -f ./cicd/dc_sup.yml down
|
docker-compose -f ./cicd/dc_sup.yml down
|
||||||
|
|
||||||
clean:
|
|
||||||
docker rmi $(sudo docker images | grep '<none>' | awk '{print $3}')
|
|
||||||
|
|
||||||
.PHONY: build run test lint
|
.PHONY: build run test lint
|
Loading…
Reference in New Issue