diff --git a/e2e/basic/docker-compose.yaml b/e2e/basic/docker-compose.yaml new file mode 100644 index 0000000..bcecea7 --- /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 298fde9..3e09ea3 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"),