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
@@ -32,7 +32,7 @@ public sealed class UnsTreeServiceAreaLineTests
{
var (service, dbName) = Fresh();
var result = await service.CreateAreaAsync("MAIN", "AREA-NEW", "assembly", " ");
var result = await service.CreateAreaAsync("MAIN", "AREA-NEW", "assembly", " ", TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -49,9 +49,9 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task CreateArea_duplicate_id_returns_error()
{
var (service, dbName) = Fresh();
await service.CreateAreaAsync("MAIN", "AREA-DUP", "first", null);
await service.CreateAreaAsync("MAIN", "AREA-DUP", "first", null, TestContext.Current.CancellationToken);
var result = await service.CreateAreaAsync("MAIN", "AREA-DUP", "second", null);
var result = await service.CreateAreaAsync("MAIN", "AREA-DUP", "second", null, TestContext.Current.CancellationToken);
result.Ok.ShouldBeFalse();
result.Error.ShouldBe("Area 'AREA-DUP' already exists.");
@@ -67,7 +67,7 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task UpdateArea_changes_name_and_notes()
{
var (service, dbName) = Fresh();
await service.CreateAreaAsync("MAIN", "AREA-1", "old", "old notes");
await service.CreateAreaAsync("MAIN", "AREA-1", "old", "old notes", TestContext.Current.CancellationToken);
byte[] rv;
using (var db = UnsTreeTestDb.CreateNamed(dbName))
@@ -75,7 +75,7 @@ public sealed class UnsTreeServiceAreaLineTests
rv = db.UnsAreas.Single(a => a.UnsAreaId == "AREA-1").RowVersion;
}
var result = await service.UpdateAreaAsync("AREA-1", "new", " ", "MAIN", rv);
var result = await service.UpdateAreaAsync("AREA-1", "new", " ", "MAIN", rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -116,7 +116,7 @@ public sealed class UnsTreeServiceAreaLineTests
rv = db.UnsAreas.Single(a => a.UnsAreaId == "AREA-X").RowVersion;
}
var result = await service.UpdateAreaAsync("AREA-X", "a", null, "SITE-A", rv);
var result = await service.UpdateAreaAsync("AREA-X", "a", null, "SITE-A", rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -132,7 +132,7 @@ public sealed class UnsTreeServiceAreaLineTests
{
var (service, _) = Fresh();
var result = await service.UpdateAreaAsync("NOPE", "n", null, "MAIN", []);
var result = await service.UpdateAreaAsync("NOPE", "n", null, "MAIN", [], TestContext.Current.CancellationToken);
result.Ok.ShouldBeFalse();
result.Error.ShouldBe("Row no longer exists.");
@@ -145,7 +145,7 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task DeleteArea_removes_row()
{
var (service, dbName) = Fresh();
await service.CreateAreaAsync("MAIN", "AREA-DEL", "a", null);
await service.CreateAreaAsync("MAIN", "AREA-DEL", "a", null, TestContext.Current.CancellationToken);
byte[] rv;
using (var db = UnsTreeTestDb.CreateNamed(dbName))
@@ -153,7 +153,7 @@ public sealed class UnsTreeServiceAreaLineTests
rv = db.UnsAreas.Single(a => a.UnsAreaId == "AREA-DEL").RowVersion;
}
var result = await service.DeleteAreaAsync("AREA-DEL", rv);
var result = await service.DeleteAreaAsync("AREA-DEL", rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -168,7 +168,7 @@ public sealed class UnsTreeServiceAreaLineTests
{
var (service, _) = Fresh();
var result = await service.DeleteAreaAsync("GHOST", []);
var result = await service.DeleteAreaAsync("GHOST", [], TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -181,9 +181,9 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task CreateLine_then_load_shows_it()
{
var (service, dbName) = Fresh();
await service.CreateAreaAsync("MAIN", "AREA-1", "a", null);
await service.CreateAreaAsync("MAIN", "AREA-1", "a", null, TestContext.Current.CancellationToken);
var result = await service.CreateLineAsync("AREA-1", "LINE-NEW", "line-a", " ");
var result = await service.CreateLineAsync("AREA-1", "LINE-NEW", "line-a", " ", TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -200,9 +200,9 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task CreateLine_duplicate_id_returns_error()
{
var (service, _) = Fresh();
await service.CreateLineAsync("AREA-1", "LINE-DUP", "first", null);
await service.CreateLineAsync("AREA-1", "LINE-DUP", "first", null, TestContext.Current.CancellationToken);
var result = await service.CreateLineAsync("AREA-1", "LINE-DUP", "second", null);
var result = await service.CreateLineAsync("AREA-1", "LINE-DUP", "second", null, TestContext.Current.CancellationToken);
result.Ok.ShouldBeFalse();
result.Error.ShouldBe("Line 'LINE-DUP' already exists.");
@@ -215,7 +215,7 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task UpdateLine_changes_area_name_and_notes()
{
var (service, dbName) = Fresh();
await service.CreateLineAsync("AREA-1", "LINE-1", "old", "old notes");
await service.CreateLineAsync("AREA-1", "LINE-1", "old", "old notes", TestContext.Current.CancellationToken);
byte[] rv;
using (var db = UnsTreeTestDb.CreateNamed(dbName))
@@ -223,7 +223,7 @@ public sealed class UnsTreeServiceAreaLineTests
rv = db.UnsLines.Single(l => l.UnsLineId == "LINE-1").RowVersion;
}
var result = await service.UpdateLineAsync("LINE-1", "new", " ", "AREA-2", rv);
var result = await service.UpdateLineAsync("LINE-1", "new", " ", "AREA-2", rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -241,7 +241,7 @@ public sealed class UnsTreeServiceAreaLineTests
{
var (service, _) = Fresh();
var result = await service.UpdateLineAsync("NOPE", "n", null, "AREA-1", []);
var result = await service.UpdateLineAsync("NOPE", "n", null, "AREA-1", [], TestContext.Current.CancellationToken);
result.Ok.ShouldBeFalse();
result.Error.ShouldBe("Row no longer exists.");
@@ -275,7 +275,7 @@ public sealed class UnsTreeServiceAreaLineTests
rv = db.UnsLines.Single(l => l.UnsLineId == "LINE-BOUND").RowVersion;
}
var result = await service.UpdateLineAsync("LINE-BOUND", "line", null, "A2-SITE-A", rv);
var result = await service.UpdateLineAsync("LINE-BOUND", "line", null, "A2-SITE-A", rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -292,7 +292,7 @@ public sealed class UnsTreeServiceAreaLineTests
public async Task DeleteLine_removes_row()
{
var (service, dbName) = Fresh();
await service.CreateLineAsync("AREA-1", "LINE-DEL", "l", null);
await service.CreateLineAsync("AREA-1", "LINE-DEL", "l", null, TestContext.Current.CancellationToken);
byte[] rv;
using (var db = UnsTreeTestDb.CreateNamed(dbName))
@@ -300,7 +300,7 @@ public sealed class UnsTreeServiceAreaLineTests
rv = db.UnsLines.Single(l => l.UnsLineId == "LINE-DEL").RowVersion;
}
var result = await service.DeleteLineAsync("LINE-DEL", rv);
var result = await service.DeleteLineAsync("LINE-DEL", rv, TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();
@@ -315,7 +315,7 @@ public sealed class UnsTreeServiceAreaLineTests
{
var (service, _) = Fresh();
var result = await service.DeleteLineAsync("GHOST", []);
var result = await service.DeleteLineAsync("GHOST", [], TestContext.Current.CancellationToken);
result.Ok.ShouldBeTrue();
result.Error.ShouldBeNull();