ezelkow1 commented on a change in pull request #4993:
URL: https://github.com/apache/trafficcontrol/pull/4993#discussion_r480397324
##########
File path: traffic_monitor/cache/astats_test.go
##########
@@ -60,14 +57,11 @@ func TestAstatsCSV(t *testing.T) {
pl := &poller.HTTPPollCtx{HTTPHeader: http.Header{}}
ctx := interface{}(pl)
ctx.(*poller.HTTPPollCtx).HTTPHeader.Set("Content-Type", "text/csv")
- _, thismap, err := astatsParse("testCache", file, ctx)
+ _, _, err = astatsParse("testCache", file, ctx)
Review comment:
its more important that it just doesnt crash. There are already
differences between both the json and csv outputs because the CSV one will
strip out extraneous fields. Just verifying the size doesnt mean much since you
could throw some random data into the files and still have it be allocated in
to a proper map
This is also all the original test was doing as well, only checking that it
didnt crash, beyond printing a value that wasnt checked or useful for anything,
however it was only checking the jsoniter unmarshal capability and not checking
that the TM functions themselves didnt cause issues
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]