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.
This commit is contained in:
John Cowen 2021-04-15 19:18:37 +01:00 committed by GitHub
parent 3d0632cf10
commit 9cf0860b10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ ${ fake.random.number({min: 1, max: 10}) > 2 ? `
"GatewayConfig": { "GatewayConfig": {
"Addresses": [ "Addresses": [
${ ${
range(fake.random.number(6)).map( range(fake.random.number({min: 1, max: 7)).map(
function(item, i) function(item, i)
{ {
return `"${fake.random.number({min: 1, max: 10}) > 8 ? `*.`: ``}${fake.internet.domainName()}:${fake.random.number({min: 0, max: 65535})}"`; return `"${fake.random.number({min: 1, max: 10}) > 8 ? `*.`: ``}${fake.internet.domainName()}:${fake.random.number({min: 0, max: 65535})}"`;