diff --git a/deploy/healthcheck/README.md b/deploy/healthcheck/README.md index ad2ed2f..e258fda 100644 --- a/deploy/healthcheck/README.md +++ b/deploy/healthcheck/README.md @@ -14,3 +14,10 @@ Default paths and ports are tuned for the current VPS layout. Override with env - `AUTH_PORT` - `CHANNEL_PORT` - `SMOKE_BIN` + +For richer ad-hoc testing, call `metin_login_smoke` directly. It now supports: +- `--json` +- `--expect-auth-failure=STATUS` +- `--expect-channel-failure=STATUS` +- `--create-character-name=NAME` +- `--client-version=VERSION` diff --git a/docs/healthchecks.md b/docs/healthchecks.md index 02dcee6..43f2ae3 100644 --- a/docs/healthchecks.md +++ b/docs/healthchecks.md @@ -84,6 +84,24 @@ sudo -iu mt2.jakubkadlec.dev env METIN_LOGIN_SMOKE_PASSWORD='' \ --client-version=1215955205 ``` +Useful direct flags: + +- `--json` + returns a machine-readable summary including timings and emitted events +- `--expect-auth-failure=STATUS` + treats an auth failure such as `NOID` or `WRONGPWD` as a successful negative test +- `--expect-channel-failure=STATUS` + treats a channel failure as a successful negative test + +Example negative auth test: + +```bash +sudo -iu mt2.jakubkadlec.dev env METIN_LOGIN_SMOKE_PASSWORD='wrongpass' \ + /home/mt2.jakubkadlec.dev/metin/build/server-src/bin/metin_login_smoke \ + 173.249.9.66 11000 11011 someuser --password-env=METIN_LOGIN_SMOKE_PASSWORD \ + --expect-auth-failure=WRONGPWD --json +``` + ## Security Notes This does not open a new public network surface. It is a local operational tool.