Merge http2 integration test case into grpc case (#8164)

http2 is covered by grpc since grpc uses http2
This commit is contained in:
Freddy 2020-06-22 13:09:04 -06:00 committed by GitHub
parent dd19cfe729
commit 146afbe9a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 86 deletions

View File

@ -10,6 +10,14 @@ load helpers
retry_default curl -f -s localhost:19001/stats -o /dev/null
}
@test "s1 proxy listener should be up and have right cert" {
assert_proxy_presents_cert_uri localhost:21000 s1
}
@test "s2 proxy listener should be up and have right cert" {
assert_proxy_presents_cert_uri localhost:21001 s2
}
@test "s2 proxy should be healthy" {
assert_service_has_healthy_instances s2 1
}
@ -20,6 +28,7 @@ load helpers
}
@test "s1 upstream should be able to connect to s2 via grpc" {
# This test also covers http2 since gRPC always uses http2
run fortio grpcping localhost:5000
echo "OUTPUT: $output"

View File

@ -1,4 +0,0 @@
#!/bin/bash
snapshot_envoy_admin localhost:19000 s1 primary || true
snapshot_envoy_admin localhost:19001 s2 primary || true

View File

@ -1,22 +0,0 @@
services {
name = "s1"
port = 8080
connect {
sidecar_service {
proxy {
upstreams = [
{
destination_name = "s2"
local_bind_port = 5000
config {
protocol = "http2"
}
}
]
config {
protocol = "http2"
}
}
}
}
}

View File

@ -1,14 +0,0 @@
services {
name = "s2"
# Advertise gRPC (http2) port
port = 8179
connect {
sidecar_service {
proxy {
config {
protocol = "http2"
}
}
}
}
}

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -eEuo pipefail
gen_envoy_bootstrap s1 19000 primary
gen_envoy_bootstrap s2 19001 primary

View File

@ -1,39 +0,0 @@
#!/usr/bin/env bats
load helpers
@test "s1 proxy admin is up on :19000" {
retry_default curl -f -s localhost:19000/stats -o /dev/null
}
@test "s2 proxy admin is up on :19001" {
retry_default curl -f -s localhost:19001/stats -o /dev/null
}
@test "s1 proxy listener should be up and have right cert" {
assert_proxy_presents_cert_uri localhost:21000 s1
}
@test "s2 proxy listener should be up and have right cert" {
assert_proxy_presents_cert_uri localhost:21001 s2
}
@test "s2 proxy should be healthy" {
assert_service_has_healthy_instances s2 1
}
@test "s1 upstream should have healthy endpoints for s2" {
# protocol is configured in an upstream override so the cluster name is customized here
assert_upstream_has_endpoints_in_status 127.0.0.1:19000 49c19fe6~s2.default.primary HEALTHY 1
}
@test "s1 upstream should be able to connect to s2 via http2" {
# We use grpc here because it's the easiest way to test http2. The server
# needs to support h2c since the proxy doesn't talk TLS to the local app.
# Most http2 servers don't support that but gRPC does. We could use curl
run curl -f -s -X POST localhost:5000/PingServer.Ping/
echo "OUTPUT: $output"
[ "$status" == 0 ]
}

View File

@ -28,7 +28,6 @@ func TestEnvoy(t *testing.T) {
"case-gateway-without-services",
"case-grpc",
"case-http",
"case-http2",
"case-http-badauthz",
"case-ingress-gateway-http",
"case-ingress-gateway-multiple-services",