Blame SOURCES/0016-Fix-failing-unittest-caused-by-the-revert-of-new-mod.patch

aea1e4
From faaa64a51445b6edffe6f1e65c465dea63f11bf7 Mon Sep 17 00:00:00 2001
aea1e4
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
aea1e4
Date: Tue, 27 Apr 2021 10:24:53 +0200
aea1e4
Subject: [PATCH 16/19] Fix failing unittest, caused by the revert of new
aea1e4
 modular implementation
aea1e4
aea1e4
The problem is not caused by advisory filtering which we are testing
aea1e4
here, the `query` is already created with just one package.
aea1e4
---
aea1e4
 tests/libdnf/sack/QueryTest.cpp | 5 +----
aea1e4
 1 file changed, 1 insertion(+), 4 deletions(-)
aea1e4
aea1e4
diff --git a/tests/libdnf/sack/QueryTest.cpp b/tests/libdnf/sack/QueryTest.cpp
aea1e4
index ee9eeaf4..7c3a22af 100644
aea1e4
--- a/tests/libdnf/sack/QueryTest.cpp
aea1e4
+++ b/tests/libdnf/sack/QueryTest.cpp
aea1e4
@@ -139,13 +139,10 @@ void QueryTest::testQueryFilterAdvisory()
aea1e4
     dnf_sack_filter_modules_v2(sack, modules, nullptr, tmpdir, nullptr, true, false, false);
aea1e4
     query = new libdnf::Query(sack);
aea1e4
     query->addFilter(HY_PKG_ADVISORY_TYPE, HY_EQ, "enhancement");
aea1e4
-    CPPUNIT_ASSERT(query->size() == 2);
aea1e4
+    CPPUNIT_ASSERT(query->size() == 1);
aea1e4
     libdnf::PackageSet pset2 = *(query->getResultPset());
aea1e4
     pkg = dnf_package_new(sack, pset2[0]);
aea1e4
     CPPUNIT_ASSERT(!g_strcmp0(dnf_package_get_name(pkg), "test-perl-DBI"));
aea1e4
     g_object_unref(pkg);
aea1e4
-    pkg = dnf_package_new(sack, pset2[1]);
aea1e4
-    CPPUNIT_ASSERT(!g_strcmp0(dnf_package_get_name(pkg), "test-perl-DBI"));
aea1e4
-    g_object_unref(pkg);
aea1e4
     delete query;
aea1e4
 }
aea1e4
-- 
aea1e4
2.31.1
aea1e4