forked from baron/baron-sso
조직도 표현 개선
This commit is contained in:
35
test/gateway_userfront_residue_policy_test.sh
Normal file
35
test/gateway_userfront_residue_policy_test.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
assert_contains() {
|
||||
file="$1"
|
||||
pattern="$2"
|
||||
if ! grep -Fq "$pattern" "$file"; then
|
||||
echo "missing pattern in $file: $pattern" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_not_contains() {
|
||||
file="$1"
|
||||
pattern="$2"
|
||||
if grep -Fq "$pattern" "$file"; then
|
||||
echo "forbidden pattern in $file: $pattern" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
deploy_gateway="deploy/templates/gateway/nginx.conf"
|
||||
|
||||
if [ ! -f "$deploy_gateway" ]; then
|
||||
echo "missing expected file: $deploy_gateway" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
assert_contains "$deploy_gateway" "root /usr/share/nginx/html;"
|
||||
assert_contains "$deploy_gateway" 'try_files $uri $uri/ /index.html;'
|
||||
assert_not_contains "$deploy_gateway" "baron_userfront"
|
||||
assert_not_contains "$deploy_gateway" "userfront_upstream"
|
||||
assert_not_contains "$deploy_gateway" "proxy_pass http://baron_userfront"
|
||||
|
||||
echo "gateway userfront residue policy checks passed"
|
||||
Reference in New Issue
Block a user