mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-22 01:20:14 +01:00
Add "/__admin/health" endpoint (#1112)
This commit is contained in:
@@ -41,6 +41,18 @@ public partial class WireMockAdminApiTests
|
||||
VerifyNewtonsoftJson.Enable(VerifySettings);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task IWireMockAdminApi_GetHealthAsync()
|
||||
{
|
||||
// Arrange
|
||||
var server = WireMockServer.StartWithAdminInterface();
|
||||
var api = RestClient.For<IWireMockAdminApi>(server.Urls[0]);
|
||||
|
||||
// Act
|
||||
var status = await api.GetHealthAsync().ConfigureAwait(false);
|
||||
status.Should().Be("Healthy");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task IWireMockAdminApi_GetSettingsAsync()
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ public class WireMockServerProxyTests
|
||||
}
|
||||
|
||||
// Assert
|
||||
server.Mappings.Should().HaveCount(35);
|
||||
server.Mappings.Should().HaveCount(36);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -81,7 +81,7 @@ public class WireMockServerSettingsTests
|
||||
|
||||
// Assert
|
||||
server.Mappings.Should().NotBeNull();
|
||||
server.Mappings.Should().HaveCount(33);
|
||||
server.Mappings.Should().HaveCount(34);
|
||||
server.Mappings.All(m => m.Priority == WireMockConstants.AdminPriority).Should().BeTrue();
|
||||
}
|
||||
|
||||
@@ -100,9 +100,9 @@ public class WireMockServerSettingsTests
|
||||
|
||||
// Assert
|
||||
server.Mappings.Should().NotBeNull();
|
||||
server.Mappings.Should().HaveCount(34);
|
||||
server.Mappings.Should().HaveCount(35);
|
||||
|
||||
server.Mappings.Count(m => m.Priority == WireMockConstants.AdminPriority).Should().Be(33);
|
||||
server.Mappings.Count(m => m.Priority == WireMockConstants.AdminPriority).Should().Be(34);
|
||||
server.Mappings.Count(m => m.Priority == WireMockConstants.ProxyPriority).Should().Be(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user