-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix : change logic for setting which state to deploy & ! emergency-ng…
…inx-restart.sh & feature : add tests module Proirtize cosul-pointing. No use any more 'check_availability_inside_container_speed_mode' in 'cache_all_states'. For, emergency-nginx-restart.sh, run docker-compose down first and then dokcer-compose up -d
- Loading branch information
1 parent
b4507ff
commit 7a5e3ee
Showing
5 changed files
with
143 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/spring-sample-h-auth/run-and-kill-jar-and-check-states.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
sed -i -e "s/\r$//g" $(basename $0) | ||
set -eu | ||
|
||
cd ../../ | ||
|
||
sudo chmod a+x *.sh | ||
|
||
echo "[NOTICE] Substituting CRLF with LF to prevent possible CRLF errors..." | ||
bash prevent-crlf.sh | ||
git config apply.whitespace nowarn | ||
git config core.filemode false | ||
|
||
container=$(docker ps --format '{{.Names}}' | grep "spring-sample-h-auth") | ||
if [ -z "$container" ]; then | ||
cp -f .env.java.real .env | ||
sudo bash run.sh | ||
fi | ||
|
||
sleep 3 | ||
source ./util.sh | ||
|
||
cache_global_vars | ||
|
||
consul_pointing=$(docker exec ${project_name}-nginx curl ${consul_key_value_store}?raw 2>/dev/null || echo "failed") | ||
|
||
echo "[TEST][NOTICE] ! Kill the jar in ${project_name}-${consul_pointing}" | ||
docker exec ${project_name}-${consul_pointing} bash -c "kill 9 7" | ||
|
||
# Print state checking process | ||
cache_all_states |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters