-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
44 lines (34 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
TESTS_TO_RUN := $(shell go list ./... | grep -v integrationtests | grep -v mock)
test:
@echo " > Running unit tests"
go test -cover -race -coverprofile=coverage.txt -covermode=atomic -v ${TESTS_TO_RUN}
integration-tests:
@echo " > Running integration tests"
cd scripts && /bin/bash script.sh start ${ES_VERSION}
go test -v ./integrationtests -tags integrationtests
cd scripts && /bin/bash script.sh delete
cd scripts && /bin/bash script.sh stop
long-tests:
@-$(MAKE) delete-cluster-data
go test -v ./integrationtests -tags integrationtests
start-cluster-with-kibana:
@echo " > Starting Elasticsearch node and Kibana"
docker-compose up -d
stop-cluster:
docker-compose down
delete-cluster-data:
cd scripts && /bin/bash script.sh delete
integration-tests-open-search:
@echo " > Running integration tests open search"
cd scripts && /bin/bash script.sh start_open_search ${OPEN_VERSION}
go test -v ./integrationtests -tags integrationtests
cd scripts && /bin/bash script.sh delete
cd scripts && /bin/bash script.sh stop_open_search
INDEXER_IMAGE_NAME="elasticindexer"
INDEXER_IMAGE_TAG="latest"
DOCKER_FILE=Dockerfile
docker-build:
docker build \
-t ${INDEXER_IMAGE_NAME}:${INDEXER_IMAGE_TAG} \
-f ${DOCKER_FILE} \
.