-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic smoke test to make sure an APIGateway runs (#16217)
- Loading branch information
1 parent
c2df63d
commit 2703522
Showing
10 changed files
with
1,308 additions
and
1,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/integration/connect/envoy/case-api-gateway-smoke/capture.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
snapshot_envoy_admin localhost:20000 api-gateway primary || true |
4 changes: 4 additions & 0 deletions
4
test/integration/connect/envoy/case-api-gateway-smoke/service_gateway.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
services { | ||
name = "api-gateway" | ||
kind = "api-gateway" | ||
} |
35 changes: 35 additions & 0 deletions
35
test/integration/connect/envoy/case-api-gateway-smoke/setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/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" | ||
services = [ | ||
{ | ||
name = "s1" | ||
} | ||
] | ||
parents = [ | ||
{ | ||
name = "api-gateway" | ||
} | ||
] | ||
' | ||
|
||
register_services primary | ||
|
||
gen_envoy_bootstrap api-gateway 20000 primary true | ||
gen_envoy_bootstrap s1 19000 | ||
gen_envoy_bootstrap s2 19001 |
3 changes: 3 additions & 0 deletions
3
test/integration/connect/envoy/case-api-gateway-smoke/vars.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES api-gateway-primary" |
7 changes: 7 additions & 0 deletions
7
test/integration/connect/envoy/case-api-gateway-smoke/verify.bats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helpers | ||
|
||
@test "api gateway proxy admin is up on :20000" { | ||
retry_default curl -f -s localhost:20000/stats -o /dev/null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters