test: migrate AdminUI/ControlPlane/Runtime/Host tests to xunit.v3 (#756)
v2-ci / unit-tests (push) Failing after 13m22s

Akka.TestKit.Xunit2 -> Akka.TestKit.Xunit 1.5.62 (xunit.v3 TestKit; needs xunit.v3 3.2.2, set via
VersionOverride on the four projects). Removes the xunit 2.9.3 pin. IAsyncLifetime returns ValueTask,
SqlServerFactAttribute gains the source-info ctor, and xUnit1051 call sites pass
TestContext.Current.CancellationToken. Test counts unchanged.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-10 08:57:33 -05:00
parent 2a8e2981fe
commit b211911f98
191 changed files with 2161 additions and 2166 deletions
@@ -94,7 +94,7 @@ public sealed class ScriptSourceServiceTests
var (service, dbName) = Fresh();
SeedScriptAndUsages(dbName);
var loaded = await service.GetScriptSourceAsync("SCRIPT-1");
var loaded = await service.GetScriptSourceAsync("SCRIPT-1", TestContext.Current.CancellationToken);
loaded.ShouldNotBeNull();
loaded.Value.SourceCode.ShouldBe("return 1;");
@@ -109,7 +109,7 @@ public sealed class ScriptSourceServiceTests
var (service, dbName) = Fresh();
SeedScriptAndUsages(dbName);
var loaded = await service.GetScriptSourceAsync("SCRIPT-NOPE");
var loaded = await service.GetScriptSourceAsync("SCRIPT-NOPE", TestContext.Current.CancellationToken);
loaded.ShouldBeNull();
}
@@ -123,9 +123,9 @@ public sealed class ScriptSourceServiceTests
var (service, dbName) = Fresh();
SeedScriptAndUsages(dbName);
(await service.CountVirtualTagsUsingScriptAsync("SCRIPT-1")).ShouldBe(2);
(await service.CountVirtualTagsUsingScriptAsync("SCRIPT-2")).ShouldBe(1);
(await service.CountVirtualTagsUsingScriptAsync("SCRIPT-NOPE")).ShouldBe(0);
(await service.CountVirtualTagsUsingScriptAsync("SCRIPT-1", TestContext.Current.CancellationToken)).ShouldBe(2);
(await service.CountVirtualTagsUsingScriptAsync("SCRIPT-2", TestContext.Current.CancellationToken)).ShouldBe(1);
(await service.CountVirtualTagsUsingScriptAsync("SCRIPT-NOPE", TestContext.Current.CancellationToken)).ShouldBe(0);
}
// ----- UpdateScriptSourceAsync -----
@@ -147,7 +147,7 @@ public sealed class ScriptSourceServiceTests
}
const string newSource = "return 42;";
var result = await service.UpdateScriptSourceAsync("SCRIPT-1", newSource, rv);
var result = await service.UpdateScriptSourceAsync("SCRIPT-1", newSource, rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -166,7 +166,7 @@ public sealed class ScriptSourceServiceTests
var (service, dbName) = Fresh();
SeedScriptAndUsages(dbName);
var result = await service.UpdateScriptSourceAsync("SCRIPT-NOPE", "x", []);
var result = await service.UpdateScriptSourceAsync("SCRIPT-NOPE", "x", [], TestContext.Current.CancellationToken);
result.Ok.ShouldBeFalse();
result.Error.ShouldBe("Script not found.");
@@ -200,7 +200,7 @@ public sealed class ScriptSourceServiceTests
other.SaveChanges();
}
var result = await service.UpdateScriptSourceAsync("SCRIPT-1", "return 99;", staleRv);
var result = await service.UpdateScriptSourceAsync("SCRIPT-1", "return 99;", staleRv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeFalse();
result.Error.ShouldNotBeNull();