Merge phase 26 school seed.
ci / server (push) Failing after 3m34s
ci / client (push) Failing after 12s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 00:43:33 +03:00
co-authored by Cursor
18 changed files with 237 additions and 35 deletions
+13 -4
View File
@@ -491,9 +491,13 @@ public class SchoolApiTests(AppHostFixture fixture)
return state;
}
internal static async Task<SchoolResponse> CreateAsync(HttpClient client, string name, DateTime startDate)
internal static async Task<SchoolResponse> CreateAsync(
HttpClient client,
string name,
DateTime startDate,
int? seed = null)
{
using var response = await PostAsync(client, name, startDate);
using var response = await PostAsync(client, name, startDate, seed);
response.EnsureSuccessStatusCode();
var created = await response.Content.ReadFromJsonAsync<SchoolResponse>(TestContext.Current.CancellationToken);
@@ -526,10 +530,14 @@ public class SchoolApiTests(AppHostFixture fixture)
links = new[] { new { a = "yard", b = "office" } },
};
private static Task<HttpResponseMessage> PostAsync(HttpClient client, string name, DateTime startDate) =>
private static Task<HttpResponseMessage> PostAsync(
HttpClient client,
string name,
DateTime startDate,
int? seed = null) =>
client.PostAsJsonAsync(
"/api/schools",
new { name, startDate },
seed is null ? (object)new { name, startDate } : new { name, startDate, seed },
TestContext.Current.CancellationToken);
private static async Task<string?> ProblemCodeAsync(HttpResponseMessage response)
@@ -544,6 +552,7 @@ public class SchoolApiTests(AppHostFixture fixture)
DateTime GameTime,
bool Running,
byte SpeedIndex,
int Seed,
IReadOnlyList<string>? ModIds = null);
internal sealed record SchoolsResponse(