mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-05-07 10:05:54 +00:00
pull all non-request scoped values out of context
This commit is contained in:
@@ -33,7 +33,7 @@ func TestStructMethodGetFromRegistry(t *testing.T) {
|
||||
payload := test.TestStruct{Data: "hello"}
|
||||
expected := "hello"
|
||||
|
||||
got, err := processorInstance.Process(t.Context(), common.GetWrappedPayload(t.Context(), payload))
|
||||
got, err := processorInstance.Process(t.Context(), common.WrappedPayload{Payload: payload})
|
||||
if err != nil {
|
||||
t.Fatalf("struct.method.get processing failed: %s", err)
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func TestGoodStructMethodGet(t *testing.T) {
|
||||
t.Fatalf("struct.method.get failed to create processor: %s", err)
|
||||
}
|
||||
|
||||
got, err := processorInstance.Process(t.Context(), common.GetWrappedPayload(t.Context(), test.payload))
|
||||
got, err := processorInstance.Process(t.Context(), common.WrappedPayload{Payload: test.payload})
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("struct.method.get processing failed: %s", err)
|
||||
@@ -204,7 +204,7 @@ func TestBadStructMethodGet(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
got, err := processorInstance.Process(t.Context(), common.GetWrappedPayload(t.Context(), test.payload))
|
||||
got, err := processorInstance.Process(t.Context(), common.WrappedPayload{Payload: test.payload})
|
||||
|
||||
if err == nil {
|
||||
t.Fatalf("struct.method.get expected to fail but got payload: %+v", got)
|
||||
|
||||
Reference in New Issue
Block a user