rimashah25 commented on code in PR #7023:
URL: https://github.com/apache/trafficcontrol/pull/7023#discussion_r951752273
##########
traffic_ops/testing/api/v4/servers_test.go:
##########
@@ -33,19 +33,47 @@ import (
)
func TestServers(t *testing.T) {
- WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles,
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies,
ServiceCategories, DeliveryServices, DeliveryServiceServerAssignments}, func() {
+ WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles,
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies,
ServiceCategories, DeliveryServices, DeliveryServiceServerAssignments, ASN},
func() {
currentTime := time.Now().UTC().Add(-15 * time.Second)
currentTimeRFC := currentTime.Format(time.RFC1123)
tomorrow := currentTime.AddDate(0, 0, 1).Format(time.RFC1123)
+ // Add a new asn for one of the cachegroups
+ cgResp, _, err :=
TOSession.GetCacheGroups(client.RequestOptions{QueryParameters:
url.Values{"name": {"topology-mid-cg-01"}}})
Review Comment:
nit: Can this code (L43 - L64) be its own function? To maintain consistency
of the way tests are written.
--
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]