test cleanup

This commit is contained in:
Joel Wetzell
2026-02-08 21:31:08 -06:00
parent 0ef512eb28
commit 4ea6c8f11f
2 changed files with 8 additions and 11 deletions

View File

@@ -80,7 +80,6 @@ func TestBadStringDecode(t *testing.T) {
errorString string
}{
{
processor: &stringDecoder,
name: "non-[]byte input",
payload: "hello",
errorString: "string.decode processor only accepts a []byte",
@@ -89,7 +88,7 @@ func TestBadStringDecode(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got, err := test.processor.Process(t.Context(), test.payload)
got, err := stringDecoder.Process(t.Context(), test.payload)
if err == nil {
t.Fatalf("string.decode expected to fail but got payload: %s", got)

View File

@@ -47,13 +47,11 @@ func TestStringEncodeFromRegistry(t *testing.T) {
func TestGoodStringEncode(t *testing.T) {
stringEncoder := processor.StringEncode{}
tests := []struct {
processor processor.Processor
name string
payload any
expected []byte
}{
{
processor: &stringEncoder,
name: "hello",
payload: "hello",
expected: []byte{0x68, 0x65, 0x6c, 0x6c, 0x6f},
@@ -62,7 +60,7 @@ func TestGoodStringEncode(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got, err := test.processor.Process(t.Context(), test.payload)
got, err := stringEncoder.Process(t.Context(), test.payload)
gotBytes, ok := got.([]byte)
if !ok {