This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new e12f17e  Add TO Client API for Create Update Delivery Service 
Automation (#6172)
e12f17e is described below

commit e12f17eef6edd1c1e8b32d6312ed297e8ef11dbf
Author: dmohan001c <[email protected]>
AuthorDate: Fri Sep 17 19:54:40 2021 +0530

    Add TO Client API for Create Update Delivery Service Automation (#6172)
    
    * refactored the pagination code
    
    * added tests for getds by Topology, ServiceCategories
    
    * added tests for Create DS with Steering Type
    
    * get type id by name and passed to update ds
    
    * formatted the code
    
    * updated correct formatting directive
    
    * added null checks for topology and service categories
    
    * added servicecategories as a pre-requisite before DeliveryServices
    
    * added validation for update delivery service
    
    * removed auto retrieval of types
---
 .../api/v4/cachegroupsdeliveryservices_test.go     |   2 +-
 traffic_ops/testing/api/v4/cdn_locks_test.go       |   2 +-
 traffic_ops/testing/api/v4/cdnfederations_test.go  |   4 +-
 traffic_ops/testing/api/v4/cdns_test.go            |   2 +-
 traffic_ops/testing/api/v4/crconfig_test.go        |   2 +-
 .../deliveryservices_required_capabilities_test.go |   4 +-
 .../testing/api/v4/deliveryservices_test.go        | 237 ++++++++++++++++++++-
 .../testing/api/v4/deliveryserviceservers_test.go  |   4 +-
 .../api/v4/deliveryservicesideligible_test.go      |   2 +-
 .../testing/api/v4/deliveryservicesregexes_test.go |   2 +-
 .../testing/api/v4/federation_users_test.go        |   2 +-
 traffic_ops/testing/api/v4/federations_test.go     |   2 +-
 traffic_ops/testing/api/v4/jobs_test.go            |   2 +-
 traffic_ops/testing/api/v4/monitoring_test.go      |   2 +-
 traffic_ops/testing/api/v4/origins_test.go         |   2 +-
 .../testing/api/v4/readonlycannotmodify_test.go    |   2 +-
 traffic_ops/testing/api/v4/servers_test.go         |   2 +-
 .../servers_to_deliveryservice_assignment_test.go  |   2 +-
 .../testing/api/v4/serverservercapability_test.go  |   4 +-
 .../testing/api/v4/staticdnsentries_test.go        |   2 +-
 traffic_ops/testing/api/v4/steering_test.go        |   2 +-
 traffic_ops/testing/api/v4/steeringtargets_test.go |   2 +-
 traffic_ops/testing/api/v4/tc-fixtures.json        | 127 +++++++++++
 traffic_ops/testing/api/v4/tenants_test.go         |   2 +-
 .../testing/api/v4/topologies_queue_update_test.go |   2 +-
 traffic_ops/testing/api/v4/topologies_test.go      |   2 +-
 26 files changed, 381 insertions(+), 39 deletions(-)

diff --git a/traffic_ops/testing/api/v4/cachegroupsdeliveryservices_test.go 
b/traffic_ops/testing/api/v4/cachegroupsdeliveryservices_test.go
index 2546d92..3768aea 100644
--- a/traffic_ops/testing/api/v4/cachegroupsdeliveryservices_test.go
+++ b/traffic_ops/testing/api/v4/cachegroupsdeliveryservices_test.go
@@ -24,7 +24,7 @@ import (
 )
 
 func TestCacheGroupsDeliveryServices(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, CacheGroupsDeliveryServices}, func() {})
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, CacheGroupsDeliveryServices}, func() {})
 }
 
 // TODO this is the name hard-coded in the create servers test; change to be 
dynamic
diff --git a/traffic_ops/testing/api/v4/cdn_locks_test.go 
b/traffic_ops/testing/api/v4/cdn_locks_test.go
index 3c144e9..94daa22 100644
--- a/traffic_ops/testing/api/v4/cdn_locks_test.go
+++ b/traffic_ops/testing/api/v4/cdn_locks_test.go
@@ -29,7 +29,7 @@ import (
 )
 
 func TestCDNLocks(t *testing.T) {
-       WithObjs(t, []TCObj{Types, CacheGroups, CDNs, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, Servers, ServerCapabilities, 
ServerServerCapabilitiesForTopologies, Topologies, Tenants, DeliveryServices, 
TopologyBasedDeliveryServiceRequiredCapabilities, Roles, Users}, func() {
+       WithObjs(t, []TCObj{Types, CacheGroups, CDNs, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, Servers, ServerCapabilities, 
ServerServerCapabilitiesForTopologies, Topologies, Tenants, ServiceCategories, 
DeliveryServices, TopologyBasedDeliveryServiceRequiredCapabilities, Roles, 
Users}, func() {
                CRDCdnLocks(t)
                AdminCdnLocks(t)
                SnapshotWithLock(t)
diff --git a/traffic_ops/testing/api/v4/cdnfederations_test.go 
b/traffic_ops/testing/api/v4/cdnfederations_test.go
index f66efeb..9d90483 100644
--- a/traffic_ops/testing/api/v4/cdnfederations_test.go
+++ b/traffic_ops/testing/api/v4/cdnfederations_test.go
@@ -31,7 +31,7 @@ import (
 var fedIDs []int
 
 func TestCDNFederations(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Parameters, Profiles, Tenants, 
CacheGroups, Statuses, Divisions, Regions, PhysLocations, Servers, Topologies, 
DeliveryServices, CDNFederations}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Parameters, Profiles, Tenants, 
CacheGroups, Statuses, Divisions, Regions, PhysLocations, Servers, Topologies, 
ServiceCategories, DeliveryServices, CDNFederations}, func() {
                SortTestCDNFederations(t)
                UpdateTestCDNFederations(t)
                GetTestCDNFederations(t)
@@ -73,7 +73,7 @@ func UpdateTestCDNFederationsWithHeaders(t *testing.T, h 
http.Header) {
 }
 
 func TestFederationFederationResolvers(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Parameters, Profiles, Tenants, 
CacheGroups, Statuses, Divisions, Regions, PhysLocations, Servers, Topologies, 
DeliveryServices, CDNFederations, FederationResolvers}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Parameters, Profiles, Tenants, 
CacheGroups, Statuses, Divisions, Regions, PhysLocations, Servers, Topologies, 
ServiceCategories, DeliveryServices, CDNFederations, FederationResolvers}, 
func() {
                AssignTestFederationFederationResolvers(t)
                GetTestFederationFederationResolvers(t)
        })
diff --git a/traffic_ops/testing/api/v4/cdns_test.go 
b/traffic_ops/testing/api/v4/cdns_test.go
index 0a5995f..5299d9e 100644
--- a/traffic_ops/testing/api/v4/cdns_test.go
+++ b/traffic_ops/testing/api/v4/cdns_test.go
@@ -148,7 +148,7 @@ func UpdateDeleteCDNWithLocks(t *testing.T) {
 }
 
 func TestCDNsDNSSEC(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServerCapabilities, DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServerCapabilities, ServiceCategories, DeliveryServices}, func() {
                if includeSystemTests {
                        GenerateDNSSECKeys(t)
                        RefreshDNSSECKeys(t) // NOTE: testing refresh last 
(while no keys exist) because it's asynchronous and might affect other tests
diff --git a/traffic_ops/testing/api/v4/crconfig_test.go 
b/traffic_ops/testing/api/v4/crconfig_test.go
index c25a587..d563146 100644
--- a/traffic_ops/testing/api/v4/crconfig_test.go
+++ b/traffic_ops/testing/api/v4/crconfig_test.go
@@ -29,7 +29,7 @@ import (
 )
 
 func TestCRConfig(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                UpdateTestCRConfigSnapshot(t)
                MonitoringConfig(t)
                SnapshotTestCDNbyName(t)
diff --git 
a/traffic_ops/testing/api/v4/deliveryservices_required_capabilities_test.go 
b/traffic_ops/testing/api/v4/deliveryservices_required_capabilities_test.go
index b22a846..3cf51e2 100644
--- a/traffic_ops/testing/api/v4/deliveryservices_required_capabilities_test.go
+++ b/traffic_ops/testing/api/v4/deliveryservices_required_capabilities_test.go
@@ -31,7 +31,7 @@ import (
 )
 
 func TestDeliveryServicesRequiredCapabilities(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, Topologies, DeliveryServices, 
DeliveryServicesRequiredCapabilities}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, Topologies, ServiceCategories, DeliveryServices, 
DeliveryServicesRequiredCapabilities}, func() {
                GetTestDeliveryServicesRequiredCapabilitiesIMS(t)
                InvalidDeliveryServicesRequiredCapabilityAddition(t)
                GetTestDeliveryServicesRequiredCapabilities(t)
@@ -45,7 +45,7 @@ func TestDeliveryServicesRequiredCapabilities(t *testing.T) {
 }
 
 func TestTopologyBasedDeliveryServicesRequiredCapabilities(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, ServerServerCapabilitiesForTopologies, Topologies, 
DeliveryServices, TopologyBasedDeliveryServiceRequiredCapabilities}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, ServerServerCapabilitiesForTopologies, Topologies, 
ServiceCategories, DeliveryServices, 
TopologyBasedDeliveryServiceRequiredCapabilities}, func() {
                GetTestDeliveryServicesRequiredCapabilities(t)
                
OriginAssignTopologyBasedDeliveryServiceWithRequiredCapabilities(t)
        })
diff --git a/traffic_ops/testing/api/v4/deliveryservices_test.go 
b/traffic_ops/testing/api/v4/deliveryservices_test.go
index 86c64d9..d3187c8 100644
--- a/traffic_ops/testing/api/v4/deliveryservices_test.go
+++ b/traffic_ops/testing/api/v4/deliveryservices_test.go
@@ -34,7 +34,7 @@ import (
 )
 
 func TestDeliveryServices(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServerCapabilities, DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServerCapabilities, ServiceCategories, DeliveryServices}, func() {
                currentTime := time.Now().UTC().Add(-5 * time.Second)
                ti := currentTime.Format(time.RFC1123)
                var header http.Header
@@ -89,6 +89,8 @@ func TestDeliveryServices(t *testing.T) {
                t.Run("GET request using the 'tenant' query string parameter", 
GetDeliveryServiceByValidTenant)
                t.Run("GET request using the 'type' query string parameter", 
GetDeliveryServiceByValidType)
                t.Run("GET request using the 'xmlId' query string parameter", 
GetDeliveryServiceByValidXmlId)
+               t.Run("GET request using the 'topology' query string 
parameter", GetDeliveryServiceByTopology)
+               t.Run("GET request using the 'servicecategory' query string 
parameter", GetDeliveryServiceByServiceCategory)
                t.Run("Descending order sorted response to GET request", 
SortTestDeliveryServicesDesc)
                t.Run("Create/ Update/ Delete delivery services with locks", 
CUDDeliveryServiceWithLocks)
                t.Run("TLS Versions property", addTLSVersionsToDeliveryService)
@@ -1035,17 +1037,90 @@ func UpdateTestDeliveryServices(t *testing.T) {
        updatedLongDesc := "something different"
        updatedMaxDNSAnswers := 164598
        updatedMaxOriginConnections := 100
+       updatedActive := false
+       updatedDisplayName := "newds1displayname"
+       updatedDscp := 41
+       updatedGeoLimit := 1
+       updatedInitialDispersion := 2
+       updatedIpv6RoutingEnabled := false
+       updatedLogsEnabled := false
+       updatedMissLat := 42.881944
+       updatedMissLong := -88.627778
+       updateMultisiteOrigin := true
+       updatedOrgServerFqdn := "http://origin.example.net";
+       updateProtocol := 2
+       updateQstringIgnore := 0
+       updateRegionalGeoBlocking := true
+
+       remoteDS.MaxRequestHeaderBytes = &updatedMaxRequestHeaderSize
        remoteDS.LongDesc = &updatedLongDesc
        remoteDS.MaxDNSAnswers = &updatedMaxDNSAnswers
        remoteDS.MaxOriginConnections = &updatedMaxOriginConnections
        remoteDS.MatchList = nil // verify that this field is optional in a PUT 
request, doesn't cause nil dereference panic
-       remoteDS.MaxRequestHeaderBytes = &updatedMaxRequestHeaderSize
+       remoteDS.Active = &updatedActive
+       remoteDS.DisplayName = &updatedDisplayName
+       remoteDS.DSCP = &updatedDscp
+       remoteDS.GeoLimit = &updatedGeoLimit
+       remoteDS.InitialDispersion = &updatedInitialDispersion
+       remoteDS.IPV6RoutingEnabled = &updatedIpv6RoutingEnabled
+       remoteDS.LogsEnabled = &updatedLogsEnabled
+       remoteDS.MissLat = &updatedMissLat
+       remoteDS.MissLong = &updatedMissLong
+       remoteDS.MultiSiteOrigin = &updateMultisiteOrigin
+       remoteDS.OrgServerFQDN = &updatedOrgServerFqdn
+       remoteDS.Protocol = &updateProtocol
+       remoteDS.QStringIgnore = &updateQstringIgnore
+       remoteDS.RegionalGeoBlocking = &updateRegionalGeoBlocking
+
+       //Get TypeId by TypeName
+       typeOpts := client.NewRequestOptions()
+       typeOpts.QueryParameters.Set("name", "HTTP_LIVE")
+       typeResp, _, err := TOSession.GetTypes(typeOpts)
+       if err != nil {
+               t.Errorf("cannot get type id by name: %v - alerts: %v", err, 
typeResp.Alerts)
+       }
+       if len(typeResp.Response) == 0 {
+               t.Fatal("got an empty response for types")
+       }
+       remoteDS.TypeID = &typeResp.Response[0].ID
+
+       //Get CDNId by CDNName
+       cdnOpts := client.NewRequestOptions()
+       if len(testData.CDNs) < 1 {
+               t.Fatal("Need at least one CDN to update Delivery Service CDN")
+       }
+       firstCDN := testData.CDNs[0]
+       cdnOpts.QueryParameters.Set("name", firstCDN.Name)
+       cdnResp, _, err := TOSession.GetCDNs(cdnOpts)
+       if err != nil {
+               t.Fatalf("getting CDNs with name '%s': %v - alerts: %+v", 
"cdn1", err, cdnResp.Alerts)
+       }
+       if len(cdnResp.Response) != 1 {
+               t.Fatalf("expected exactly 1 CDN named '%s' but found %d CDNs", 
"cdn1", len(cdnResp.Response))
+       }
+       remoteDS.CDNID = &cdnResp.Response[0].ID
+
+       //Get ProfileId by ProfileName
+       profileOpts := client.NewRequestOptions()
+       if len(testData.Profiles) < 1 {
+               t.Fatal("Need at least one Profile to update Delivery Service 
Profiles")
+       }
+       firstProfile := testData.Profiles[0]
+       profileOpts.QueryParameters.Set("name", firstProfile.Name)
+       profilesResp, _, err := TOSession.GetProfiles(profileOpts)
+       if err != nil {
+               t.Fatalf("couldn't get profiles: %v", err)
+       }
+       if len(profilesResp.Response) != 1 {
+               t.Fatalf("expected just one profile in the response, but got 
%d", len(profilesResp.Response))
+       }
+       remoteDS.ProfileID = &profilesResp.Response[0].ID
 
        if updateResp, _, err := TOSession.UpdateDeliveryService(*remoteDS.ID, 
remoteDS, client.RequestOptions{}); err != nil {
                t.Errorf("cannot update Delivery Service: %v - %v", err, 
updateResp)
        }
 
-       // Retrieve the server to check rack and interfaceName values were 
updated
+       // Retrieve the delivery service to check whether the values were 
updated
        opts := client.NewRequestOptions()
        opts.QueryParameters.Set("id", strconv.Itoa(*remoteDS.ID))
        apiResp, _, err := TOSession.GetDeliveryServices(opts)
@@ -1079,6 +1154,90 @@ func UpdateTestDeliveryServices(t *testing.T) {
        } else if *resp.MaxRequestHeaderBytes != updatedMaxRequestHeaderSize {
                t.Errorf("max request header sizes do not match actual: %d, 
expected: %d", resp.MaxRequestHeaderBytes, updatedMaxRequestHeaderSize)
        }
+
+       if resp.Active == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined Active")
+       } else if *resp.Active != updatedActive {
+               t.Errorf("Active do not match actual: %t, expected: %t", 
*resp.Active, updatedActive)
+       }
+
+       if resp.DisplayName == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined DisplayName")
+       } else if *resp.DisplayName != updatedDisplayName {
+               t.Errorf("DisplayName do not match actual: %s, expected: %s", 
*resp.DisplayName, updatedDisplayName)
+       }
+
+       if resp.DSCP == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined DSCP")
+       } else if *resp.DSCP != updatedDscp {
+               t.Errorf("DSCP do not match actual: %d, expected: %d", 
resp.DSCP, updatedDscp)
+       }
+
+       if resp.GeoLimit == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined GeoLimit")
+       } else if *resp.GeoLimit != updatedGeoLimit {
+               t.Errorf("GeoLimit do not match actual: %d, expected: %d", 
resp.GeoLimit, updatedGeoLimit)
+       }
+
+       if resp.InitialDispersion == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined InitialDispersion")
+       } else if *resp.InitialDispersion != updatedInitialDispersion {
+               t.Errorf("InitialDispersion do not match actual: %d, expected: 
%d", resp.InitialDispersion, updatedInitialDispersion)
+       }
+
+       if resp.IPV6RoutingEnabled == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined IPV6RoutingEnabled")
+       } else if *resp.IPV6RoutingEnabled != updatedIpv6RoutingEnabled {
+               t.Errorf("IPV6RoutingEnabled do not match actual: %t, expected: 
%t", *resp.IPV6RoutingEnabled, updatedIpv6RoutingEnabled)
+       }
+
+       if resp.LogsEnabled == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined LogsEnabled")
+       } else if *resp.LogsEnabled != updatedLogsEnabled {
+               t.Errorf("LogsEnabled do not match actual: %t, expected: %t", 
*resp.LogsEnabled, updatedLogsEnabled)
+       }
+
+       if resp.MissLat == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined MissLat")
+       } else if *resp.MissLat != updatedMissLat {
+               t.Errorf("MissLat do not match actual: %b, expected: %b", 
resp.MissLat, updatedMissLat)
+       }
+
+       if resp.MissLong == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined MissLong")
+       } else if *resp.MissLong != updatedMissLong {
+               t.Errorf("MissLong do not match actual: %b, expected: %b", 
resp.MissLong, updatedMissLong)
+       }
+
+       if resp.MultiSiteOrigin == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined MultiSiteOrigin")
+       } else if *resp.MultiSiteOrigin != updateMultisiteOrigin {
+               t.Errorf("MultiSiteOrigin do not match actual: %t, expected: 
%t", *resp.MultiSiteOrigin, updateMultisiteOrigin)
+       }
+
+       if resp.OrgServerFQDN == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined OrgServerFQDN")
+       } else if *resp.OrgServerFQDN != updatedOrgServerFqdn {
+               t.Errorf("OrgServerFQDN do not match actual: %s, expected: %s", 
*resp.OrgServerFQDN, updatedOrgServerFqdn)
+       }
+
+       if resp.Protocol == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined Protocol")
+       } else if *resp.Protocol != updateProtocol {
+               t.Errorf("Protocol do not match actual: %d, expected: %d", 
resp.Protocol, updateProtocol)
+       }
+
+       if resp.QStringIgnore == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined QStringIgnore")
+       } else if *resp.QStringIgnore != updateQstringIgnore {
+               t.Errorf("QStringIgnore do not match actual: %d, expected: %d", 
resp.QStringIgnore, updateQstringIgnore)
+       }
+
+       if resp.RegionalGeoBlocking == nil {
+               t.Error("Traffic Ops returned a representation for a Delivery 
Service with null or undefined RegionalGeoBlocking")
+       } else if *resp.RegionalGeoBlocking != updateRegionalGeoBlocking {
+               t.Errorf("RegionalGeoBlocking do not match actual: %t, 
expected: %t", *resp.RegionalGeoBlocking, updateRegionalGeoBlocking)
+       }
 }
 
 func UpdateNullableTestDeliveryServices(t *testing.T) {
@@ -1877,28 +2036,30 @@ func VerifyPaginationSupportDS(t *testing.T) {
                t.Fatalf("Need at least three Delivery Services to test 
pagination, found: %d", len(deliveryservice.Response))
        }
 
-       opts.QueryParameters = url.Values{}
-       opts.QueryParameters.Set("orderby", "id")
        opts.QueryParameters.Set("limit", "1")
        deliveryserviceWithLimit, _, err := TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("cannot Get Delivery Service with Limit: %v - alerts: 
%+v", err, deliveryserviceWithLimit.Alerts)
+       }
        if !reflect.DeepEqual(deliveryservice.Response[:1], 
deliveryserviceWithLimit.Response) {
                t.Error("expected GET deliveryservice with limit = 1 to return 
first result")
        }
 
-       opts.QueryParameters = url.Values{}
-       opts.QueryParameters.Set("orderby", "id")
-       opts.QueryParameters.Set("limit", "1")
        opts.QueryParameters.Set("offset", "1")
        deliveryserviceWithOffset, _, err := TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("cannot Get Delivery service with Limit and Offset: %v 
- alerts: %+v", err, deliveryserviceWithOffset.Alerts)
+       }
        if !reflect.DeepEqual(deliveryservice.Response[1:2], 
deliveryserviceWithOffset.Response) {
                t.Error("expected GET deliveryservice with limit = 1, offset = 
1 to return second result")
        }
 
-       opts.QueryParameters = url.Values{}
-       opts.QueryParameters.Set("orderby", "id")
-       opts.QueryParameters.Set("limit", "1")
+       opts.QueryParameters.Del("offset")
        opts.QueryParameters.Set("page", "2")
        deliveryserviceWithPage, _, err := TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("cannot Get Delivery Service with Limit and Page: %v - 
alerts: %+v", err, deliveryserviceWithPage.Alerts)
+       }
        if !reflect.DeepEqual(deliveryservice.Response[1:2], 
deliveryserviceWithPage.Response) {
                t.Error("expected GET deliveryservice with limit = 1, page = 2 
to return second result")
        }
@@ -2589,3 +2750,57 @@ func addTLSVersionsToDeliveryService(t *testing.T) {
                }
        }
 }
+
+func GetDeliveryServiceByTopology(t *testing.T) {
+       opts := client.NewRequestOptions()
+       opts.QueryParameters.Set("xmlId", "ds-top")
+       resp, _, err := TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("couldn't get ds %v - alerts: %+v", err, resp.Alerts)
+       }
+       if len(resp.Response) != 1 {
+               t.Fatalf("Expected only one Delivery Service for this XML 
ds-top")
+       }
+
+       ds := resp.Response[0]
+       opts.QueryParameters.Del("xmlId")
+
+       if ds.Topology == nil {
+               t.Fatalf("No topology found to test GET delivery service by 
Topology")
+       }
+       opts.QueryParameters.Set("topology", *ds.Topology)
+       resp, _, err = TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("couldn't get ds by topology %v - alerts: %+v", err, 
resp.Alerts)
+       }
+       if len(resp.Response) == 0 {
+               t.Fatalf("Expected at least one Delivery Service for this 
topology")
+       }
+}
+
+func GetDeliveryServiceByServiceCategory(t *testing.T) {
+       opts := client.NewRequestOptions()
+       opts.QueryParameters.Set("xmlId", "DS5")
+       resp, _, err := TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("couldn't get ds %v - alerts: %+v", err, resp.Alerts)
+       }
+       if len(resp.Response) != 1 {
+               t.Fatalf("Expected only one Delivery Service for this XML DS5")
+       }
+
+       ds := resp.Response[0]
+       opts.QueryParameters.Del("xmlId")
+
+       if ds.ServiceCategory == nil {
+               t.Fatalf("No Service Category found to test GET delivery 
service by Service Category")
+       }
+       opts.QueryParameters.Set("serviceCategory", *ds.ServiceCategory)
+       resp, _, err = TOSession.GetDeliveryServices(opts)
+       if err != nil {
+               t.Fatalf("couldn't get ds by service category %v - alerts: 
%+v", err, resp.Alerts)
+       }
+       if len(resp.Response) == 0 {
+               t.Fatalf("Expected at least one Delivery Service for this 
service category")
+       }
+}
diff --git a/traffic_ops/testing/api/v4/deliveryserviceservers_test.go 
b/traffic_ops/testing/api/v4/deliveryserviceservers_test.go
index 6522737..477668b 100644
--- a/traffic_ops/testing/api/v4/deliveryserviceservers_test.go
+++ b/traffic_ops/testing/api/v4/deliveryserviceservers_test.go
@@ -31,7 +31,7 @@ import (
 )
 
 func TestDeliveryServiceServers(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                DeleteTestDeliveryServiceServers(t)
                AssignServersToTopologyBasedDeliveryService(t)
                AssignOriginsToTopologyBasedDeliveryServices(t)
@@ -43,7 +43,7 @@ func TestDeliveryServiceServers(t *testing.T) {
 }
 
 func TestDeliveryServiceServersWithRequiredCapabilities(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, Topologies, DeliveryServices, 
DeliveryServicesRequiredCapabilities, ServerServerCapabilities}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, 
ServerCapabilities, Topologies, ServiceCategories, DeliveryServices, 
DeliveryServicesRequiredCapabilities, ServerServerCapabilities}, func() {
                CreateTestDeliveryServiceServersWithRequiredCapabilities(t)
                CreateTestMSODSServerWithReqCap(t)
        })
diff --git a/traffic_ops/testing/api/v4/deliveryservicesideligible_test.go 
b/traffic_ops/testing/api/v4/deliveryservicesideligible_test.go
index 28e3a89..2ce8294 100644
--- a/traffic_ops/testing/api/v4/deliveryservicesideligible_test.go
+++ b/traffic_ops/testing/api/v4/deliveryservicesideligible_test.go
@@ -25,7 +25,7 @@ import (
 )
 
 func TestDeliveryServicesEligible(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                GetTestDeliveryServicesEligibleIMS(t)
                GetTestDeliveryServicesEligible(t)
        })
diff --git a/traffic_ops/testing/api/v4/deliveryservicesregexes_test.go 
b/traffic_ops/testing/api/v4/deliveryservicesregexes_test.go
index 9428582..333fb90 100644
--- a/traffic_ops/testing/api/v4/deliveryservicesregexes_test.go
+++ b/traffic_ops/testing/api/v4/deliveryservicesregexes_test.go
@@ -28,7 +28,7 @@ import (
 )
 
 func TestDeliveryServicesRegexes(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, DeliveryServicesRegexes}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, DeliveryServicesRegexes}, func() {
                QueryDSRegexTest(t)
                QueryDSRegexTestIMS(t)
                CreateTestDSRegexWithMissingPattern(t)
diff --git a/traffic_ops/testing/api/v4/federation_users_test.go 
b/traffic_ops/testing/api/v4/federation_users_test.go
index 3cbb8ca..55e46d0 100644
--- a/traffic_ops/testing/api/v4/federation_users_test.go
+++ b/traffic_ops/testing/api/v4/federation_users_test.go
@@ -25,7 +25,7 @@ import (
 )
 
 func TestFederationUsers(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, CDNFederations, FederationUsers}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, CDNFederations, FederationUsers}, func() {
                currentTime := time.Now().UTC().Add(-5 * time.Second)
                time := currentTime.Format(time.RFC1123)
                var header http.Header
diff --git a/traffic_ops/testing/api/v4/federations_test.go 
b/traffic_ops/testing/api/v4/federations_test.go
index 2e60f7e..ea61016 100644
--- a/traffic_ops/testing/api/v4/federations_test.go
+++ b/traffic_ops/testing/api/v4/federations_test.go
@@ -30,7 +30,7 @@ import (
 )
 
 func TestFederations(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, CDNFederations}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, CDNFederations}, func() {
                PostDeleteTestFederationsDeliveryServices(t)
                GetTestFederations(t)
                GetTestFederationsIMS(t)
diff --git a/traffic_ops/testing/api/v4/jobs_test.go 
b/traffic_ops/testing/api/v4/jobs_test.go
index 45dd0d3..971b6ae 100644
--- a/traffic_ops/testing/api/v4/jobs_test.go
+++ b/traffic_ops/testing/api/v4/jobs_test.go
@@ -28,7 +28,7 @@ import (
 )
 
 func TestJobs(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                CreateTestJobs(t)
                CreateTestInvalidationJobs(t)
                CreateTestInvalidJob(t)
diff --git a/traffic_ops/testing/api/v4/monitoring_test.go 
b/traffic_ops/testing/api/v4/monitoring_test.go
index 3501514..43c6e88 100644
--- a/traffic_ops/testing/api/v4/monitoring_test.go
+++ b/traffic_ops/testing/api/v4/monitoring_test.go
@@ -23,7 +23,7 @@ import (
 )
 
 func TestMonitoring(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                GetTestMonitoringConfigNoSnapshotOnTheFly(t) // MUST run first
                AllCDNsCanSnapshot(t)
        })
diff --git a/traffic_ops/testing/api/v4/origins_test.go 
b/traffic_ops/testing/api/v4/origins_test.go
index b502469..3bbac7d 100644
--- a/traffic_ops/testing/api/v4/origins_test.go
+++ b/traffic_ops/testing/api/v4/origins_test.go
@@ -30,7 +30,7 @@ import (
 )
 
 func TestOrigins(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Users, 
Topologies, DeliveryServices, Coordinates, Origins}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Users, 
Topologies, ServiceCategories, DeliveryServices, Coordinates, Origins}, func() {
                currentTime := time.Now().UTC().Add(-5 * time.Second)
                time := currentTime.Format(time.RFC1123)
                var header http.Header
diff --git a/traffic_ops/testing/api/v4/readonlycannotmodify_test.go 
b/traffic_ops/testing/api/v4/readonlycannotmodify_test.go
index d83c43a..57db7b9 100644
--- a/traffic_ops/testing/api/v4/readonlycannotmodify_test.go
+++ b/traffic_ops/testing/api/v4/readonlycannotmodify_test.go
@@ -26,7 +26,7 @@ import (
 )
 
 func TestReadOnlyCannotModify(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Profiles, Statuses, 
Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, Users}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Profiles, Statuses, 
Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, Users}, func() {
                CreateTestCDNWithReadOnlyUser(t)
        })
 }
diff --git a/traffic_ops/testing/api/v4/servers_test.go 
b/traffic_ops/testing/api/v4/servers_test.go
index 63bd287..064621f 100644
--- a/traffic_ops/testing/api/v4/servers_test.go
+++ b/traffic_ops/testing/api/v4/servers_test.go
@@ -31,7 +31,7 @@ import (
 )
 
 func TestServers(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                GetTestServersIMS(t)
                currentTime := time.Now().UTC().Add(-5 * time.Second)
                time := currentTime.Format(time.RFC1123)
diff --git 
a/traffic_ops/testing/api/v4/servers_to_deliveryservice_assignment_test.go 
b/traffic_ops/testing/api/v4/servers_to_deliveryservice_assignment_test.go
index 66676db..30330b6 100644
--- a/traffic_ops/testing/api/v4/servers_to_deliveryservice_assignment_test.go
+++ b/traffic_ops/testing/api/v4/servers_to_deliveryservice_assignment_test.go
@@ -25,7 +25,7 @@ import (
 )
 
 func TestAssignments(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Parameters, Profiles, Statuses, 
Divisions, Regions, PhysLocations, CacheGroups, Servers, Tenants, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Parameters, Profiles, Statuses, 
Divisions, Regions, PhysLocations, CacheGroups, Servers, Tenants, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                AssignTestDeliveryService(t)
                AssignIncorrectTestDeliveryService(t)
                AssignTopologyBasedDeliveryService(t)
diff --git a/traffic_ops/testing/api/v4/serverservercapability_test.go 
b/traffic_ops/testing/api/v4/serverservercapability_test.go
index fb6a2d7..aa92bb1 100644
--- a/traffic_ops/testing/api/v4/serverservercapability_test.go
+++ b/traffic_ops/testing/api/v4/serverservercapability_test.go
@@ -31,7 +31,7 @@ import (
 )
 
 func TestServerServerCapabilities(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, ServerCapabilities, DeliveryServicesRequiredCapabilities, 
ServerServerCapabilities}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, ServerCapabilities, 
DeliveryServicesRequiredCapabilities, ServerServerCapabilities}, func() {
                SortTestServerServerCapabilities(t)
                GetTestServerServerCapabilitiesIMS(t)
                GetTestServerServerCapabilities(t)
@@ -43,7 +43,7 @@ func TestServerServerCapabilities(t *testing.T) {
 }
 
 func TestServerServerCapabilitiesForTopologies(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, ServerCapabilities, ServerServerCapabilitiesForTopologies, 
TopologyBasedDeliveryServiceRequiredCapabilities}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, ServerCapabilities, 
ServerServerCapabilitiesForTopologies, 
TopologyBasedDeliveryServiceRequiredCapabilities}, func() {
                DeleteTestServerServerCapabilitiesForTopologiesValidation(t)
        })
 }
diff --git a/traffic_ops/testing/api/v4/staticdnsentries_test.go 
b/traffic_ops/testing/api/v4/staticdnsentries_test.go
index 4722681..f7190e490 100644
--- a/traffic_ops/testing/api/v4/staticdnsentries_test.go
+++ b/traffic_ops/testing/api/v4/staticdnsentries_test.go
@@ -30,7 +30,7 @@ import (
 )
 
 func TestStaticDNSEntries(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, StaticDNSEntries}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, StaticDNSEntries}, func() {
                GetTestStaticDNSEntriesIMS(t)
                GetTestStaticDNSEntries(t)
                currentTime := time.Now().UTC().Add(-5 * time.Second)
diff --git a/traffic_ops/testing/api/v4/steering_test.go 
b/traffic_ops/testing/api/v4/steering_test.go
index b6f9138..e8063c3 100644
--- a/traffic_ops/testing/api/v4/steering_test.go
+++ b/traffic_ops/testing/api/v4/steering_test.go
@@ -22,7 +22,7 @@ import (
 )
 
 func TestSteering(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, Users, SteeringTargets}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, Users, SteeringTargets}, func() {
                GetTestSteering(t)
        })
 }
diff --git a/traffic_ops/testing/api/v4/steeringtargets_test.go 
b/traffic_ops/testing/api/v4/steeringtargets_test.go
index 000c8db..e011a97 100644
--- a/traffic_ops/testing/api/v4/steeringtargets_test.go
+++ b/traffic_ops/testing/api/v4/steeringtargets_test.go
@@ -29,7 +29,7 @@ var SteeringUserSession *client.Session
 
 func TestSteeringTargets(t *testing.T) {
 
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices, Users, SteeringTargets}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices, Users, SteeringTargets}, func() {
                GetTestSteeringTargetsIMS(t)
                GetTestSteeringTargets(t)
                currentTime := time.Now().UTC().Add(-5 * time.Second)
diff --git a/traffic_ops/testing/api/v4/tc-fixtures.json 
b/traffic_ops/testing/api/v4/tc-fixtures.json
index 8bca765..a4f83f6 100644
--- a/traffic_ops/testing/api/v4/tc-fixtures.json
+++ b/traffic_ops/testing/api/v4/tc-fixtures.json
@@ -1586,6 +1586,133 @@
             "xmlId": "ds4",
             "anonymousBlockingEnabled": true,
             "maxRequestHeaderBytes": 131072
+        },
+        {
+            "active": false,
+            "cdnName": "cdn1",
+            "cacheurl": "cacheUrl3",
+            "ccrDnsTtl": 3600,
+            "checkPath": "",
+            "consistentHashQueryParams": null,
+            "deepCachingType": "NEVER",
+            "displayName": "d s 5",
+            "dnsBypassCname": null,
+            "dnsBypassIp": "",
+            "dnsBypassIp6": "",
+            "dnsBypassTtl": 30,
+            "dscp": 40,
+            "edgeHeaderRewrite": "edgeRewrite1\nedgeHeader2",
+            "exampleURLs": [
+                "http://ccr.ds4.example.net";,
+                "https://ccr.ds4x.example.net";
+            ],
+            "fqPacingRate": 0,
+            "geoLimit": 0,
+            "geoLimitCountries": "",
+            "geoLimitRedirectURL": null,
+            "geoProvider": 0,
+            "globalMaxMbps": 0,
+            "globalMaxTps": 0,
+            "httpBypassFqdn": "",
+            "infoUrl": "TBD",
+            "initialDispersion": 1,
+            "ipv6RoutingEnabled": true,
+            "logsEnabled": false,
+            "longDesc": "d s 5",
+            "longDesc1": "ds5",
+            "longDesc2": "ds5",
+            "matchList": [
+                {
+                    "pattern": ".*\\.ds5\\..*",
+                    "setNumber": 0,
+                    "type": "HOST_REGEXP"
+                }
+            ],
+            "maxDnsAnswers": 0,
+            "maxOriginConnections": 0,
+            "midHeaderRewrite": "midHeader1\nmidHeader2",
+            "missLat": 41.881944,
+            "missLong": -87.627778,
+            "multiSiteOrigin": false,
+            "orgServerFqdn": "http://origin.ds4.example.net";,
+            "originShield": null,
+            "profileDescription": null,
+            "profileName": null,
+            "protocol": 2,
+            "qstringIgnore": 1,
+            "rangeRequestHandling": 3,
+            "rangeSliceBlockSize":  1000000,
+            "regexRemap": "rr1\nrr2",
+            "regionalGeoBlocking": false,
+            "remapText": "@plugin=tslua.so 
@pparam=/opt/trafficserver/etc/trafficserver/ds4plugin.lua",
+            "routingName": "ccr-ds5",
+            "serviceCategory": "serviceCategory1",
+            "signed": false,
+            "signingAlgorithm": "url_sig",
+            "sslKeyVersion": 2,
+            "tenant": "tenant3",
+            "tenantName": "tenant3",
+            "type": "HTTP_LIVE",
+            "xmlId": "DS5",
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
+        },
+        {
+            "active": true,
+            "cdnName": "cdn1",
+            "ccrDnsTtl": 3600,
+            "checkPath": "",
+            "deepCachingType": "NEVER",
+            "displayName": "steering-ds",
+            "dnsBypassCname": null,
+            "dnsBypassIp": "",
+            "dnsBypassIp6": "",
+            "dnsBypassTtl": 30,
+            "dscp": 40,
+            "edgeHeaderRewrite": "",
+            "exampleURLs": [],
+            "fqPacingRate": 0,
+            "geoLimit": 0,
+            "geoLimitCountries": "",
+            "geoLimitRedirectURL": null,
+            "geoProvider": 0,
+            "globalMaxMbps": 0,
+            "globalMaxTps": 0,
+            "httpBypassFqdn": "",
+            "infoUrl": "",
+            "initialDispersion": 1,
+            "ipv6RoutingEnabled": true,
+            "logsEnabled": false,
+            "longDesc": "",
+            "longDesc1": "",
+            "longDesc2": "",
+            "matchList": [],
+            "maxDnsAnswers": 0,
+            "maxOriginConnections": 1,
+            "midHeaderRewrite": "",
+            "missLat": 41.881944,
+            "missLong": -87.627778,
+            "multiSiteOrigin": false,
+            "orgServerFqdn": "http://example.com";,
+            "originShield": null,
+            "profileDescription": null,
+            "profileName": null,
+            "protocol": 2,
+            "qstringIgnore": 1,
+            "rangeRequestHandling": 0,
+            "regexRemap": "",
+            "regionalGeoBlocking": false,
+            "remapText": "map some raw remap text",
+            "routingName": "",
+            "signed": false,
+            "signingAlgorithm": "url_sig",
+            "sslKeyVersion": 2,
+            "tenant": "tenant3",
+            "tenantName": "tenant3",
+            "type": "STEERING",
+            "xmlId": "steering-ds",
+            "anonymousBlockingEnabled": true,
+            "maxRequestHeaderBytes": 131072
         }
     ],
     "deliveryServicesRegexes": [
diff --git a/traffic_ops/testing/api/v4/tenants_test.go 
b/traffic_ops/testing/api/v4/tenants_test.go
index 320fa89..66230c7 100644
--- a/traffic_ops/testing/api/v4/tenants_test.go
+++ b/traffic_ops/testing/api/v4/tenants_test.go
@@ -92,7 +92,7 @@ func UpdateTestTenantsWithHeaders(t *testing.T, header 
http.Header) {
 }
 
 func TestTenantsActive(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, CacheGroups, Parameters, 
Profiles, Statuses, Divisions, Regions, PhysLocations, Servers, Topologies, 
DeliveryServices, Users}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, CacheGroups, Parameters, 
Profiles, Statuses, Divisions, Regions, PhysLocations, Servers, Topologies, 
ServiceCategories, DeliveryServices, Users}, func() {
                UpdateTestTenantsActive(t)
        })
 }
diff --git a/traffic_ops/testing/api/v4/topologies_queue_update_test.go 
b/traffic_ops/testing/api/v4/topologies_queue_update_test.go
index 577bb04..e6cdcef 100644
--- a/traffic_ops/testing/api/v4/topologies_queue_update_test.go
+++ b/traffic_ops/testing/api/v4/topologies_queue_update_test.go
@@ -34,7 +34,7 @@ type topologiesQueueUpdateTestCase struct {
 }
 
 func TestTopologiesQueueUpdate(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
DeliveryServices}, func() {
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServiceCategories, DeliveryServices}, func() {
                const topologyName = "mso-topology"
                cdnID, dsID := getCDNIDAndDSID(t)
                InvalidCDNIDIsRejected(t, topologyName)
diff --git a/traffic_ops/testing/api/v4/topologies_test.go 
b/traffic_ops/testing/api/v4/topologies_test.go
index a280ecf..c7e9b31 100644
--- a/traffic_ops/testing/api/v4/topologies_test.go
+++ b/traffic_ops/testing/api/v4/topologies_test.go
@@ -42,7 +42,7 @@ type topologyTestCase struct {
 }
 
 func TestTopologies(t *testing.T) {
-       WithObjs(t, []TCObj{Types, CacheGroups, CDNs, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, Servers, ServerCapabilities, 
ServerServerCapabilitiesForTopologies, Topologies, Tenants, DeliveryServices, 
TopologyBasedDeliveryServiceRequiredCapabilities}, func() {
+       WithObjs(t, []TCObj{Types, CacheGroups, CDNs, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, Servers, ServerCapabilities, 
ServerServerCapabilitiesForTopologies, Topologies, Tenants, ServiceCategories, 
DeliveryServices, TopologyBasedDeliveryServiceRequiredCapabilities}, func() {
                GetTestTopologies(t)
                currentTime := time.Now().UTC().Add(-5 * time.Second)
                rfcTime := currentTime.Format(time.RFC1123)

Reply via email to