pull all non-request scoped values out of context

This commit is contained in:
Joel Wetzell
2026-05-06 21:33:16 -05:00
parent eb25c73f3a
commit 833bd529d6
98 changed files with 328 additions and 584 deletions

View File

@@ -29,7 +29,7 @@ func TestStringEncodeFromRegistry(t *testing.T) {
payload := "hello"
expected := []byte{'h', 'e', 'l', 'l', 'o'}
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("string.encode processing failed: %s", err)
}
@@ -61,7 +61,7 @@ func TestGoodStringEncode(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got, err := stringEncoder.Process(t.Context(), common.GetWrappedPayload(t.Context(), test.payload))
got, err := stringEncoder.Process(t.Context(), common.WrappedPayload{Payload: test.payload})
if err != nil {
t.Fatalf("string.encode processing failed: %s", err)
}
@@ -93,7 +93,7 @@ func TestBadStringEncode(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got, err := stringEncoder.Process(t.Context(), common.GetWrappedPayload(t.Context(), test.payload))
got, err := stringEncoder.Process(t.Context(), common.WrappedPayload{Payload: test.payload})
if err == nil {
t.Fatalf("string.encode expected to fail but got payload: %+v", got)