shamrickus commented on code in PR #7750:
URL: https://github.com/apache/trafficcontrol/pull/7750#discussion_r1310324287
##########
traffic_ops/testing/api/v5/cdn_locks_test.go:
##########
@@ -123,19 +123,21 @@ func TestCDNLocks(t *testing.T) {
ClientSession: opsUserWithLockSession,
RequestOpts:
client.RequestOptions{QueryParameters: url.Values{"hostName":
{"cdn2-test-edge"}}},
RequestBody: map[string]interface{}{
- "config_apply_time":
util.TimePtr(now),
+ "config_apply_time":
util.Ptr(now),
+ "config_update_failed":
util.Ptr(true),
Review Comment:
`ServerUpdateStatusV5` still has this as a pointer since it's an optional
field.
##########
traffic_ops/testing/api/v5/servers_hostname_update_test.go:
##########
@@ -125,9 +137,15 @@ func validateServerApplyTimes(hostName string,
expectedResp map[string]interface
case "ConfigApplyTime":
assert.RequireNotNil(t,
resp.Response[0].ConfigApplyTime, "Expected ConfigApplyTime to not be nil.")
assert.Equal(t, true,
server.ConfigApplyTime.Equal(expected.(time.Time)), "Expected ConfigApplyTime
to be %v, but got %v", expected, server.ConfigApplyTime)
+ case "ConfigUpdateFailed":
+ assert.RequireNotNil(t,
resp.Response[0].ConfigUpdateFailed, "Expected ConfigUpdateFailed to not be
nil.")
Review Comment:
`ServerUpdateStatusV5` still has this as a pointer since it's an optional
field.
##########
traffic_ops/testing/api/v5/servers_hostname_update_test.go:
##########
@@ -125,9 +137,15 @@ func validateServerApplyTimes(hostName string,
expectedResp map[string]interface
case "ConfigApplyTime":
assert.RequireNotNil(t,
resp.Response[0].ConfigApplyTime, "Expected ConfigApplyTime to not be nil.")
assert.Equal(t, true,
server.ConfigApplyTime.Equal(expected.(time.Time)), "Expected ConfigApplyTime
to be %v, but got %v", expected, server.ConfigApplyTime)
+ case "ConfigUpdateFailed":
+ assert.RequireNotNil(t,
resp.Response[0].ConfigUpdateFailed, "Expected ConfigUpdateFailed to not be
nil.")
+ assert.Equal(t, expected.(bool),
resp.Response[0].ConfigUpdateFailed, "Expected ConfigUpdateFailed to be %v, but
got %v", expected, server.ConfigUpdateFailed)
case "RevalApplyTime":
assert.RequireNotNil(t,
resp.Response[0].RevalApplyTime, "Expected RevalApplyTime to not be nil.")
assert.Equal(t, true,
server.RevalApplyTime.Equal(expected.(time.Time)), "Expected RevalApplyTime to
be %v, but got %v", expected, server.RevalApplyTime)
+ case "RevalUpdateFailed":
+ assert.RequireNotNil(t,
resp.Response[0].RevalUpdateFailed, "Expected RevalUpdateFailed to not be nil.")
Review Comment:
`ServerUpdateStatusV5` still has this as a pointer since it's an optional
field.
--
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]