From 0da889f6414816cf715ad040cdb099e5b94ddcb3 Mon Sep 17 00:00:00 2001 From: Tuukka Ikkala <10980802+ikkala@users.noreply.github.com> Date: Fri, 28 Jan 2022 01:26:48 +0200 Subject: [PATCH] Add TEST_SERVER_MODE_ENDPOINT env var documentation (#4802) --- docs/docs/server_mode.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/server_mode.rst b/docs/docs/server_mode.rst index 168e1e630..0ea9db98c 100644 --- a/docs/docs/server_mode.rst +++ b/docs/docs/server_mode.rst @@ -114,6 +114,15 @@ Whenever a mock-decorator starts, Moto will: #. Send a reset-request to :bash:`http://localhost:5000`, removing all state that was kept #. Add the :bash:`endpoint_url` parameter to boto3, so that all requests will be made to :bash:`http://localhost:5000`. +Optionally, the `http://localhost:5000` endpoint can be overridden by: + +.. code-block:: bash + + TEST_SERVER_MODE_ENDPOINT=http://moto-server:5000 + +This can be used for example in case of docker-compose configuration that runs Moto server +in a separate service container. + Calling the reset-API ensures the same behaviour as normal decorators, where the complete state is removed. It is possible to keep the state in between tests, using this environment variable: