Fix: Fully respect configured custom admin path (merge PR #1483) (#1490)

* 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:
Copilot
2026-07-18 09:01:04 +02:00
committed by GitHub
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
11 changed files with 117 additions and 47 deletions
@@ -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();
}
}