diff options
-rw-r--r-- | gentoobrowse-api/unittests/testMaintenance.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gentoobrowse-api/unittests/testMaintenance.cpp b/gentoobrowse-api/unittests/testMaintenance.cpp index 19ed59a..c287b1e 100644 --- a/gentoobrowse-api/unittests/testMaintenance.cpp +++ b/gentoobrowse-api/unittests/testMaintenance.cpp @@ -275,7 +275,14 @@ BOOST_AUTO_TEST_CASE(testUpdateGitRepository) BOOST_REQUIRE(std::filesystem::is_regular_file(testRepo / "net-misc" / "gentoobrowse-api" / "Manifest")); } -BOOST_AUTO_TEST_CASE(testRefreshGitRepository) +struct localPortageRepoIsComplete { + boost::test_tools::assertion_result operator()(boost::unit_test::test_unit_id) const + { + return !std::filesystem::exists("/usr/portage/.git/shallow"); + } +}; + +BOOST_AUTO_TEST_CASE(testRefreshGitRepository, *boost::unit_test::precondition(localPortageRepoIsComplete {})) { auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("GentooBrowseAPI")); auto insRepo = db->modify( |