From 7f6fd5dafab5f8eaa5edb68710bc94b068e84a7c Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Sat, 13 Jul 2024 00:42:55 -0400 Subject: [PATCH] Use local httpbin service in examples. Signed-off-by: Piotr Sikora --- examples/http_auth_random/docker-compose.yaml | 9 +++++++++ examples/http_auth_random/envoy.yaml | 5 ++--- examples/http_auth_random/src/lib.rs | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/http_auth_random/docker-compose.yaml b/examples/http_auth_random/docker-compose.yaml index 149451cc..079fc6cc 100644 --- a/examples/http_auth_random/docker-compose.yaml +++ b/examples/http_auth_random/docker-compose.yaml @@ -23,5 +23,14 @@ services: - ./target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins networks: - envoymesh + depends_on: + - httpbin + httpbin: + image: mccutchen/go-httpbin + hostname: httpbin + ports: + - "8080:8080" + networks: + - envoymesh networks: envoymesh: {} diff --git a/examples/http_auth_random/envoy.yaml b/examples/http_auth_random/envoy.yaml index 29d78db5..34b947cd 100644 --- a/examples/http_auth_random/envoy.yaml +++ b/examples/http_auth_random/envoy.yaml @@ -64,6 +64,5 @@ static_resources: - endpoint: address: socket_address: - address: httpbin.org - port_value: 80 - hostname: "httpbin.org" + address: httpbin + port_value: 8080 diff --git a/examples/http_auth_random/src/lib.rs b/examples/http_auth_random/src/lib.rs index bd0c6b8b..b666ecef 100644 --- a/examples/http_auth_random/src/lib.rs +++ b/examples/http_auth_random/src/lib.rs @@ -35,7 +35,7 @@ impl HttpContext for HttpAuthRandom { ], None, vec![], - Duration::from_secs(5), + Duration::from_secs(1), ) .unwrap(); Action::Pause