6 #include <boost/test/auto_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.answerAcceptKey(KeyRingReport::KEY_TRUST_TEMPORARILY);
30 Pathname p = DATADIR + "/10.2-updates-subset";
31 Url url("dir:" + p.asString());
32 MediaSetAccess media(url);
34 repoinfo.setAlias("testrepo");
35 repoinfo.setPath("/");
36 yum::Downloader yum(repoinfo);
37 filesystem::TmpDir tmp;
39 Pathname localdir(tmp.path());
41 yum.download(media, localdir);
45 // "filelists.xml.gz",
48 "patch-fetchmsttfonts.sh-2333.xml",
49 "patch-flash-player-2359.xml",
50 "patch-glabels-2348.xml",
52 "patch-openssl-2349.xml",
62 while ( files[i] != NULL )
64 BOOST_CHECK_MESSAGE( PathInfo(localdir + "/repodata/" + files[i] ).isExist(), (string("/repodata/") + files[i]).c_str() );
70 // vim: set ts=2 sts=2 sw=2 ai et: