test(docker): add local Spigot test server
This commit is contained in:
@@ -17,6 +17,40 @@ The approved behavior and implementation record are in the [OKF design bundle](d
|
||||
|
||||
The plugin JAR is written to `build/libs/`.
|
||||
|
||||
## Local Docker test server
|
||||
|
||||
Build the current plugin and start it on an isolated Spigot 26.2 server:
|
||||
|
||||
```bash
|
||||
./scripts/start-test-server.sh
|
||||
```
|
||||
|
||||
Connect to `localhost:25565` as `WindMagi`, which the harness configures as an operator. The server uses offline mode for local convenience and binds only to the loopback interface.
|
||||
|
||||
The first startup may take several minutes while the image downloads and Spigot is prepared. Override the 15-minute wait or local RCON password when needed:
|
||||
|
||||
```bash
|
||||
TREE_FELLER_START_TIMEOUT=1200 \
|
||||
TREE_FELLER_RCON_PASSWORD='local-secret' \
|
||||
./scripts/start-test-server.sh
|
||||
```
|
||||
|
||||
Common lifecycle commands:
|
||||
|
||||
```bash
|
||||
# Follow server logs
|
||||
docker compose -f compose.test.yml logs -f minecraft
|
||||
|
||||
# Stop while preserving the world and server configuration
|
||||
docker compose -f compose.test.yml down
|
||||
|
||||
# Stop and permanently reset all generated local test state
|
||||
docker compose -f compose.test.yml down
|
||||
rm -rf .docker/minecraft
|
||||
```
|
||||
|
||||
Re-run the start script after code changes to rebuild the JAR and recreate the test container. Generated server state remains under `.docker/minecraft/` and is ignored by Git.
|
||||
|
||||
## Player commands
|
||||
|
||||
```text
|
||||
|
||||
Reference in New Issue
Block a user