Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/e2e/arksurvival_cluster_persistence_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func TestGameServer_ArkSurvival_ClusterPersistence(t *testing.T) {
// the ARK server itself was started against it: hermsi/ark-server passes
// -ClusterDirOverride=/cluster and -clusterid once CLUSTER_ID is set. The
// server starts only after SteamCMD has installed ~25GB, hence the wait.
envInstance.Eventually(t, 45*time.Minute, func() (bool, string) {
// It stays at 30m so the whole test fits make test-e2e-keep's 50m timeout.
envInstance.Eventually(t, 30*time.Minute, func() (bool, string) {
out, err := envInstance.KubectlExec(t, ns, "pod/"+gsName+"-0", "pgrep", "-af", "ShooterGameServer")
if err != nil {
return false, "ShooterGameServer not running yet: " + err.Error() + " out=" + out
Expand Down
11 changes: 7 additions & 4 deletions test/e2e/arksurvivalevolved_bot_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ func TestGameServer_ArkSurvivalEvolvedBot_Query(t *testing.T) {
ReqCPU: "2", ReqMem: "8Gi",
LimCPU: "4", LimMem: "16Gi",
},
ReadyTimeout: 10 * time.Minute,
ProbePort: 27015,
ProbeDeadline: 4 * time.Minute,
ExpectDepth: joindepth.QUERY,
ReadyTimeout: 10 * time.Minute,
ProbePort: 27015,
// Running comes before SteamCMD finishes the ~25GB install, so the
// positive probe waits for it; the negative control stays short.
ProbeDeadline: 30 * time.Minute,
NegativeDeadline: 4 * time.Minute,
ExpectDepth: joindepth.QUERY,
// The operator injects its managed RCON password as ADMIN_PASSWORD,
// which hermsi/ark-server writes as ServerAdminPassword. Path A below
// proves the agent authenticates with it.
Expand Down
24 changes: 15 additions & 9 deletions test/e2e/gamebot_helpers_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ type gameBotSpec struct {
ReadyTimeout time.Duration
ProbePort int
ProbeDeadline time.Duration
ExpectDepth joindepth.JoinDepth
ProbeArgs []string
Probes map[string]any // spec.probes; nil means the operator sets no probe
RCON map[string]any // spec.rcon
ConsoleMode string // spec.consoleMode
Actions []any // spec.capabilities.actions; nil means no actions
Quiesce map[string]any // optional backup declaration
Control pathAControl // Path A: drive the server through Gameplane (optional)
// NegativeDeadline bounds the negative-control probe; zero means ProbeDeadline.
NegativeDeadline time.Duration
ExpectDepth joindepth.JoinDepth
ProbeArgs []string
Probes map[string]any // spec.probes; nil means the operator sets no probe
RCON map[string]any // spec.rcon
ConsoleMode string // spec.consoleMode
Actions []any // spec.capabilities.actions; nil means no actions
Quiesce map[string]any // optional backup declaration
Control pathAControl // Path A: drive the server through Gameplane (optional)
}

// runGameBotTest creates the GameTemplate + GameServer, waits for
Expand Down Expand Up @@ -224,12 +226,16 @@ func runGameBotTest(t *testing.T, s gameBotSpec) (string, string) {
// (the probe pod's own 127.0.0.1) with port 1, which is reserved and never
// listens. The probe will immediately get connection refused, proving
// transport failure, not a measurement error.
negDeadline := s.NegativeDeadline
if negDeadline == 0 {
negDeadline = s.ProbeDeadline
}
negCtrlResult := envInstance.RunGameProbe(t, GameProbe{
GameNS: "default",
GSName: "negative-control-" + s.Game,
Game: s.Game,
Port: 1,
Deadline: s.ProbeDeadline,
Deadline: negDeadline,
ExpectDepth: s.ExpectDepth,
ExpectFail: true,
Args: s.ProbeArgs,
Expand Down
Loading