-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
44 lines (34 loc) · 1.11 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
UID ?= $(shell id -u)
DOCKER_COMPOSE = env UID=$(UID) docker-compose -f docker-compose.yml
.PHONY: down
down:
docker-compose down
.PHONY: build
build:
$(DOCKER_COMPOSE) up -d --build metadata-app
.PHONY: spec
spec: setup
$(DOCKER_COMPOSE) run --rm metadata-app bundle exec rspec
.PHONY: all_units
all_units: build
$(DOCKER_COMPOSE) run --rm metadata-app bundle exec rspec --exclude-pattern spec/integration/*_spec.rb
.PHONY: unit
unit: build
# change to what is required
$(DOCKER_COMPOSE) run --rm metadata-app bundle exec rspec spec/requests/get_services_spec.rb
.PHONY: seed_public_key
seed_public_key:
$(DOCKER_COMPOSE) up -d --build metadata-app-service-token-cache-redis
ruby ./scripts/seed_test_public_key.rb
.PHONY: integration
integration: setup
$(DOCKER_COMPOSE) run --rm metadata-app bundle exec rspec spec/integration/*_spec.rb
.PHONY: load-test-local
load-test-local: setup
./bin/wait-for-metadata-app
cat spec/fixtures/private.pem | base64 | xargs ./bin/load-test
.PHONY: setup
setup: down seed_public_key build
.PHONY: get_private_key
get_private_key: setup
cat spec/fixtures/private.pem | base64