Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,18 @@ describe("MatchAssistantService — on-demand server teardown", () => {
});
});

it("tells the game server which match it runs, for its crash reports", async () => {
await (service as any).assignOnDemandServer("match-1");

const [container] =
createNamespacedJob.mock.calls[0][0].body.spec.template.spec.containers;

expect(container.env).toContainEqual({
name: "MATCH_ID",
value: "match-1",
});
});

it("holds the pool lock past a teardown but not past the retries", async () => {
await (service as any).assignOnDemandServer("match-1");

Expand Down
1 change: 1 addition & 0 deletions src/matches/match-assistant/match-assistant.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,7 @@ export class MatchAssistantService {
value: `-maxplayers ${match.max_players_per_lineup * 2 + 3} ${map.workshop_map_id ? `+map de_inferno` : `+map ${map.name}`} +game_type 0 +game_mode ${MatchAssistantService.getGameMode(match.options?.type)} +sv_password ${match.password}${gameMode?.extraGameParams ? ` ${gameMode.extraGameParams}` : ""}`,
},
{ name: "SERVER_ID", value: server.id },
{ name: "MATCH_ID", value: matchId },
{
name: "SERVER_API_PASSWORD",
value: server.api_password,
Expand Down
Loading