sozu/e2e
Florentin Dubois 17e114806c
Release v1.0.0
Signed-off-by: Florentin Dubois <florentin.dubois@clever-cloud.com>
2024-04-16 09:50:16 +02:00
..
src make Http[s]ListenerConfig::http_answers optional 2024-04-05 10:31:29 +02:00
Cargo.toml Release v1.0.0 2024-04-16 09:50:16 +02:00
README.md remove serial aspect of e2e tests 2023-09-12 15:30:07 +02:00

README.md

End to end tests

We want to check Sōzu's behavior in all corner cases for the CI.

Principles

This crate contains thin wrappers around the Sōzu lib, that create:

  • a Sōzu worker with a very simple config, able to run a detached thread
  • mocked clients that send simple HTTP requests
  • mocked backends, sync and async, that reply dummy 200 OK responses (for instance)

This crate provides the Aggregator trait, that allows to create simple aggregators. The aggregators keep track, for instance, of how many requests were received, and how many were sent, by a backend (just an example).

These elements are instantiated in test functions. They aim at both normal behaviour (traffic passthrough) but also tackle corner cases, such as:

  • smooth soft stop
  • immediate hard stop
  • behaviour of the zombie checker
  • reconnection to a backend

How to run

The tests are flagged with the usual macros, so they will run with all other tests when you do:

cargo test

You can run just one test using

cargo test test_issue_810_timeout

If you want to run all e2e tests at once, do:

cd e2e
cargo test