You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/03/18 16:17:33 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #6441: Geo limit countries can now be parsed as an array and a string

zrhoffman commented on a change in pull request #6441:
URL: https://github.com/apache/trafficcontrol/pull/6441#discussion_r830154366



##########
File path: traffic_ops/testing/api/v4/deliveryservices_test.go
##########
@@ -98,6 +99,67 @@ func TestDeliveryServices(t *testing.T) {
 	})
 }
 
+func CreateTestDeliveryServiceWithGeoLimitCountries(t *testing.T) {
+
+	if len(testData.DeliveryServices) == 0 {
+		t.Fatalf("no deliveryservices to run the test on, quitting")
+	}
+
+	cdn := createBlankCDN("geoLimitCDN", t)
+	opts := client.NewRequestOptions()
+	opts.QueryParameters.Set("name", "HTTP")
+	types, _, err := TOSession.GetTypes(opts)
+	if err != nil {
+		t.Fatalf("unable to get Types: %v - alerts: %+v", err, types.Alerts)
+	}
+	if len(types.Response) < 1 {
+		t.Fatal("expected at least one type")
+	}
+	customDS := getCustomDS(cdn.ID, types.Response[0].ID, "geo-limit-countries-test-ds-name", "edge", "https://test-geo-limit.com", "geo-limit-countries-test-ds-xml-id")
+	customDS.Protocol = util.IntPtr(0)
+	customDS.GeoLimit = util.IntPtr(2)
+	//geoLimitCountries := []string{"US   ", "CA"}

Review comment:
       Can this commented line be removed?




-- 
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: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org