- rework the testsuite after new boost in factory broke it.
[platform/upstream/libzypp.git] / tests / repo / yum / YUMDownloader_test.cc
index 952af39..993d230 100644 (file)
@@ -4,8 +4,6 @@
 #include <vector>
 #include <list>
 #include <boost/test/unit_test.hpp>
-#include <boost/test/parameterized_test.hpp>
-#include <boost/test/unit_test_log.hpp>
 
 #include "zypp/base/Logger.h"
 #include "zypp/Url.h"
@@ -18,17 +16,18 @@ using std::endl;
 using std::string;
 using namespace zypp;
 using namespace boost::unit_test;
-
 using namespace zypp::repo;
 
 #include "tests/zypp/KeyRingTestReceiver.h"
 
-void yum_download_test(const string &dir)
+#define DATADIR (Pathname(TESTS_SRC_DIR) + "/repo/yum/data")
+
+BOOST_AUTO_TEST_CASE(yum_download)
 {
   KeyRingTestReceiver keyring_callbacks;
   keyring_callbacks.answerTrustKey(true);
 
-  Pathname p = dir + "/10.2-updates-subset";
+  Pathname p = DATADIR + "/10.2-updates-subset";
   Url url("dir:" + p.asString());
   MediaSetAccess media(url);
   yum::Downloader yum("/");
@@ -65,30 +64,4 @@ void yum_download_test(const string &dir)
 
 }
 
-test_suite*
-init_unit_test_suite( int argc, char *argv[] )
-{
-  string datadir;
-  if (argc < 2)
-  {
-    datadir = TESTS_SRC_DIR;
-    datadir = (Pathname(datadir) + "/repo/yum/data").asString();
-    cout << "YUMDownloader_test:"
-      " path to directory with test data required as parameter. Using " << datadir  << endl;
-    //return (test_suite *)0;
-    
-  }
-  else
-  {
-    datadir = argv[1];
-  }
-  
-  test_suite* test= BOOST_TEST_SUITE("YUMDownloader");
-  
-  std::string const params[] = { datadir };
-  test->add(BOOST_PARAM_TEST_CASE(&yum_download_test,
-                                 (std::string const*)params, params+1));
-  return test;
-}
-
 // vim: set ts=2 sts=2 sw=2 ai et: