hw12_13_14_15_calendar
Andrey Ivanov 2021-03-22 09:15:36 -04:00 committed by Andrey Ivanov
parent 1a04dcbefa
commit bb3e580e67
1 changed files with 15 additions and 4 deletions

View File

@ -1,11 +1,25 @@
cdir = $(shell pwd)
integration-test:
inplace-integration-test:
go test -count 10 -race ./cmd/calendar/... --config ./../../configs/calendar.conf
bdd:
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:
go test -race ./internal/... ./pkg/...
@ -43,7 +57,4 @@ sup-up:
sup-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