Skip to content

Commit

Permalink
test marshalling with no filter
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfaulkner committed Jun 17, 2022
1 parent b05365b commit 3c8c7a1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions logpush_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,21 @@ func TestLogPushJob_Marshall(t *testing.T) {
"filter":"{\"where\":{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"example.com\"}}"
}`,
},
{
job: LogpushJob{
Dataset: "http_requests",
Name: "no filter",
LogpullOptions: "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339",
DestinationConf: "https://example.com",
},
want: `{
"dataset": "http_requests",
"enabled": false,
"name": "no filter",
"logpull_options": "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339",
"destination_conf": "https://example.com"
}`,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 3c8c7a1

Please sign in to comment.