6 #include <boost/test/unit_test.hpp>
8 #include "zypp/base/Logger.h"
10 #include "zypp/PathInfo.h"
11 #include "zypp/TmpPath.h"
12 #include "zypp/repo/yum/Downloader.h"
18 using namespace boost::unit_test;
19 using namespace zypp::repo;
21 #include "tests/zypp/KeyRingTestReceiver.h"
23 #define DATADIR (Pathname(TESTS_SRC_DIR) + "/repo/yum/data")
25 BOOST_AUTO_TEST_CASE(yum_download)
27 KeyRingTestReceiver keyring_callbacks;
28 keyring_callbacks.answerTrustKey(true);
30 Pathname p = DATADIR + "/10.2-updates-subset";
31 Url url("dir:" + p.asString());
32 MediaSetAccess media(url);
33 yum::Downloader yum("/");
34 filesystem::TmpDir tmp;
36 Pathname localdir(tmp.path());
38 yum.download(media, localdir);
42 // "filelists.xml.gz",
45 "patch-fetchmsttfonts.sh-2333.xml",
46 "patch-flash-player-2359.xml",
47 "patch-glabels-2348.xml",
49 "patch-openssl-2349.xml",
59 while ( files[i] != NULL )
61 BOOST_CHECK_MESSAGE( PathInfo(localdir + "/repodata/" + files[i] ).isExist(), (string("/repodata/") + files[i]).c_str() );
67 // vim: set ts=2 sts=2 sw=2 ai et: