feat(boot-test): test.yaml unboundPorts for ports opened only when a player connects

The first real run of the port check found that the crossplay Minecraft
server opens no UDP socket at startup: Bedrock goes through Geyser's
NetherNet transport, and 19132/udp is not open after boot. It is listed as
unboundPorts in that game's test.yaml, with the reason, until a Bedrock
client confirms how players reach it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gregandClaude Opus 5.5 committed 2026-10-26 00:05:37 -04:00
1 parent 0dc784dfa2
commit 87dfca1285
4 files changed
+35 -1

No files matched your search

+11 -1
View File
@@ -136,10 +136,20 @@ func bootTestPayload(gamesDir, id string, fillBlank bool) (map[string]any, error
}
}
// Once up, the server must listen on what nodes publish: the container side of every default port
// test.yaml's unboundPorts are published but only opened once a player connects; each is listed by
// hand, with the reason in a comment
unbound := map[string]bool{}
if list, ok := test["unboundPorts"].([]any); ok {
for _, p := range list {
unbound[fmt.Sprint(p)] = true
}
}
expectPorts := []any{}
if ports, ok := g["defaultPorts"].([]any); ok {
for _, p := range ports {
expectPorts = append(expectPorts, fmt.Sprint(p))
if !unbound[fmt.Sprint(p)] {
expectPorts = append(expectPorts, fmt.Sprint(p))
}
}
}