-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: add tests to consul health check * test: add test for consul health checks * docs: improve documentation * style: resolve lint warnings * test: improve test when fail
- Loading branch information
Showing
8 changed files
with
224 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// MockClient.swift | ||
// | ||
// | ||
// Created by Mykhailo Bondarenko on 23.02.2024. | ||
// | ||
|
||
import Vapor | ||
|
||
struct MockClient: Client { | ||
var eventLoop: EventLoop | ||
var clientResponse: ClientResponse | ||
|
||
func send(_ request: ClientRequest) -> EventLoopFuture<ClientResponse> { | ||
self.eventLoop.makeSucceededFuture(self.clientResponse) | ||
} | ||
|
||
func delegating(to eventLoop: EventLoop) -> Client { | ||
self | ||
} | ||
} | ||
|
||
extension ClientResponse: @unchecked Sendable {} |