ericholguin commented on a change in pull request #6690:
URL: https://github.com/apache/trafficcontrol/pull/6690#discussion_r839728780



##########
File path: traffic_ops/testing/api/v3/deliveryservices_test.go
##########
@@ -17,1180 +17,499 @@ package v3
 
 import (
        "encoding/json"
-       "fmt"
        "net/http"
        "net/url"
-       "reflect"
        "strconv"
-       "strings"
        "testing"
        "time"
 
        "github.com/apache/trafficcontrol/lib/go-rfc"
        "github.com/apache/trafficcontrol/lib/go-tc"
-       "github.com/apache/trafficcontrol/lib/go-util"
-       toclient "github.com/apache/trafficcontrol/traffic_ops/v3-client"
+       "github.com/apache/trafficcontrol/traffic_ops/testing/api/assert"
+       "github.com/apache/trafficcontrol/traffic_ops/testing/api/utils"
+       "github.com/apache/trafficcontrol/traffic_ops/toclientlib"
 )
 
 func TestDeliveryServices(t *testing.T) {
-       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServerCapabilities, DeliveryServices}, func() {
-               currentTime := time.Now().UTC().Add(-5 * time.Second)
-               ti := currentTime.Format(time.RFC1123)
-               var header http.Header
-               header = make(map[string][]string)
-               header.Set(rfc.IfModifiedSince, ti)
-               header.Set(rfc.IfUnmodifiedSince, ti)
-               if includeSystemTests {
-                       SSLDeliveryServiceCDNUpdateTest(t)
-                       GetTestDeliveryServicesURLSigKeys(t)
+       WithObjs(t, []TCObj{CDNs, Types, Tenants, Users, Parameters, Profiles, 
Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, Topologies, 
ServerCapabilities, DeliveryServices, DeliveryServicesRequiredCapabilities, 
DeliveryServiceServerAssignments}, func() {
+
+               tomorrow := time.Now().AddDate(0, 0, 1).Format(time.RFC1123)
+               currentTime := time.Now().UTC().Add(-15 * time.Second)
+               currentTimeRFC := currentTime.Format(time.RFC1123)
+
+               tenant4UserSession := utils.CreateV3Session(t, 
Config.TrafficOps.URL, "tenant4user", "pa$$word", 
Config.Default.Session.TimeoutInSecs)
+
+               methodTests := utils.V3TestCase{
+                       "GET": {

Review comment:
       I think this is a change worth making, however it might need its own PR 
since it'll affect all other refactored tests, they will need to switch to 
using the string constants.




-- 
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]


Reply via email to