mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-08-08 04:48:39 +02:00
* Fix: Fully respect configured custom admin path * Add tests for custom admin path behaviour * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Peter Benko <peter.benko@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Stef Heyenrath <Stef.Heyenrath@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Peter Benko
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Stef Heyenrath
Copilot Autofix powered by AI
parent
5692498ea3
commit
ca4eea808e
@@ -648,4 +648,24 @@ public class WireMockServerAdminTests(ITestOutputHelper output, ITestContextAcce
|
||||
// Assert
|
||||
settings.Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task WireMockServer_WithCustomAdminPath_AdminRequestsNotInLogEntries()
|
||||
{
|
||||
// Arrange
|
||||
var cancellationToken = TestContext.Current.CancellationToken;
|
||||
using var server = WireMockServer.Start(w =>
|
||||
{
|
||||
w.Logger = new TestOutputHelperWireMockLogger(output);
|
||||
w.StartAdminInterface = true;
|
||||
w.AdminPath = "/custom/__admin";
|
||||
});
|
||||
var client = server.CreateClient();
|
||||
|
||||
// Act
|
||||
await client.GetAsync($"{server.Url}/custom/__admin/settings", cancellationToken);
|
||||
|
||||
// Assert
|
||||
server.LogEntries.Should().BeEmpty();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user