diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-10 16:59:16 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-10 16:59:16 +0200 |
| commit | 9e6999f53c91ec44d04ef6685dd97800e1a66306 (patch) | |
| tree | a40f48e1867c586319350fb2b0982379cd80d604 /src/zenserver-test/logging-tests.cpp | |
| parent | Update CHANGELOG.md (diff) | |
| download | zen-9e6999f53c91ec44d04ef6685dd97800e1a66306.tar.xz zen-9e6999f53c91ec44d04ef6685dd97800e1a66306.zip | |
reduce test runtime (#933)
* reduce zenserver spawns in tests
* fix filesystemutils wrong test suite name
* tweak tests for faster runtime
* reduce more test runtime
* more wall time improvements
* fast http and processmanager tests
Diffstat (limited to 'src/zenserver-test/logging-tests.cpp')
| -rw-r--r-- | src/zenserver-test/logging-tests.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/zenserver-test/logging-tests.cpp b/src/zenserver-test/logging-tests.cpp index 2e530ff92..549d2b322 100644 --- a/src/zenserver-test/logging-tests.cpp +++ b/src/zenserver-test/logging-tests.cpp @@ -146,28 +146,6 @@ TEST_CASE("logging.file.json") CHECK_MESSAGE(LogContains(FileLog, "\"message\""), FileLog); CHECK_MESSAGE(LogContains(FileLog, "\"source\": \"zenserver\""), FileLog); CHECK_MESSAGE(LogContains(FileLog, "server session id"), FileLog); -} - -// --log-id <id> is automatically set to the server instance name in test mode. -// The JSON formatter emits this value as the "id" field, so every entry in a -// .json log file must carry a non-empty "id". -TEST_CASE("logging.log_id") -{ - const std::filesystem::path TestDir = TestEnv.CreateNewTestDir(); - const std::filesystem::path LogFile = TestDir / "test.json"; - - ZenServerInstance Instance(TestEnv); - Instance.SetDataDir(TestDir); - - const std::string LogArg = fmt::format("--abslog {}", LogFile.string()); - const uint16_t Port = Instance.SpawnServerAndWaitUntilReady(LogArg); - CHECK_MESSAGE(Port != 0, Instance.GetLogOutput()); - - Instance.Shutdown(); - - CHECK_MESSAGE(std::filesystem::exists(LogFile), "JSON log file was not created"); - const std::string FileLog = ReadFileToString(LogFile); - // The JSON formatter writes the log-id as: "id": "<value>", CHECK_MESSAGE(LogContains(FileLog, "\"id\": \""), FileLog); } |