改用ps-ef识别部署进程
This commit is contained in:
@@ -204,8 +204,19 @@ test_netstat_fallback_should_work() {
|
||||
cleanup_release_dir "$release_dir"
|
||||
}
|
||||
|
||||
test_should_use_ps_ef_for_process_detection() {
|
||||
if rg -n 'pgrep' "$SCRIPT_UNDER_TEST" >/dev/null 2>&1; then
|
||||
fail "expected deploy_from_package.sh not to depend on pgrep"
|
||||
fi
|
||||
|
||||
if ! rg -n 'ps -ef' "$SCRIPT_UNDER_TEST" >/dev/null 2>&1; then
|
||||
fail "expected deploy_from_package.sh to use ps -ef for process detection"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
[ -f "$SCRIPT_UNDER_TEST" ] || fail "script under test not found: $SCRIPT_UNDER_TEST"
|
||||
test_should_use_ps_ef_for_process_detection
|
||||
test_deploy_success
|
||||
test_multiple_release_zip_should_fail
|
||||
test_netstat_fallback_should_work
|
||||
|
||||
Reference in New Issue
Block a user