chore: establish local platform baseline
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRunWiresWorkerServiceAndPropagatesError(t *testing.T) {
|
||||
want := errors.New("synthetic worker failure")
|
||||
ctx := context.WithValue(context.Background(), struct{}{}, "request-context")
|
||||
err := run(ctx, func(gotContext context.Context, serviceName string) error {
|
||||
if gotContext != ctx || serviceName != "worker" {
|
||||
t.Fatalf("context=%v service=%q", gotContext, serviceName)
|
||||
}
|
||||
return want
|
||||
})
|
||||
if !errors.Is(err, want) {
|
||||
t.Fatalf("run error=%v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user