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
|
ansible-playbook -i $(INVENTORY) -f 10 ./ansible/cache.yml
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define configure_mcaptcha
|
||||||
|
. ./venv/bin/activate && \
|
||||||
|
ansible-playbook -i $(INVENTORY) -f 10 ./ansible/mcaptcha.yml
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
define test_base
|
define test_base
|
||||||
. ./venv/bin/activate && \
|
. ./venv/bin/activate && \
|
||||||
|
@ -49,6 +55,19 @@ define test_cache
|
||||||
|
|
||||||
endef
|
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
|
define test_locust
|
||||||
. ./venv/bin/activate && \
|
. ./venv/bin/activate && \
|
||||||
|
@ -88,6 +107,13 @@ conf.dos: ## Configure all DoS VMs
|
||||||
conf.cache: ## Configure all cache VMs
|
conf.cache: ## Configure all cache VMs
|
||||||
$(call configure_cache)
|
$(call configure_cache)
|
||||||
|
|
||||||
|
# ```bash
|
||||||
|
# INVENTORY=./terraform/dos/hosts.ini make conf.mcaptcha
|
||||||
|
# ```
|
||||||
|
conf.mcaptcha: ## Configure all mcaptcha VMs
|
||||||
|
$(call configure_mcaptcha)
|
||||||
|
|
||||||
|
|
||||||
# ```bash
|
# ```bash
|
||||||
# INVENTORY=./terraform/dos/hosts.ini make conf.ping
|
# 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
|
test.cache: ## Test cache configuration
|
||||||
$(call test_cache)
|
$(call test_cache)
|
||||||
|
|
||||||
|
test.mcaptcha: ## Test mcaptcha configuration
|
||||||
|
$(call test_mcaptcha)
|
||||||
|
|
||||||
help: ## Prints help for targets with comments
|
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}'
|
@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