We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85e7bc7 commit 2442858Copy full SHA for 2442858
events/kafka_test.go
@@ -39,6 +39,15 @@ func TestKafkaEventMarshaling(t *testing.T) {
39
}
40
41
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))
51
52
53
func TestKafkaMarshalingMalformedJson(t *testing.T) {
events/testdata/kafka-event.json
@@ -14,19 +14,7 @@
14
"value": "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj",
15
"headers": [
16
{
17
- "headerKey": [
18
- 104,
19
- 101,
20
- 97,
21
- 100,
22
23
- 114,
24
- 86,
25
26
- 108,
27
- 117,
28
- 101
29
- ]
+ "headerKey": "aGVhZGVyVmFsdWU="
30
31
]
32
0 commit comments