healthcheck: cover mall open flow
This commit is contained in:
@@ -14,6 +14,7 @@ fi
|
|||||||
: "${CHANNEL_PORT:=11011}"
|
: "${CHANNEL_PORT:=11011}"
|
||||||
: "${SMOKE_BIN:=/home/${RUN_AS_USER}/metin/build/server-src/bin/metin_login_smoke}"
|
: "${SMOKE_BIN:=/home/${RUN_AS_USER}/metin/build/server-src/bin/metin_login_smoke}"
|
||||||
: "${CLIENT_VERSION:=1215955205}"
|
: "${CLIENT_VERSION:=1215955205}"
|
||||||
|
: "${MALL_PASSWORD:=000000}"
|
||||||
|
|
||||||
if [[ ! -x "${SMOKE_BIN}" ]]; then
|
if [[ ! -x "${SMOKE_BIN}" ]]; then
|
||||||
echo "Smoke binary not found: ${SMOKE_BIN}" >&2
|
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}" \
|
"${SMOKE_BIN}" "${SERVER_HOST}" "${AUTH_PORT}" "${CHANNEL_PORT}" "${LOGIN}" \
|
||||||
--password-env=METIN_LOGIN_SMOKE_PASSWORD \
|
--password-env=METIN_LOGIN_SMOKE_PASSWORD \
|
||||||
--create-character-name="${CHARACTER_NAME}" \
|
--create-character-name="${CHARACTER_NAME}" \
|
||||||
--client-version="${CLIENT_VERSION}"
|
--client-version="${CLIENT_VERSION}" \
|
||||||
|
--mall-password="${MALL_PASSWORD}"
|
||||||
|
|
||||||
echo "Login healthcheck passed"
|
echo "Login healthcheck passed"
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ Installed on the VPS:
|
|||||||
|
|
||||||
- `/usr/local/sbin/metin-login-healthcheck`
|
- `/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.
|
1. Connect to the auth socket.
|
||||||
2. Complete the secure handshake.
|
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.
|
10. Select a character slot.
|
||||||
11. Send `ENTERGAME`.
|
11. Send `ENTERGAME`.
|
||||||
12. Verify `MAIN_CHARACTER`, `PHASE_GAME`, `TIME`, and `CHANNEL`.
|
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
|
## 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
|
- lets `metin_login_smoke` create a temporary character when the account is empty
|
||||||
- runs `metin_login_smoke`
|
- runs `metin_login_smoke`
|
||||||
- verifies a successful auth + channel + `ENTERGAME` flow
|
- 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
|
- deletes the temporary account and temporary character rows on exit
|
||||||
- passes the configured client version expected by the server
|
- passes the configured client version expected by the server
|
||||||
|
|
||||||
@@ -81,7 +84,8 @@ sudo -iu mt2.jakubkadlec.dev env METIN_LOGIN_SMOKE_PASSWORD='<password>' \
|
|||||||
/home/mt2.jakubkadlec.dev/metin/build/server-src/bin/metin_login_smoke \
|
/home/mt2.jakubkadlec.dev/metin/build/server-src/bin/metin_login_smoke \
|
||||||
173.249.9.66 11000 11011 <login> --password-env=METIN_LOGIN_SMOKE_PASSWORD \
|
173.249.9.66 11000 11011 <login> --password-env=METIN_LOGIN_SMOKE_PASSWORD \
|
||||||
--create-character-name=smoketestchar \
|
--create-character-name=smoketestchar \
|
||||||
--client-version=1215955205
|
--client-version=1215955205 \
|
||||||
|
--mall-password=000000
|
||||||
```
|
```
|
||||||
|
|
||||||
Useful direct flags:
|
Useful direct flags:
|
||||||
@@ -92,6 +96,8 @@ Useful direct flags:
|
|||||||
treats an auth failure such as `NOID` or `WRONGPWD` as a successful negative test
|
treats an auth failure such as `NOID` or `WRONGPWD` as a successful negative test
|
||||||
- `--expect-channel-failure=STATUS`
|
- `--expect-channel-failure=STATUS`
|
||||||
treats a channel failure as a successful negative test
|
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:
|
Example negative auth test:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user