Fix faulty RepoInfo::keepPackages testcase
authorMichael Andres <ma@suse.de>
Thu, 3 Nov 2011 14:46:35 +0000 (15:46 +0100)
committerMichael Andres <ma@suse.de>
Thu, 3 Nov 2011 14:46:35 +0000 (15:46 +0100)
tests/zypp/RepoManager_test.cc
zypp/RepoInfo.h

index ef225ea..cae630d 100644 (file)
@@ -287,16 +287,8 @@ BOOST_AUTO_TEST_CASE(repo_seting_test)
 {
   RepoInfo repo;
   repo.setAlias("foo");
-  repo.addBaseUrl(string("http://test.org"));
-  BOOST_CHECK_MESSAGE( repo.keepPackages(), "http scheme is not cached");
-  repo.setBaseUrl(string("ftp://test.org"));
-  BOOST_CHECK_MESSAGE( repo.keepPackages(), "ftp scheme is not cached");
-  repo.setBaseUrl(string("smb://test.org"));
-  BOOST_CHECK_MESSAGE( !repo.keepPackages(), "smb scheme is cached");
-  repo.setBaseUrl(string("file:///test.txt"));
-  BOOST_CHECK_MESSAGE( !repo.keepPackages(), "file scheme is cached");
   repo.setBaseUrl(string("http://test.org"));
-  BOOST_CHECK_MESSAGE( repo.keepPackages(), "cache is depend on second url.");
+  BOOST_CHECK_MESSAGE( !repo.keepPackages(), "keepPackages must default to OFF");
 }
 
 //! \todo test this
index 158b9d9..4d98395 100644 (file)
@@ -132,7 +132,6 @@ namespace zypp
       /**
        * Add a base url. \see baseUrls
        * \param url The base url for the repository.
-       * \note can change keepPackages,so change it after this call
        *
        * To recreate the base URLs list, use \ref setBaseUrl(const Url &) followed
        * by addBaseUrl().
@@ -140,7 +139,6 @@ namespace zypp
       void addBaseUrl( const Url &url );
       /**
        * Clears current base URL list and adds \a url.
-       * \note can change keepPackages,so change it after this call
        */
       void setBaseUrl( const Url &url );