summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-11-11 14:06:22 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2024-11-20 15:04:28 +0100
commit918a13883a6d657bba2b9d786a9468332ab0f06e (patch)
tree2e72bc6bb6a164c6ab104ee2111b1a5ab796c1d3 /test/integration
parent709adda89a575e6c542310e6632c090632bb9732 (diff)
ftparchive: writer: Remove line length limit on file lists
LP: #2087848
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-apt-ftparchive-cachedb24
1 files changed, 23 insertions, 1 deletions
diff --git a/test/integration/test-apt-ftparchive-cachedb b/test/integration/test-apt-ftparchive-cachedb
index 1ba1f23ba..f6e71ccdb 100755
--- a/test/integration/test-apt-ftparchive-cachedb
+++ b/test/integration/test-apt-ftparchive-cachedb
@@ -69,6 +69,7 @@ Tree "dists/test" {
Architectures "i386";
BinOverride "bin-override";
ExtraOverride "extra-override";
+ //FileList "file-list";
};
EOF
@@ -126,7 +127,6 @@ testsuccess $db_dump -f dump -p aptarchive-cache/packages-main-i386.db
testsuccess grep "^ ./aptarchive/pool/main/foo_1_i386.deb:cl$" dump
testsuccess grep "^ ./aptarchive/pool/main/foo_1_i386.deb:cn$" dump
testsuccess grep "^ ./aptarchive/pool/main/foo_1_i386.deb:st$" dump
-
testsuccess aptftparchive generate ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
# file is still found
@@ -141,6 +141,28 @@ testsuccess grep "^ ./aptarchive/pool/main/${longPath}/foo_1_i386.deb:cl$" dump
testsuccess grep "^ ./aptarchive/pool/main/${longPath}/foo_1_i386.deb:cn$" dump
testsuccess grep "^ ./aptarchive/pool/main/${longPath}/foo_1_i386.deb:st"$ dump
+msgmsg "Test file lists"
+
+# Check that the empty file list produces no packages
+rm aptarchive-cache/packages-main-i386.db
+testsuccess sed -i s#//FileList#FileList# ftparchive.conf
+testsuccess aptftparchive generate ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
+testfileequal ./aptarchive/dists/test/main/binary-i386/Packages ""
+
+# Add the packages and run our checks again
+echo "pool/main/${longPath}/foo_1_i386.deb" > file-list
+testsuccess aptftparchive generate ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
+testsuccessequal "Filename: pool/main/${longPath}/foo_1_i386.deb" grep ^Filename ./aptarchive/dists/test/main/binary-i386/Packages
+testsuccessequal "Priority: priority${manyX}" grep ^Priority ./aptarchive/dists/test/main/binary-i386/Packages
+testsuccessequal "Section: overrideSection" grep ^Section ./aptarchive/dists/test/main/binary-i386/Packages
+testsuccessequal "Extra: ${manyX}trailer" grep ^Extra ./aptarchive/dists/test/main/binary-i386/Packages
+
+# file is in the database
+testsuccess $db_dump -f dump -p aptarchive-cache/packages-main-i386.db
+testsuccess grep "^ ./aptarchive/pool/main/${longPath}/foo_1_i386.deb:cl$" dump
+testsuccess grep "^ ./aptarchive/pool/main/${longPath}/foo_1_i386.deb:cn$" dump
+testsuccess grep "^ ./aptarchive/pool/main/${longPath}/foo_1_i386.deb:st"$ dump
+
msgmsg "Test Clean"
# and clean
rm -rf aptarchive/pool/main/*