TaylorCFrey commented on a change in pull request #6690:
URL: https://github.com/apache/trafficcontrol/pull/6690#discussion_r839840940
##########
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:
This is only a suggestion. Perhaps if you find yourself using these
value consistently through other tests it could be done at that time.
--
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]