diff --git a/deploy/healthcheck/metin-login-healthcheck.sh b/deploy/healthcheck/metin-login-healthcheck.sh index 56bf7d8..6fb6894 100755 --- a/deploy/healthcheck/metin-login-healthcheck.sh +++ b/deploy/healthcheck/metin-login-healthcheck.sh @@ -14,6 +14,7 @@ fi : "${CHANNEL_PORT:=11011}" : "${SMOKE_BIN:=/home/${RUN_AS_USER}/metin/build/server-src/bin/metin_login_smoke}" : "${CLIENT_VERSION:=1215955205}" +: "${MALL_PASSWORD:=000000}" if [[ ! -x "${SMOKE_BIN}" ]]; then echo "Smoke binary not found: ${SMOKE_BIN}" >&2 @@ -135,6 +136,7 @@ sudo -iu "${RUN_AS_USER}" env METIN_LOGIN_SMOKE_PASSWORD="${PASSWORD}" \ "${SMOKE_BIN}" "${SERVER_HOST}" "${AUTH_PORT}" "${CHANNEL_PORT}" "${LOGIN}" \ --password-env=METIN_LOGIN_SMOKE_PASSWORD \ --create-character-name="${CHARACTER_NAME}" \ - --client-version="${CLIENT_VERSION}" + --client-version="${CLIENT_VERSION}" \ + --mall-password="${MALL_PASSWORD}" echo "Login healthcheck passed" diff --git a/docs/healthchecks.md b/docs/healthchecks.md index 43f2ae3..cc77d89 100644 --- a/docs/healthchecks.md +++ b/docs/healthchecks.md @@ -17,9 +17,9 @@ Installed on the VPS: - `/usr/local/sbin/metin-login-healthcheck` -## What The Headless Login Check Verifies +## What The Headless Healthcheck Verifies -The check performs the real two-step Metin login flow without a GUI client: +The check performs the real two-step Metin login flow without a GUI client and then exercises the in-game mall open path: 1. Connect to the auth socket. 2. Complete the secure handshake. @@ -33,8 +33,10 @@ The check performs the real two-step Metin login flow without a GUI client: 10. Select a character slot. 11. Send `ENTERGAME`. 12. Verify `MAIN_CHARACTER`, `PHASE_GAME`, `TIME`, and `CHANNEL`. +13. Send `/mall_password 000000` through the encrypted chat path. +14. Verify `MALL_OPEN`. -This is an end-to-end login verification, not just a TCP port check. +This is an end-to-end gameplay-path verification, not just a TCP port check. ## How The Wrapper Works @@ -44,6 +46,7 @@ This is an end-to-end login verification, not just a TCP port check. - lets `metin_login_smoke` create a temporary character when the account is empty - runs `metin_login_smoke` - verifies a successful auth + channel + `ENTERGAME` flow +- verifies that the shared safebox/mall DB load bootstrap can open the mall with the default empty password - deletes the temporary account and temporary character rows on exit - passes the configured client version expected by the server @@ -81,7 +84,8 @@ sudo -iu mt2.jakubkadlec.dev env METIN_LOGIN_SMOKE_PASSWORD='' \ /home/mt2.jakubkadlec.dev/metin/build/server-src/bin/metin_login_smoke \ 173.249.9.66 11000 11011 --password-env=METIN_LOGIN_SMOKE_PASSWORD \ --create-character-name=smoketestchar \ - --client-version=1215955205 + --client-version=1215955205 \ + --mall-password=000000 ``` Useful direct flags: @@ -92,6 +96,8 @@ Useful direct flags: 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 +- `--mall-password=PASSWORD` + after `ENTERGAME`, opens the in-game mall via encrypted chat command and verifies `MALL_OPEN` Example negative auth test: