libdnf/SOURCES/0019-Remove-redundant-test.patch
2021-10-08 12:36:45 +00:00

58 lines
2.3 KiB
Diff

From eb7217d0a71b92ac0d8c3773caa1a2d3a2c20071 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Thu, 13 May 2021 09:10:42 +0200
Subject: [PATCH 19/19] Remove redundant test
The test is identical to
testGetApplicablePackagesMultipleApplicableCollections().
---
tests/libdnf/sack/AdvisoryTest.cpp | 11 -----------
tests/libdnf/sack/AdvisoryTest.hpp | 2 --
2 files changed, 13 deletions(-)
diff --git a/tests/libdnf/sack/AdvisoryTest.cpp b/tests/libdnf/sack/AdvisoryTest.cpp
index 1abf1a95..f5892634 100644
--- a/tests/libdnf/sack/AdvisoryTest.cpp
+++ b/tests/libdnf/sack/AdvisoryTest.cpp
@@ -91,17 +91,6 @@ void AdvisoryTest::testGetPackages()
CPPUNIT_ASSERT(pkgsvector.size() == 4);
}
-void AdvisoryTest::testGetApplicablePackagesModulesNotSetup()
-{
- std::vector<libdnf::AdvisoryPkg> pkgsvector;
-
- // When modules are not setup all advisory collections are applicable and we get all packages
- advisory->getApplicablePackages(pkgsvector);
- CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(pkgsvector.size()));
- CPPUNIT_ASSERT(!g_strcmp0(pkgsvector[0].getNameString(), "test-perl-DBI"));
- CPPUNIT_ASSERT(!g_strcmp0(pkgsvector[1].getNameString(), "not-present"));
-}
-
void AdvisoryTest::testGetApplicablePackagesModulesSetupNoneEnabled()
{
std::vector<libdnf::AdvisoryPkg> pkgsvector;
diff --git a/tests/libdnf/sack/AdvisoryTest.hpp b/tests/libdnf/sack/AdvisoryTest.hpp
index 6eb25a57..cb0d8c05 100644
--- a/tests/libdnf/sack/AdvisoryTest.hpp
+++ b/tests/libdnf/sack/AdvisoryTest.hpp
@@ -19,7 +19,6 @@ class AdvisoryTest : public CppUnit::TestCase
CPPUNIT_TEST(testGetSeverity);
CPPUNIT_TEST(testGetTitle);
CPPUNIT_TEST(testGetPackages);
- CPPUNIT_TEST(testGetApplicablePackagesModulesNotSetup);
CPPUNIT_TEST(testGetApplicablePackagesModulesSetupNoneEnabled);
CPPUNIT_TEST(testGetApplicablePackagesOneApplicableCollection);
CPPUNIT_TEST(testGetApplicablePackagesMultipleApplicableCollections);
@@ -38,7 +37,6 @@ public:
void testGetSeverity();
void testGetTitle();
void testGetPackages();
- void testGetApplicablePackagesModulesNotSetup();
void testGetApplicablePackagesModulesSetupNoneEnabled();
void testGetApplicablePackagesOneApplicableCollection();
void testGetApplicablePackagesMultipleApplicableCollections();
--
2.31.1