File tree Expand file tree Collapse file tree
src/WireMock.Net.Minimal/Server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace WireMock.Owin;
88internal sealed class AdminPaths ( string ? adminPath ) : IAdminPaths
99{
1010 private const string DefaultAdminPathPrefix = "/__admin" ;
11-
11+
1212 private readonly string _prefix = adminPath ?? DefaultAdminPathPrefix ;
1313
1414 public string Files => $ "{ _prefix } /files";
Original file line number Diff line number Diff line change @@ -648,4 +648,24 @@ public async Task WireMockServer_CreateClient_And_CallAdminSettingsEndpoint()
648648 // Assert
649649 settings . Should ( ) . NotBeNull ( ) ;
650650 }
651+
652+ [ Fact ]
653+ public async Task WireMockServer_WithCustomAdminPath_AdminRequestsNotInLogEntries ( )
654+ {
655+ // Arrange
656+ var cancellationToken = TestContext . Current . CancellationToken ;
657+ using var server = WireMockServer . Start ( w =>
658+ {
659+ w . Logger = new TestOutputHelperWireMockLogger ( output ) ;
660+ w . StartAdminInterface = true ;
661+ w . AdminPath = "/custom/__admin" ;
662+ } ) ;
663+ var client = server . CreateClient ( ) ;
664+
665+ // Act
666+ await client . GetAsync ( $ "{ server . Url } /custom/__admin/settings", cancellationToken ) ;
667+
668+ // Assert
669+ server . LogEntries . Should ( ) . BeEmpty ( ) ;
670+ }
651671}
You can’t perform that action at this time.
0 commit comments