cloudflare / logshare

logshare is a library & CLI client for retrieving logs from Cloudflare's Enterprise Log Share service.
https://support.cloudflare.com/hc/en-us/articles/216672448
BSD 3-Clause "New" or "Revised" License
80 stars 24 forks source link

[test] Add tests for logshare package #28

Closed ivan-californias closed 1 year ago

ivan-californias commented 6 years ago

I wrote some tests for the logshare package which mainly tests the following:

Please note that for these tests I had to enable the usage of a custom http.Client and an ApiUrl, so instead of doing the call to the actual API, it would do it to a mock httptest.Server.