| 188 | #ifdef USE_SSL_SOCKET |
| 189 | protected: |
| 190 | void SetUp() override |
| 191 | { |
| 192 | // We must run the parent's `SetUp` first so that we `chdir` into the test |
| 193 | // directory before SSL helpers like `key_path()` are called. |
| 194 | SSLTemporaryDirectoryTest::SetUp(); |
| 195 | |
| 196 | if (GetParam() == "https") { |
| 197 | generate_keys_and_certs(); |
| 198 | set_environment_variables({ |
| 199 | {"LIBPROCESS_SSL_ENABLED", "true"}, |
| 200 | {"LIBPROCESS_SSL_KEY_FILE", key_path()}, |
| 201 | {"LIBPROCESS_SSL_CERT_FILE", certificate_path()}}); |
| 202 | } else { |
| 203 | set_environment_variables({}); |
| 204 | } |
| 205 | |
| 206 | process::reinitialize( |
| 207 | None(), |
| 208 | READWRITE_HTTP_AUTHENTICATION_REALM, |
| 209 | READONLY_HTTP_AUTHENTICATION_REALM); |
| 210 | } |
| 211 | |
| 212 | public: |
| 213 | static void TearDownTestCase() |
nothing calls this directly
no test coverage detected