Author: mlandres Date: Wed Sep 12 18:40:04 2007 New Revision: 7221 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7221&view=rev Log: - Adapt test: Susetags DU parser no longer stores all entries, but just up to level 3. Modified: trunk/libzypp/tests/cache/CacheStore_test.cc Modified: trunk/libzypp/tests/cache/CacheStore_test.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/cache/CacheStore_test.cc?rev=7221&r1=7220&r2=7221&view=diff ============================================================================== --- trunk/libzypp/tests/cache/CacheStore_test.cc (original) +++ trunk/libzypp/tests/cache/CacheStore_test.cc Wed Sep 12 18:40:04 2007 @@ -70,8 +70,9 @@ BOOST_CHECK_EQUAL( p->location().medianr(), (unsigned)1); BOOST_CHECK_EQUAL( p->size(), 38850584); BOOST_CHECK_EQUAL( p->location().downloadSize(), 16356019); - - BOOST_CHECK_EQUAL( p->diskusage().size(), (unsigned) 181); + + //BOOST_CHECK_EQUAL( p->diskusage().size(), (unsigned) 181); // all entries + BOOST_CHECK_EQUAL( p->diskusage().size(), (unsigned) 7); // limited to level 3 "/a/b/" for ( DiskUsage::iterator it = p->diskusage().begin(); it != p->diskusage().end(); ++it ) @@ -123,27 +124,27 @@ BOOST_CHECK_EQUAL( p->distributionName(), "SuSE-Linux-STABLE-X86" ); BOOST_CHECK_EQUAL( p->distributionEdition(), Edition("10.2.42-factory") ); BOOST_CHECK_EQUAL( p->summary(), "openSUSE FACTORY 10.3" ); - + BOOST_CHECK_EQUAL( p->releaseNotesUrl(), Url("http://www.suse.com/relnotes/i386/openSUSE/FACTORY/release-notes.rpm") ); - + list<Url>::const_iterator it; list<Url> urls; - + BOOST_CHECK_EQUAL( urls.size(), (unsigned)0 ); - + urls = p->extraUrls(); it = find( urls.begin(), urls.end(), Url("http://download.opensuse.org/distribution/10.2/repo/oss/")); BOOST_CHECK_EQUAL( p->extraUrls().size(), (unsigned)1 ); BOOST_CHECK( it != urls.end() ); - + urls = p->optionalUrls(); BOOST_CHECK_EQUAL( urls.size(), (unsigned)2 ); - + it = find( urls.begin(), urls.end(), Url("http://download.opensuse.org/distribution/10.2/repo/non-oss/")); BOOST_CHECK( it != urls.end() ); it = find( urls.begin(), urls.end(), Url("http://download.opensuse.org/distribution/10.2/repo/debug/")); BOOST_CHECK( it != urls.end() ); - + for ( it = urls.begin(); it != urls.end(); ++it ) @@ -404,7 +405,7 @@ // 2 packages and a product BOOST_CHECK_EQUAL( dbres.size(), (unsigned)3); - + for ( ResStore::const_iterator it = dbres.begin(); it != dbres.end(); ++it ) @@ -459,7 +460,7 @@ cache::CacheStore store(tmpdir.path()); repository_id = store.lookupOrAppendRepository(alias); } - + cached::RepoImpl *repositoryImpl = new cached::RepoImpl( cached::RepoOptions( RepoInfo(), tmpdir.path(), repository_id )); @@ -501,7 +502,7 @@ // mounts.insert( DiskUsageCounter::MountPoint("/opt/kde3/share/mimelnk/video") ); // mounts.insert( DiskUsageCounter::MountPoint("/foo") ); // mounts.insert( DiskUsageCounter::MountPoint("/bar") ); - + getZYpp()->setPartitions(mounts); test->add(BOOST_PARAM_TEST_CASE(&cache_write_susetags_normal_test, @@ -510,7 +511,7 @@ (std::string const*)params, params+1)); test->add(BOOST_PARAM_TEST_CASE(&cache_write_shared_attributes_test, (std::string const*)params, params+1)); - + // test for delta and patch rpms test->add(BOOST_PARAM_TEST_CASE(&cache_delta_rpm_test, (std::string const*)params, params+1)); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org