test(backend): add process manager and steamcmd tests with stub scripts
- server_process_test.go: 16 tests covering splitArgs, hasArgPrefix, buildAutoArgs (config/port/profiles), buildArgs, resolveModPath (name/ ID/empty), buildModPath, WriteUserconfigFiles, Start/Stop lifecycle, percent-command substitution - steamcmd_test.go: 9 tests covering CheckWorkshopMod (directory/file/ empty), SteamCmdManager state machine, DownloadMods/UpdateGame - testdata/: stub arma3server_x64 and steamcmd scripts for safe process testing without real binaries
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Stub arma3server binary for testing.
|
||||
# Logs args to stdout then sleeps until killed (simulates a running server).
|
||||
echo "[STUB] arma3server_x64 called with: $@"
|
||||
sleep 3600
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Stub steamcmd binary for testing.
|
||||
# Logs args to stdout then exits immediately.
|
||||
echo "[STUB] steamcmd called with: $@"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user