Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11566 - /trunk/libzypp/tests/zypp/Fetcher_test.cc
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Mon, 03 Nov 2008 14:34:09 -0000
  • Message-id: <20081103143410.1DEAC2DE98@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Mon Nov 3 15:34:09 2008
New Revision: 11566

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11566&view=rev
Log:
check that files are downloaded too

Modified:
trunk/libzypp/tests/zypp/Fetcher_test.cc

Modified: trunk/libzypp/tests/zypp/Fetcher_test.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/Fetcher_test.cc?rev=11566&r1=11565&r2=11566&view=diff
==============================================================================
--- trunk/libzypp/tests/zypp/Fetcher_test.cc (original)
+++ trunk/libzypp/tests/zypp/Fetcher_test.cc Mon Nov 3 15:34:09 2008
@@ -34,6 +34,11 @@
fetcher.enqueueDir(OnMediaLocation("/complexdir"), true);
fetcher.start( dest.path(), media );
fetcher.reset();
+
+ BOOST_CHECK( PathInfo(dest.path() + "/complexdir/subdir2").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir/subdir2/subdir2-file1.txt").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir/subdir1/subdir1-file1.txt").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir/subdir1/subdir1-file2.txt").isExist() );
}
}

@@ -90,6 +95,12 @@
// enqueue is not digested
fetcher.start( dest.path(), media );
fetcher.reset();
+
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir-broken/subdir2").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir-broken/subdir2/subdir2-file1.txt").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir-broken/subdir1/subdir1-file1.txt").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir-broken/subdir1/subdir1-file2.txt").isExist() );
+
}
}

@@ -177,6 +188,7 @@
fetcher.enqueue(loc);
fetcher.start(dest.path(), media);
fetcher.reset();
+ BOOST_CHECK( PathInfo(dest.path() +
"/contentindex/subdir1/subdir1-file1.txt").isExist() );
}

}
@@ -194,6 +206,8 @@
fetcher.enqueue(loc);
fetcher.start(dest.path(), media);
fetcher.reset();
+ BOOST_CHECK( PathInfo(dest.path() +
"/contentindex-broken-digest/subdir1/subdir1-file1.txt").isExist() );
+
// now retrieve a file that is modified, so the checksum has to fail
loc =
OnMediaLocation("/contentindex-broken-digest/subdir1/subdir1-file2.txt",1);
fetcher.enqueue(loc);
@@ -240,6 +254,8 @@
fetcher.enqueue(loc);
fetcher.start( dest.path(), media );
fetcher.reset();
+ BOOST_CHECK( PathInfo(dest.path() +
"/contentindex-broken-digest/subdir1/subdir1-file2.txt").isExist() );
+
}
}

@@ -265,6 +281,12 @@

fetcher.reset();

+ BOOST_CHECK( PathInfo(dest.path() + "/complexdir/subdir2").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir/subdir2/subdir2-file1.txt").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir/subdir1/subdir1-file1.txt").isExist() );
+ BOOST_CHECK( PathInfo(dest.path() +
"/complexdir/subdir1/subdir1-file2.txt").isExist() );
+
+
fetcher.enqueueDir(OnMediaLocation("/complexdir-broken"), true);
BOOST_CHECK_THROW( fetcher.start( dest.path(), media ), Exception);


--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages