mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-07-18 11:01:23 +02:00
Add tests for custom admin path behaviour
This commit is contained in:
@@ -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