Skip to content

Commit 0ab6299

Browse files
author
Peiyu Wu
committed
fix incorrect kafka test json 2/2
1 parent f638238 commit 0ab6299

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

events/kafka_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ func TestKafkaEventMarshaling(t *testing.T) {
3939
}
4040
}
4141
}
42+
43+
// 3. serialize to JSON
44+
outputJson, err := json.Marshal(inputEvent)
45+
if err != nil {
46+
t.Errorf("could not marshal event. details: %v", err)
47+
}
48+
49+
// 4. check result
50+
assert.JSONEq(t, string(inputJson), string(outputJson))
4251
}
4352

4453
func TestKafkaMarshalingMalformedJson(t *testing.T) {

0 commit comments

Comments
 (0)