MCPcopy Create free account
hub / github.com/3rdparty/libprocess / SetUp

Method SetUp

src/tests/http_tests.cpp:188–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

reinitializeFunction · 0.50

Tested by

no test coverage detected