Add note in cleanup action stating how many build actions have been deleted
This commit is contained in:
parent
5af8de2468
commit
86581ec002
|
@ -520,6 +520,7 @@ void BuildServiceCleanup::run()
|
|||
return --count <= stopAt;
|
||||
},
|
||||
&count);
|
||||
m_messages.notes.emplace_back(argsToString("deleted ", count, " build actions"));
|
||||
auto lock = lockToWrite();
|
||||
m_dbCleanupConcluded = true;
|
||||
conclude(std::move(lock));
|
||||
|
|
|
@ -950,7 +950,8 @@ void BuildActionsTests::testBuildServiceCleanup()
|
|||
CPPUNIT_ASSERT_EQUAL_MESSAGE("failure", BuildActionResult::Failure, m_buildAction->result);
|
||||
const auto &messages = std::get<BuildActionMessages>(m_buildAction->resultData);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("one error", 1_st, messages.errors.size());
|
||||
TESTUTILS_ASSERT_LIKE("expected error", "unable to locate package cache directories:.*No such file or directory.*", messages.errors.front());
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("one note", 1_st, messages.notes.size());
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("no warnings", std::vector<std::string>(), messages.warnings);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("no notes", std::vector<std::string>(), messages.notes);
|
||||
TESTUTILS_ASSERT_LIKE("expected error", "unable to locate package cache directories:.*No such file or directory.*", messages.errors.front());
|
||||
TESTUTILS_ASSERT_LIKE("expected note", "deleted 1 build actions", messages.notes.front());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue