diff options
author | Nicholas Zolnierz <nicholas.zolnierz@mongodb.com> | 2022-11-11 19:41:26 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-11 20:49:10 +0000 |
commit | df38314f471a57fd273a7c0d747dfc1aeb4feaea (patch) | |
tree | 06719c45097fd361a78d8bd21602f60ae54c6df0 /src/mongo | |
parent | f1203e555321e326b0621479bcc6b607c5854391 (diff) | |
download | mongo-df38314f471a57fd273a7c0d747dfc1aeb4feaea.tar.gz |
SERVER-71237 Do not print full expected output when golden test file does not exist
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/unittest/golden_test_base.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/unittest/golden_test_base.cpp b/src/mongo/unittest/golden_test_base.cpp index e8b6a9b298c..18d7dd7197a 100644 --- a/src/mongo/unittest/golden_test_base.cpp +++ b/src/mongo/unittest/golden_test_base.cpp @@ -157,14 +157,13 @@ std::string GoldenTestContextBase::sanitizeName(const std::string& str) { } void GoldenTestContextBase::verifyOutput() { - std::string actualStr = _outStream.str(); - fs::path goldenDataPath = getGoldenDataPath(); if (!fs::exists(goldenDataPath)) { failResultMismatch( - actualStr, boost::none, "Golden data file doesn't exist: {}"_format(goldenDataPath)); + "<omitted>", boost::none, "Golden data file doesn't exist: {}"_format(goldenDataPath)); } + std::string actualStr = _outStream.str(); std::string expectedStr = readFile(goldenDataPath); if (actualStr != expectedStr) { failResultMismatch(actualStr, expectedStr, "Actual result doesn't match golden data."); |