wip-mcaptcha-mcaptcha #3
1 changed files with 28 additions and 1 deletions
29
Makefile
29
Makefile
|
@ -24,6 +24,12 @@ define configure_cache
|
|||
ansible-playbook -i $(INVENTORY) -f 10 ./ansible/cache.yml
|
||||
endef
|
||||
|
||||
define configure_mcaptcha
|
||||
. ./venv/bin/activate && \
|
||||
ansible-playbook -i $(INVENTORY) -f 10 ./ansible/mcaptcha.yml
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define test_base
|
||||
. ./venv/bin/activate && \
|
||||
|
@ -49,6 +55,19 @@ define test_cache
|
|||
|
||||
endef
|
||||
|
||||
define test_mcaptcha
|
||||
. ./venv/bin/activate && \
|
||||
cd tests/mcaptcha/ && \
|
||||
ANSIBLE_REMOTE_USER=root \
|
||||
py.test --hosts='ansible://mcaptcha_hosts' \
|
||||
-n 10 \
|
||||
--verbose \
|
||||
--ansible-inventory="../../${INVENTORY}" \
|
||||
base.py
|
||||
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define test_locust
|
||||
. ./venv/bin/activate && \
|
||||
|
@ -88,6 +107,13 @@ conf.dos: ## Configure all DoS VMs
|
|||
conf.cache: ## Configure all cache VMs
|
||||
$(call configure_cache)
|
||||
|
||||
# ```bash
|
||||
# INVENTORY=./terraform/dos/hosts.ini make conf.mcaptcha
|
||||
# ```
|
||||
conf.mcaptcha: ## Configure all mcaptcha VMs
|
||||
$(call configure_mcaptcha)
|
||||
|
||||
|
||||
# ```bash
|
||||
# INVENTORY=./terraform/dos/hosts.ini make conf.ping
|
||||
# ```
|
||||
|
@ -105,7 +131,8 @@ test.base: ## Test base configuration on all VMs
|
|||
test.cache: ## Test cache configuration
|
||||
$(call test_cache)
|
||||
|
||||
|
||||
test.mcaptcha: ## Test mcaptcha configuration
|
||||
$(call test_mcaptcha)
|
||||
|
||||
help: ## Prints help for targets with comments
|
||||
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-].+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
|
|
Loading…
Reference in a new issue