ericholguin commented on code in PR #7009:
URL: https://github.com/apache/trafficcontrol/pull/7009#discussion_r956167205
##########
traffic_ops/testing/api/v4/cdn_locks_test.go:
##########
@@ -528,6 +643,52 @@ func TestCDNLocks(t *testing.T) {
}
})
}
+ case "PROFILE POST":
+ {
+ t.Run(name, func(t
*testing.T) {
+ alerts, reqInf,
err := testCase.ClientSession.CreateProfile(profile, testCase.RequestOpts)
+ for _, check :=
range testCase.Expectations {
+
check(t, reqInf, nil, alerts, err)
+ }
+ })
+ }
Review Comment:
Yeah the cdn_lock tests got way bigger than intended. I think instead of
adding a different test structure I will be moving each of the different
endpoint tests that have a cdn lock test back into their own test file. I'll
just need to create a prerequisite cdn thats only meant for locks so there is
no overlap. I will need to do this as a separate PR though.
##########
traffic_ops/testing/api/v4/cdn_locks_test.go:
##########
@@ -417,6 +522,16 @@ func TestCDNLocks(t *testing.T) {
assert.NoError(t, err,
"Error occurred when marshalling request body: %v", err)
err =
json.Unmarshal(dat, &staticDNSEntry)
assert.NoError(t, err,
"Error occurred when unmarshalling request body: %v", err)
+ } else if _, ok :=
testCase.RequestBody["routing_disabled"]; ok {
+ dat, err :=
json.Marshal(testCase.RequestBody)
+ assert.NoError(t, err,
"Error occurred when marshalling request body: %v", err)
+ err =
json.Unmarshal(dat, &profile)
+ assert.NoError(t, err,
"Error occurred when unmarshalling request body: %v", err)
+ } else if _, ok :=
testCase.RequestBody["parameterId"]; ok {
+ dat, err :=
json.Marshal(testCase.RequestBody)
+ assert.NoError(t, err,
"Error occurred when marshalling request body: %v", err)
+ err =
json.Unmarshal(dat, &profileParameter)
+ assert.NoError(t, err,
"Error occurred when unmarshalling request body: %v", err)
Review Comment:
See comment above
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]