2023-12-23 09:54:47 +00:00
|
|
|
package healthtest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2024-04-06 04:32:29 +00:00
|
|
|
"gitea.dwysokinski.me/twhelp/core/internal/health"
|
2023-12-23 09:54:47 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Checker is a mock implementation of health.Checker.
|
|
|
|
type Checker struct {
|
|
|
|
// Nam is later returned in the Name method
|
|
|
|
Nam string
|
|
|
|
// Err is later returned in the Check method
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ health.Checker = Checker{}
|
|
|
|
|
|
|
|
func (c Checker) Name() string {
|
|
|
|
return c.Nam
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c Checker) Check(_ context.Context) error {
|
|
|
|
return c.Err
|
|
|
|
}
|