tests: fix blog host factory to use built in use kestrel call and dump composite host.
Pull Request / Run tests (pull_request) Successful in 2m3s

This commit is contained in:
Stevan Freeborn committed 2026-09-03 14:13:02 -05:00
1 parent 4a7c8b31c5
commit 81cc1e4f64
3 files changed
+17 -79

No files matched your search

+6 -6
View File
@@ -3,12 +3,12 @@ namespace Blog.Tests.EndToEnd;
[TestFixture]
public abstract class BlogTest : PageTest
{
private readonly BlogHostFactory<Program> _factory = new();
private static readonly BlogHostFactory<Program> Factory = new();
public override BrowserNewContextOptions ContextOptions()
{
var options = base.ContextOptions();
options.BaseURL = _factory.ServerAddress;
options.BaseURL = Factory.ServerAddress;
return options;
}
@@ -30,10 +30,10 @@ public abstract class BlogTest : PageTest
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
}