From 86f7103c407a4019d9506c153e4190edd65dd5e4 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Fri, 29 Nov 2024 15:05:41 +0100 Subject: [PATCH] fix example tests workflow Signed-off-by: Eguzki Astiz Lezaun --- e2e/basic/docker-compose.yaml | 56 +++++++++++++++++++++++++++++++++++ tests/failures.rs | 4 +-- 2 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 e2e/basic/docker-compose.yaml diff --git a/e2e/basic/docker-compose.yaml b/e2e/basic/docker-compose.yaml new file mode 100644 index 00000000..bcecea74 --- /dev/null +++ b/e2e/basic/docker-compose.yaml @@ -0,0 +1,56 @@ +--- +services: + envoy: + image: envoyproxy/envoy:v1.31-latest + depends_on: + - limitador + - upstream + command: + - /usr/local/bin/envoy + - --config-path + - /etc/envoy.yaml + - --log-level + - info + - --component-log-level + - wasm:debug,http:debug,router:debug + - --service-cluster + - proxy + expose: + - "80" + - "8001" + ports: + - "18000:80" + - "18001:8001" + volumes: + - ./envoy.yaml:/etc/envoy.yaml + - ../../target/wasm32-unknown-unknown/debug/wasm_shim.wasm:/opt/kuadrant/wasm/wasm_shim.wasm + limitador: + image: quay.io/kuadrant/limitador:latest + command: ["limitador-server", "-vvv", "/opt/kuadrant/limits/limits.yaml"] + ports: + - "18080:8080" + - "18081:8081" + expose: + - "8080" + - "8081" + volumes: + - ./limits.yaml:/opt/kuadrant/limits/limits.yaml + upstream: + image: quay.io/kuadrant/authorino-examples:talker-api + environment: + PORT: 3000 + expose: + - "3000" + start_services: + image: alpine + depends_on: + - envoy + command: > + /bin/sh -c " + while ! nc -z envoy 80; + do + echo sleeping; + sleep 1; + done; + echo Connected! + " diff --git a/tests/failures.rs b/tests/failures.rs index 298fde95..3e09ea33 100644 --- a/tests/failures.rs +++ b/tests/failures.rs @@ -392,7 +392,7 @@ fn it_fails_on_first_action_grpc_response() { Some("#2 on_grpc_call_response: received gRPC call response: token: 42, status: 14"), ) .expect_get_buffer_bytes(Some(BufferType::GrpcReceiveBuffer)) - .returning(Some(&vec![])) + .returning(Some(&[])) .expect_send_local_response( Some(500), Some("Internal Server Error.\n"), @@ -565,7 +565,7 @@ fn it_fails_on_second_action_grpc_response() { ).as_str()), ) .expect_get_buffer_bytes(Some(BufferType::GrpcReceiveBuffer)) - .returning(Some(&vec![])) + .returning(Some(&[])) .expect_send_local_response( Some(500), Some("Internal Server Error.\n"),