mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-30 03:30:42 +02:00
Added feature to enable and disable mappings (#1437)
* feat/1421 added feature to enable and disable mappings * feat/1421 updated test constants to reflect 2 new admin endpoints /enable and /disable * feat/1421 updated tests to fix flakyness - removed delay before assertion that is causing upstream connection from proxy to teardown prematurely before test ends * feat/1421 addressing PR comments - Updated logic to represent IsDisable insted of IsEnabled
This commit is contained in:
committed by
GitHub
parent
85d61a1877
commit
1962437dcd
@@ -163,6 +163,22 @@ public interface IWireMockAdminApi
|
||||
[Header("Content-Type", "application/json")]
|
||||
Task<StatusModel> PutMappingAsync([Path] Guid guid, [Body] MappingModel mapping, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Enable a mapping based on the guid.
|
||||
/// </summary>
|
||||
/// <param name="guid">The Guid.</param>
|
||||
/// <param name="cancellationToken">The optional cancellationToken.</param>
|
||||
[Put("mappings/{guid}/enable")]
|
||||
Task<StatusModel> EnableMappingAsync([Path] Guid guid, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Disable a mapping based on the guid.
|
||||
/// </summary>
|
||||
/// <param name="guid">The Guid.</param>
|
||||
/// <param name="cancellationToken">The optional cancellationToken.</param>
|
||||
[Put("mappings/{guid}/disable")]
|
||||
Task<StatusModel> DisableMappingAsync([Path] Guid guid, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Delete a mapping based on the guid
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user