cmd/swarm: support for smoke tests on the production swarm cluster

This commit is contained in:
Anton Evangelatov 2018-06-25 15:38:21 +02:00
parent c076cb78a3
commit 124f92159c

View file

@ -37,9 +37,15 @@ import (
)
func generateEndpoints(scheme string, cluster string, from int, to int) {
if cluster == "prod" {
for port := from; port <= to; port++ {
endpoints = append(endpoints, fmt.Sprintf("%s://%v.swarm-gateways.net", scheme, port))
}
} else {
for port := from; port <= to; port++ {
endpoints = append(endpoints, fmt.Sprintf("%s://%v.%s.swarm-gateways.net", scheme, port, cluster))
}
}
if includeLocalhost {
endpoints = append(endpoints, "http://localhost:8500")