summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-01-14 08:26:23 +0000
committerJulian Andres Klode <jak@debian.org>2025-01-14 08:26:23 +0000
commitce452d40f499fa56f6ddc15e8871b1262d4e1418 (patch)
treecca88ab8b56520eec386921aa51906d7bdf4f385 /test
parentf9a59225c3b1e025ad93116773cc7825621809c8 (diff)
parentaa4c681f09f06359c0892329b9e39da77e4f9fda (diff)
Merge branch 'fix/cleanup' into 'main'
Drop unused and obsolete macros as well as documentation See merge request apt-team/apt!428
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-get-update-sourceslist-warning36
-rw-r--r--test/interactive-helper/teestream.h8
-rw-r--r--test/interactive-helper/testdeb.cc2
-rw-r--r--test/libapt/acqprogress_test.cc4
-rw-r--r--test/libapt/extracttar_test.cc6
-rw-r--r--test/libapt/indexcopytosourcelist_test.cc8
6 files changed, 14 insertions, 50 deletions
diff --git a/test/integration/test-apt-get-update-sourceslist-warning b/test/integration/test-apt-get-update-sourceslist-warning
index 3a3cb2e9f..115dd3e16 100755
--- a/test/integration/test-apt-get-update-sourceslist-warning
+++ b/test/integration/test-apt-get-update-sourceslist-warning
@@ -27,19 +27,11 @@ touch rootdir/var/lib/apt/lists/example.org_debian_dists_bookworm_non-free_binar
touch rootdir/var/lib/apt/lists/example.org_debian_dists_bookworm_non-free-firmware_binary-amd64_Packages
find rootdir/var/lib/apt/lists/ -type f -exec chmod 644 {} \;
-NOTESURL='https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split'
BOILERPLATE='Reading package lists...
Building dependency tree...
All packages are up to date.'
-msgmsg 'Do not suggest new non-free-firmware component if no non-free'
-echo 'deb http://example.org/debian bookworm main' > rootdir/etc/apt/sources.list.d/example.list
-testsuccessequal "$BOILERPLATE" apt update --no-download
-echo 'deb-src http://example.org/debian bookworm main non-free' > rootdir/etc/apt/sources.list.d/example.list
-testsuccessequal "$BOILERPLATE" apt update --no-download
-
msgmsg 'Suggest Signed-By for deb822 sources.list(5) entries'
-rm rootdir/etc/apt/sources.list.d/example.list
echo 'Types: deb
URIs: http://example.org/debian
Suites: bookworm
@@ -49,26 +41,6 @@ testsuccessequal "$BOILERPLATE
N: Missing Signed-By in the sources.list(5) entry for 'http://example.org/debian'" apt update --no-download
rm rootdir/etc/apt/sources.list.d/example.sources
-msgmsg 'Is non-free-firmware missing?'
-echo 'deb http://example.org/debian bookworm main non-free' > rootdir/etc/apt/sources.list.d/example.list
-cat >> rootdir/var/lib/apt/lists/example.org_debian_dists_bookworm_non-free_binary-amd64_Packages <<EOF
-Package: firmware-linux-nonfree
-Architecture: all
-Version: 1
-EOF
-testsuccessequal "$BOILERPLATE" apt update --no-download
-echo -n > rootdir/var/lib/apt/lists/example.org_debian_dists_bookworm_non-free_binary-amd64_Packages
-testsuccessequal "$BOILERPLATE
-N: Repository 'Debian bookworm' changed its 'non-free component' value from 'non-free' to 'non-free non-free-firmware'
-N: More information about this can be found online in the Release notes at: $NOTESURL" apt update --no-download
-
-msgmsg 'Component already present'
-echo 'deb http://example.org/debian bookworm non-free non-free-firmware' > rootdir/etc/apt/sources.list.d/example.list
-testsuccessequal "$BOILERPLATE" apt update --no-download
-echo 'deb http://example.org/debian bookworm non-free
-deb http://example.org/debian bookworm non-free-firmware' > rootdir/etc/apt/sources.list.d/example.list
-testsuccessequal "$BOILERPLATE" apt update --no-download
-
msgmsg 'Detect login info embedded in sources.list'
echo 'deb http://apt:debian@example.org/debian bookworm main' > rootdir/etc/apt/sources.list.d/example.list
testsuccessequal "$BOILERPLATE
@@ -76,11 +48,3 @@ N: Usage of apt_auth.conf(5) should be preferred over embedding login informatio
echo 'deb tor+https://apt:debian@example.org/debian bookworm main' > rootdir/etc/apt/sources.list.d/example.list
testsuccessequal "$BOILERPLATE
N: Usage of apt_auth.conf(5) should be preferred over embedding login information directly in the sources.list(5) entry for 'tor+https://example.org/debian'" apt update --no-download
-
-msgmsg 'Firmware packages without upgrades'
-echo 'deb http://example.org/debian bookworm main' > rootdir/etc/apt/sources.list.d/example.list
-insertinstalledpackage 'firmware-linux-nonfree' 'all' '1'
-testsuccessequal "$BOILERPLATE
-N: Repository 'Debian bookworm' changed its 'firmware component' value from 'non-free' to 'non-free-firmware'
-N: More information about this can be found online in the Release notes at: $NOTESURL" apt update --no-download
-
diff --git a/test/interactive-helper/teestream.h b/test/interactive-helper/teestream.h
index 058717ac3..511c6da60 100644
--- a/test/interactive-helper/teestream.h
+++ b/test/interactive-helper/teestream.h
@@ -19,13 +19,13 @@ public:
std::basic_streambuf<CharT, Traits> * const sb2)
: s1(sb1), s2(sb2) {}
protected:
- virtual std::streamsize xsputn(const CharT* s, std::streamsize c) APT_OVERRIDE
+ virtual std::streamsize xsputn(const CharT* s, std::streamsize c) override
{
return s2->sputn(s, s1->sputn(s, c));
}
// overflow is the fallback of sputc which is non-virtual
typedef typename Traits::int_type int_type;
- virtual int_type overflow(int_type ch = Traits::eof()) APT_OVERRIDE
+ int_type overflow(int_type ch = Traits::eof()) override
{
auto const eof = Traits::eof();
if (Traits::eq_int_type(ch, Traits::eof()) == true)
@@ -35,12 +35,12 @@ protected:
auto const r2 = s2->sputc(Traits::to_char_type(ch));
return Traits::eq_int_type(r1, eof) ? r1: r2;
}
- virtual void imbue(const std::locale& loc) APT_OVERRIDE
+ void imbue(const std::locale& loc) override
{
s1->pubimbue(loc);
s2->pubimbue(loc);
}
- virtual int sync() APT_OVERRIDE
+ int sync() override
{
auto const r1 = s1->pubsync();
auto const r2 = s2->pubsync();
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index 0bb24a52a..20376181b 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -13,7 +13,7 @@
class NullStream : public pkgDirStream
{
public:
- virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) APT_OVERRIDE {return true;};
+ bool DoItem(Item &/*Itm*/, int &/*Fd*/) override {return true;};
};
static bool Test(const char *File)
diff --git a/test/libapt/acqprogress_test.cc b/test/libapt/acqprogress_test.cc
index 17a04161e..16b17c3a4 100644
--- a/test/libapt/acqprogress_test.cc
+++ b/test/libapt/acqprogress_test.cc
@@ -13,8 +13,8 @@ class TestItem: public pkgAcquire::Item
public:
explicit TestItem(pkgAcquire * const Acq) : pkgAcquire::Item(Acq) {}
- virtual std::string DescURI() const APT_OVERRIDE { return ""; }
- virtual HashStringList GetExpectedHashes() const APT_OVERRIDE { return HashStringList(); }
+ [[nodiscard]] std::string DescURI() const override { return ""; }
+ [[nodiscard]] HashStringList GetExpectedHashes() const override { return {}; }
};
diff --git a/test/libapt/extracttar_test.cc b/test/libapt/extracttar_test.cc
index b01846c10..bf3a3e3bd 100644
--- a/test/libapt/extracttar_test.cc
+++ b/test/libapt/extracttar_test.cc
@@ -14,9 +14,9 @@ class Stream : public pkgDirStream
public:
int count;
Stream () { count = 0; }
- bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE { (void)Itm; (void)Fd; count++; return true; }
- bool Fail(Item &Itm,int Fd) APT_OVERRIDE { (void)Itm; (void)Fd; return true; }
- bool FinishedFile(Item &Itm,int Fd) APT_OVERRIDE { (void)Itm; (void)Fd; return true; }
+ bool DoItem(Item &Itm,int &Fd) override { (void)Itm; (void)Fd; count++; return true; }
+ bool Fail(Item &Itm,int Fd) override { (void)Itm; (void)Fd; return true; }
+ bool FinishedFile(Item &Itm,int Fd) override { (void)Itm; (void)Fd; return true; }
~Stream() {}
};
diff --git a/test/libapt/indexcopytosourcelist_test.cc b/test/libapt/indexcopytosourcelist_test.cc
index a1fed06fa..f112ae937 100644
--- a/test/libapt/indexcopytosourcelist_test.cc
+++ b/test/libapt/indexcopytosourcelist_test.cc
@@ -15,10 +15,10 @@ class NoCopy : private IndexCopy {
IndexCopy::ConvertToSourceList(CD, Path);
return Path;
}
- bool GetFile(std::string &/*Filename*/, unsigned long long &/*Size*/) APT_OVERRIDE { return false; }
- bool RewriteEntry(FileFd & /*Target*/, std::string const &/*File*/) APT_OVERRIDE { return false; }
- const char *GetFileName() APT_OVERRIDE { return NULL; }
- const char *Type() APT_OVERRIDE { return NULL; }
+ bool GetFile(std::string &/*Filename*/, unsigned long long &/*Size*/) override { return false; }
+ bool RewriteEntry(FileFd & /*Target*/, std::string const &/*File*/) override { return false; }
+ const char *GetFileName() override { return nullptr; }
+ const char *Type() override { return nullptr; }
};