zrhoffman commented on a change in pull request #6531: URL: https://github.com/apache/trafficcontrol/pull/6531#discussion_r803183751
########## File path: traffic_router/ultimate-test-harness/main_test.go ########## @@ -0,0 +1,160 @@ +package ultimate_test_harness + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import ( + "flag" + "fmt" + "math/rand" + "net/url" + "os" + "testing" + "time" + + "github.com/apache/trafficcontrol/lib/go-log" + "github.com/apache/trafficcontrol/lib/go-tc" + client "github.com/apache/trafficcontrol/traffic_ops/v4-client" +) + +type Benchmark struct { + RequestsPerSecondThreshold int + BenchmarkSeconds int + ThreadCount int + DSType tc.Type + TrafficRouters []TRDetails + CoverageZoneLocation string +} + +var IPv4Only *bool +var IPv6Only *bool +var CDNName *string +var DeliveryServiceName *string +var TrafficRouterName *string +var UseCoverageZone *bool +var CoverageZoneLocation *string +var HTTPRequestsPerSecondThreshold *int +var DNSRequestsPerSecondThreshold *int +var BenchTime *int +var ThreadCount *int + +func init() { + rand.Seed(time.Now().UnixNano()) + IPv4Only = flag.Bool("4", false, "test IPv4 addresses only") Review comment: `-4` and `-6` is a common convention (see [`ssh`](https://linux.die.net/man/1/ssh), [`curl`](https://linux.die.net/man/1/curl), and [`route`](https://linux.die.net/man/8/route)). But since these options should be able to potentially exist in a config file for the test too, having long-form `ipv4only` and `ipv6only` makes sense. Flags renamed in 6bc63f8e4c -- 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]
