mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 17:28:53 +02:00
feat(healthcheck): add retries before notifying (default: 3 times)
- Introduced NotifyFunc type for customizable notification handling in tests. - Added Retries field to HealthCheckConfig for controlling notification thresholds. - Implemented tests for notification behavior under various health check scenarios.
This commit is contained in:
@@ -65,6 +65,11 @@ func Contains[T any](t *testing.T, got T, wants []T, msgAndArgs ...any) {
|
||||
require.Contains(t, wants, got, msgAndArgs...)
|
||||
}
|
||||
|
||||
func StringsContain(t *testing.T, got string, want string, msgAndArgs ...any) {
|
||||
t.Helper()
|
||||
require.Contains(t, got, want, msgAndArgs...)
|
||||
}
|
||||
|
||||
func Type[T any](t *testing.T, got any, msgAndArgs ...any) (_ T) {
|
||||
t.Helper()
|
||||
_, ok := got.(T)
|
||||
|
||||
Reference in New Issue
Block a user