Thomas Eckert 2460ac99c9
API Gateway Envoy Golden Listener Tests (#16221)
* Simple API Gateway e2e test for tcp routes

* Drop DNSSans since we don't front the Gateway with a leaf cert

* WIP listener tests for api-gateway

* Return early if no routes

* Add back in leaf cert to testing

* Fix merge conflicts

* Re-add kind to setup

* Fix iteration over listener upstreams

* New tcp listener test

* Add tests for API Gateway with TCP and HTTP routes

* Move zero-route check back

* Drop generateIngressDNSSANs

* Check for chains not routes

---------

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-02-16 14:42:36 -05:00

52 lines
663 B
Bash

#!/bin/bash
set -euo pipefail
upsert_config_entry primary '
kind = "api-gateway"
name = "api-gateway"
listeners = [
{
port = 9999
protocol = "tcp"
}
]
'
upsert_config_entry primary '
kind = "tcp-route"
name = "api-gateway-route-1"
services = [
{
name = "s1"
}
]
parents = [
{
name = "api-gateway"
}
]
'
upsert_config_entry primary '
kind = "tcp-route"
name = "api-gateway-route-2"
services = [
{
name = "s2"
}
]
parents = [
{
kind = "api-gateway"
name = "api-gateway"
}
]
'
register_services primary
gen_envoy_bootstrap api-gateway 20000 primary true
gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001