Blob Blame History Raw
From faaa64a51445b6edffe6f1e65c465dea63f11bf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
Date: Tue, 27 Apr 2021 10:24:53 +0200
Subject: [PATCH 16/19] Fix failing unittest, caused by the revert of new
 modular implementation

The problem is not caused by advisory filtering which we are testing
here, the `query` is already created with just one package.
---
 tests/libdnf/sack/QueryTest.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/libdnf/sack/QueryTest.cpp b/tests/libdnf/sack/QueryTest.cpp
index ee9eeaf4..7c3a22af 100644
--- a/tests/libdnf/sack/QueryTest.cpp
+++ b/tests/libdnf/sack/QueryTest.cpp
@@ -139,13 +139,10 @@ void QueryTest::testQueryFilterAdvisory()
     dnf_sack_filter_modules_v2(sack, modules, nullptr, tmpdir, nullptr, true, false, false);
     query = new libdnf::Query(sack);
     query->addFilter(HY_PKG_ADVISORY_TYPE, HY_EQ, "enhancement");
-    CPPUNIT_ASSERT(query->size() == 2);
+    CPPUNIT_ASSERT(query->size() == 1);
     libdnf::PackageSet pset2 = *(query->getResultPset());
     pkg = dnf_package_new(sack, pset2[0]);
     CPPUNIT_ASSERT(!g_strcmp0(dnf_package_get_name(pkg), "test-perl-DBI"));
     g_object_unref(pkg);
-    pkg = dnf_package_new(sack, pset2[1]);
-    CPPUNIT_ASSERT(!g_strcmp0(dnf_package_get_name(pkg), "test-perl-DBI"));
-    g_object_unref(pkg);
     delete query;
 }
-- 
2.31.1