From 9cf0860b10d29bf9e19f5661c6597ec5f952a157 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 15 Apr 2021 19:18:37 +0100 Subject: [PATCH] ui: Never respond with empty gateway addresses (mock-api) (#10035) We noticed that our mock API would sometimes respond with an empty array of addresses - which resulted in an empty space in the gateway upstream listing which looked as though it could be broken. I checked with backend, and as this will never happen, I made the change here also so the gateway upstream list is always fully populated with addresses. --- .../consul-ui/mock-api/v1/internal/ui/gateway-services-nodes/_ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/packages/consul-ui/mock-api/v1/internal/ui/gateway-services-nodes/_ b/ui/packages/consul-ui/mock-api/v1/internal/ui/gateway-services-nodes/_ index d15ad8ec8..e4af134b7 100644 --- a/ui/packages/consul-ui/mock-api/v1/internal/ui/gateway-services-nodes/_ +++ b/ui/packages/consul-ui/mock-api/v1/internal/ui/gateway-services-nodes/_ @@ -56,7 +56,7 @@ ${ fake.random.number({min: 1, max: 10}) > 2 ? ` "GatewayConfig": { "Addresses": [ ${ - range(fake.random.number(6)).map( + range(fake.random.number({min: 1, max: 7)).map( function(item, i) { return `"${fake.random.number({min: 1, max: 10}) > 8 ? `*.`: ``}${fake.internet.domainName()}:${fake.random.number({min: 0, max: 65535})}"`;