change testsuite to expect enum from checkIfToRefresh and correct test it
authorJosef Reidinger <jreidinger@suse.cz>
Thu, 20 Mar 2008 15:31:52 +0000 (15:31 +0000)
committerJosef Reidinger <jreidinger@suse.cz>
Thu, 20 Mar 2008 15:31:52 +0000 (15:31 +0000)
tests/zypp/RepoManager_test.cc

index f5c448f25425ef51144ab45e45f31e30cd9499ff..34664fa73566117a525b66bd0be0d8e215b58257 100644 (file)
@@ -112,9 +112,9 @@ BOOST_AUTO_TEST_CASE(repomanager_test)
   BOOST_CHECK_MESSAGE( manager.isCached(repo), "Repo should be cached now" );
 
   // Metadata are up to date
-  SEC << endl
-      << manager.checkIfToRefreshMetadata(repo, *repo.baseUrlsBegin()) << endl;
-  BOOST_CHECK_MESSAGE( !manager.checkIfToRefreshMetadata(repo, *repo.baseUrlsBegin()), "Metadata should be up to date" );
+  RepoManager::RefreshCheckStatus ref_stat = manager.checkIfToRefreshMetadata(repo, *repo.baseUrlsBegin());
+  SEC << endl << ref_stat << endl;
+  BOOST_CHECK_MESSAGE( ref_stat== RepoManager::REPO_UP_TO_DATE || ref_stat == RepoManager::REPO_CHECK_DELAYED, "Metadata should be up to date" );
 
    // the solv file should exists now
   Pathname base = (opts.repoCachePath + repo.alias());