srijeet0406 commented on a change in pull request #4942:
URL: https://github.com/apache/trafficcontrol/pull/4942#discussion_r470839239
##########
File path: traffic_ops/testing/api/v3/deliveryservice_request_comments_test.go
##########
@@ -31,13 +31,34 @@ func TestDeliveryServiceRequestComments(t *testing.T) {
time := currentTime.Format(time.RFC1123)
var header http.Header
header = make(map[string][]string)
- header.Set(rfc.IfModifiedSince, time)
+ header.Set(rfc.IfUnmodifiedSince, time)
UpdateTestDeliveryServiceRequestComments(t)
+ UpdateTestDeliveryServiceRequestCommentsWithHeaders(t, header)
+ header = make(map[string][]string)
+ etag := rfc.ETag(currentTime)
+ header.Set(rfc.IfMatch, etag)
+ UpdateTestDeliveryServiceRequestCommentsWithHeaders(t, header)
GetTestDeliveryServiceRequestComments(t)
GetTestDeliveryServiceRequestCommentsIMSAfterChange(t, header)
})
}
+func UpdateTestDeliveryServiceRequestCommentsWithHeaders(t *testing.T, header
http.Header) {
+ comments, _, err := TOSession.GetDeliveryServiceRequestComments(header)
+
+ firstComment := comments[0]
Review comment:
Yeah I pretty much copied the code from the other `Update` test which
does the same thing. I'll fix it in both the places.
----------------------------------------------------------------
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]