tools/lan_e2e.py: a world with commands, so the guest's commands run again

Since #372 a guest's commands need the world's Allow Commands as well as
the LAN's; the test's survival world had none, so every guest command (tp,
gamemode, setblock) was refused and the checks built on them failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-16 08:59:53 +02:00
parent dac18e8350
commit 327aa5af6e
+5 -1
View File
@@ -310,8 +310,12 @@ def run(ctl, out, resources, checks):
results = {}
try:
host('launch', wait=False, offscreen=sys.platform == 'darwin')
host.raw('open', 'Lan', 5)
# Guests' commands need the world's Allow Commands as well as the LAN's (#372): a creative
# world has them; everyone plays in survival.
host.raw('open', 'Lan', 5, 'creative')
host('wait_ready', seconds=400)
host('command', command='defaultgamemode survival')
host('command', command='gamemode survival')
host('command', command='time set day')
# An open stone floor around the host, so the players see each other and nothing is in the way.
host('command', command='fill ~-8 ~-1 ~-8 ~8 ~-1 ~8 minecraft:stone')