feat(gl): scaffold general ledger grpc service
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package grpcadapter
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gl/application/health"
|
||||
|
||||
"google.golang.org/grpc/test/bufconn"
|
||||
)
|
||||
|
||||
func TestRunStopsWhenContextIsCancelled(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
|
||||
err := runWithListener(
|
||||
ctx,
|
||||
time.Second,
|
||||
bufconn.Listen(1024),
|
||||
NewHealthHandler(health.NewService(nil)),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user