ericholguin commented on a change in pull request #6690:
URL: https://github.com/apache/trafficcontrol/pull/6690#discussion_r838964428
##########
File path: traffic_ops/testing/api/v4/deliveryservices_test.go
##########
@@ -17,2896 +17,772 @@ package v4
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"
-
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice"
+ "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"
client "github.com/apache/trafficcontrol/traffic_ops/v4-client"
)
func TestDeliveryServices(t *testing.T) {
Review comment:
Yeah with these changes `WithObjs` is still run first. The `WithObjs`
does contain all the prerequisites for the tests and is needed still. However
you can run any of the test defined in the test file by its name. So for
example if you just want to run the POST tests for Delivery Services all you
need to do is:
`go test -v -run "^TestDeliveryServices$/POST" ./v4`
(I add ^ and $ due to other tests having DeliveryServices in their test name
and golang uses regex for finding what test needs to be ran)
You can also get more precise and run a specific test:
`go test -v -run
"^TestDeliveryServices$/GET/BAD_REQUEST_when_TOPOLOGY_DOESNT_EXIST" ./v4`
So if you only want to run a specific test you can.
--
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]