You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python `TestServer` is a convenient wrapper around the core Go test-server executable. You can configure it using parameters that directly correspond to the Go server's command-line flags.
72
+
73
+
You have the flexibility to provide these settings by passing them directly to the `TestServer` class, using environment variables, or creating custom `pytest` fixtures.
74
+
75
+
### Configuration Options
76
+
77
+
| Go Flag / ENV | Initialization Parameter | Description | Default Value | Sample Implementation (refer to the `python/sample/conftest.py` file) |
78
+
| :--- | :--- | :--- | :--- | :--- |
79
+
|`record` / `replay`|**`mode`**| Sets the server to either `'record'` or `'replay'`. |`'replay'`| Set via the `--record` pytest flag. |
80
+
|`--config`|**`config_path`**| The file path to the server's configuration file. | -- | Set via environment variable. |
81
+
|`--recording-dir`|**`recording_dir`**| The directory for saving or retrieving recordings. | -- | Set via environment variable. |
82
+
| -- |**`teardown_timeout`**| An optional grace period (in seconds) to wait before forcefully shutting down the server. |`5`| Left out to use default value |
0 commit comments