20 lines
382 B
Go
20 lines
382 B
Go
package grpcadapter
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"gl/application/health"
|
|
basev1 "gl/gen/base/v1"
|
|
)
|
|
|
|
func TestHealth(t *testing.T) {
|
|
response, err := NewHealthHandler(health.NewService(nil)).Health(context.Background(), &basev1.Empty{})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if !response.Serving || response.DatabaseReady {
|
|
t.Fatalf("unexpected response: %+v", response)
|
|
}
|
|
}
|