test: use direct service registration in envoy integration tests (#9138)

This has the biggest impact on enterprise test cases that use namespaced
registrations, which prior to this change sometimes failed the initial
registration because the namespace was not yet created.
This commit is contained in:
R.B. Boyer 2020-11-09 13:59:46 -06:00 committed by GitHub
parent 361fe3ad20
commit 5afd04897c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
132 changed files with 119 additions and 17 deletions

View File

@ -5,5 +5,7 @@ set -eEuo pipefail
# Setup deny intention # Setup deny intention
setup_upsert_l4_intention s1 s2 deny setup_upsert_l4_intention s1 s2 deny
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -7,5 +7,7 @@ wait_for_config_entry proxy-defaults global
wait_for_config_entry service-defaults s1 wait_for_config_entry service-defaults s1
wait_for_config_entry service-defaults s2 wait_for_config_entry service-defaults s2
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -10,5 +10,7 @@ wait_for_config_entry service-resolver s2
wait_for_config_entry service-defaults s2 secondary wait_for_config_entry service-defaults s2 secondary
wait_for_config_entry service-resolver s2 secondary wait_for_config_entry service-resolver s2 secondary
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -6,6 +6,8 @@ set -eEuo pipefail
wait_for_config_entry service-defaults s2 secondary wait_for_config_entry service-defaults s2 secondary
wait_for_config_entry service-resolver s2 secondary wait_for_config_entry service-resolver s2 secondary
register_services secondary
gen_envoy_bootstrap s2 19002 secondary gen_envoy_bootstrap s2 19002 secondary
gen_envoy_bootstrap mesh-gateway 19003 secondary true gen_envoy_bootstrap mesh-gateway 19003 secondary true
retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null

View File

@ -10,5 +10,7 @@ wait_for_config_entry service-resolver s2
wait_for_config_entry service-defaults s2 secondary wait_for_config_entry service-defaults s2 secondary
wait_for_config_entry service-resolver s2 secondary wait_for_config_entry service-resolver s2 secondary
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -6,6 +6,8 @@ set -eEuo pipefail
wait_for_config_entry service-defaults s2 secondary wait_for_config_entry service-defaults s2 secondary
wait_for_config_entry service-resolver s2 secondary wait_for_config_entry service-resolver s2 secondary
register_services secondary
gen_envoy_bootstrap s2 19002 secondary gen_envoy_bootstrap s2 19002 secondary
gen_envoy_bootstrap mesh-gateway 19003 secondary true gen_envoy_bootstrap mesh-gateway 19003 secondary true
retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null

View File

@ -6,8 +6,10 @@ set -euo pipefail
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
register_services primary
# s2 is retained just to have a honeypot for bad envoy configs to route into # s2 is retained just to have a honeypot for bad envoy configs to route into
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2-v1 19001 gen_envoy_bootstrap s2-v1 19001
gen_envoy_bootstrap s2-v2 19002 gen_envoy_bootstrap s2-v2 19002
gen_envoy_bootstrap s2 19003 gen_envoy_bootstrap s2 19003

View File

@ -6,6 +6,8 @@ set -euo pipefail
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
register_services primary
# s2 is retained just to have a honeypot for bad envoy configs to route into # s2 is retained just to have a honeypot for bad envoy configs to route into
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2-v1 19001 gen_envoy_bootstrap s2-v1 19001

View File

@ -2,6 +2,8 @@
set -euo pipefail set -euo pipefail
register_services primary
# wait for service registration # wait for service registration
wait_for_agent_service_register s1 wait_for_agent_service_register s1
wait_for_agent_service_register s2 wait_for_agent_service_register s2
@ -16,4 +18,4 @@ wait_for_config_entry service-resolver s2
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001
gen_envoy_bootstrap s2-v1 19002 gen_envoy_bootstrap s2-v1 19002

View File

@ -7,9 +7,11 @@ wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
wait_for_config_entry service-resolver s3 wait_for_config_entry service-resolver s3
register_services primary
# s2, s3, and s3-v1 are retained just to have a honeypot for bad envoy configs to route into # s2, s3, and s3-v1 are retained just to have a honeypot for bad envoy configs to route into
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001
gen_envoy_bootstrap s3-v1 19002 gen_envoy_bootstrap s3-v1 19002
gen_envoy_bootstrap s3-v2 19003 gen_envoy_bootstrap s3-v2 19003
gen_envoy_bootstrap s3 19004 gen_envoy_bootstrap s3 19004

View File

@ -7,9 +7,11 @@ wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
wait_for_config_entry service-resolver s3 wait_for_config_entry service-resolver s3
register_services primary
# s2, s3, and s3-v1 are retained just to have a honeypot for bad envoy configs to route into # s2, s3, and s3-v1 are retained just to have a honeypot for bad envoy configs to route into
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001
gen_envoy_bootstrap s3-v1 19002 gen_envoy_bootstrap s3-v1 19002
gen_envoy_bootstrap s3-v2 19003 gen_envoy_bootstrap s3-v2 19003
gen_envoy_bootstrap s3 19004 gen_envoy_bootstrap s3 19004

View File

@ -6,6 +6,8 @@ set -eEuo pipefail
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary
gen_envoy_bootstrap s3 19002 primary gen_envoy_bootstrap s3 19002 primary

View File

@ -6,6 +6,8 @@ set -eEuo pipefail
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary
gen_envoy_bootstrap s3 19002 primary gen_envoy_bootstrap s3 19002 primary

View File

@ -7,6 +7,8 @@ wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
wait_for_config_entry service-router s2 wait_for_config_entry service-router s2
register_services primary
# s2 is retained just to have a honeypot for bad envoy configs to route into # s2 is retained just to have a honeypot for bad envoy configs to route into
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2-v1 19001 gen_envoy_bootstrap s2-v1 19001

View File

@ -7,6 +7,8 @@ wait_for_config_entry proxy-defaults global
wait_for_config_entry service-resolver s2 wait_for_config_entry service-resolver s2
wait_for_config_entry service-splitter s2 wait_for_config_entry service-splitter s2
register_services primary
# s2 is retained just to have a honeypot for bad envoy configs to route into # s2 is retained just to have a honeypot for bad envoy configs to route into
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2-v1 19001 gen_envoy_bootstrap s2-v1 19001

View File

@ -1,3 +1,5 @@
#!/bin/bash #!/bin/bash
set -eEuo pipefail set -eEuo pipefail
register_services primary

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -2,4 +2,6 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap mesh-gateway 19000 primary true gen_envoy_bootstrap mesh-gateway 19000 primary true

View File

@ -2,6 +2,8 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap mesh-gateway 19002 primary true gen_envoy_bootstrap mesh-gateway 19002 primary true
retry_default docker_consul primary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=secondary" >/dev/null retry_default docker_consul primary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=secondary" >/dev/null

View File

@ -2,6 +2,8 @@
set -eEuo pipefail set -eEuo pipefail
register_services secondary
gen_envoy_bootstrap s2 19001 secondary gen_envoy_bootstrap s2 19001 secondary
gen_envoy_bootstrap mesh-gateway 19003 secondary true gen_envoy_bootstrap mesh-gateway 19003 secondary true
retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null

View File

@ -2,4 +2,6 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary

View File

@ -2,6 +2,8 @@
set -eEuo pipefail set -eEuo pipefail
register_services secondary
gen_envoy_bootstrap s2 19001 secondary gen_envoy_bootstrap s2 19001 secondary
gen_envoy_bootstrap mesh-gateway 19003 secondary true gen_envoy_bootstrap mesh-gateway 19003 secondary true
retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -5,5 +5,7 @@ set -eEuo pipefail
# Setup deny intention # Setup deny intention
setup_upsert_l4_intention s1 s2 deny setup_upsert_l4_intention s1 s2 deny
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -5,6 +5,8 @@ set -euo pipefail
# wait for bootstrap to apply config entries # wait for bootstrap to apply config entries
wait_for_config_entry ingress-gateway ingress-gateway wait_for_config_entry ingress-gateway ingress-gateway
register_services primary
gen_envoy_bootstrap ingress-gateway 20000 primary true gen_envoy_bootstrap ingress-gateway 20000 primary true
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

View File

@ -7,6 +7,8 @@ wait_for_config_entry ingress-gateway ingress-gateway
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
wait_for_config_entry service-router router wait_for_config_entry service-router router
register_services primary
gen_envoy_bootstrap ingress-gateway 20000 primary true gen_envoy_bootstrap ingress-gateway 20000 primary true
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

View File

@ -6,6 +6,8 @@ set -euo pipefail
wait_for_config_entry ingress-gateway ingress-gateway wait_for_config_entry ingress-gateway ingress-gateway
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
register_services primary
gen_envoy_bootstrap ingress-gateway 20000 primary true gen_envoy_bootstrap ingress-gateway 20000 primary true
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

View File

@ -5,6 +5,8 @@ set -euo pipefail
# wait for bootstrap to apply config entries # wait for bootstrap to apply config entries
wait_for_config_entry ingress-gateway ingress-gateway wait_for_config_entry ingress-gateway ingress-gateway
register_services primary
gen_envoy_bootstrap ingress-gateway 20000 primary true gen_envoy_bootstrap ingress-gateway 20000 primary true
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

View File

@ -5,6 +5,8 @@ set -euo pipefail
# wait for bootstrap to apply config entries # wait for bootstrap to apply config entries
wait_for_config_entry ingress-gateway ingress-gateway wait_for_config_entry ingress-gateway ingress-gateway
register_services primary
gen_envoy_bootstrap ingress-gateway 20000 primary true gen_envoy_bootstrap ingress-gateway 20000 primary true
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

View File

@ -6,6 +6,8 @@ set -eEuo pipefail
wait_for_config_entry ingress-gateway ingress-gateway wait_for_config_entry ingress-gateway ingress-gateway
wait_for_config_entry proxy-defaults global wait_for_config_entry proxy-defaults global
register_services primary
gen_envoy_bootstrap mesh-gateway 19002 primary true gen_envoy_bootstrap mesh-gateway 19002 primary true
gen_envoy_bootstrap ingress-gateway 20000 primary true gen_envoy_bootstrap ingress-gateway 20000 primary true
retry_default docker_consul primary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=secondary" >/dev/null retry_default docker_consul primary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=secondary" >/dev/null

View File

@ -2,6 +2,8 @@
set -eEuo pipefail set -eEuo pipefail
register_services secondary
gen_envoy_bootstrap s1 19001 secondary gen_envoy_bootstrap s1 19001 secondary
gen_envoy_bootstrap s2 19002 secondary gen_envoy_bootstrap s2 19002 secondary
gen_envoy_bootstrap mesh-gateway 19003 secondary true gen_envoy_bootstrap mesh-gateway 19003 secondary true

View File

@ -6,5 +6,7 @@ set -euo pipefail
wait_for_config_entry service-defaults s2 wait_for_config_entry service-defaults s2
wait_for_config_entry service-intentions s2 wait_for_config_entry service-intentions s2
register_services primary
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
retry_default docker_consul primary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=secondary" >/dev/null retry_default docker_consul primary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=secondary" >/dev/null

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services secondary
gen_envoy_bootstrap s2 19001 secondary gen_envoy_bootstrap s2 19001 secondary
retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null retry_default docker_consul secondary curl -s "http://localhost:8500/v1/catalog/service/consul?dc=primary" >/dev/null

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 primary gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary gen_envoy_bootstrap s2 19001 primary

View File

@ -2,5 +2,7 @@
set -eEuo pipefail set -eEuo pipefail
register_services primary
gen_envoy_bootstrap s1 19000 gen_envoy_bootstrap s1 19000
gen_envoy_bootstrap s2 19001 gen_envoy_bootstrap s2 19001

Some files were not shown because too many files have changed in this diff Show More