From 2a228625e23179c222a998d48ccfccb4f15b4082 Mon Sep 17 00:00:00 2001 From: Philip Cramer <107579314+PhilipCramer@users.noreply.github.com> Date: Thu, 26 Feb 2026 02:35:43 +0100 Subject: [PATCH] test: add system test for AppStream publish pass-through --- system/t06_publish/PublishSnapshot44Test_gold | 14 +++++++++++++ system/t06_publish/snapshot.py | 21 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 system/t06_publish/PublishSnapshot44Test_gold diff --git a/system/t06_publish/PublishSnapshot44Test_gold b/system/t06_publish/PublishSnapshot44Test_gold new file mode 100644 index 00000000..740f9154 --- /dev/null +++ b/system/t06_publish/PublishSnapshot44Test_gold @@ -0,0 +1,14 @@ +Loading packages... +Generating metadata files and linking package files... +[!] Failed to generate package contents: unable to read .deb archive from amanda-client_3.3.1-3~bpo60+1_amd64.deb: ar: missing global header +Finalizing metadata files... +Signing file 'Release' with gpg, please enter your passphrase when prompted: +Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: + +Snapshot snap-appstream has been successfully published. +Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing. +Now you can add following line to apt sources: + deb http://your-server/ hardy main +Don't forget to add your GPG key to apt with apt-key. + +You can also use `aptly serve` to publish your repositories over HTTP quickly. diff --git a/system/t06_publish/snapshot.py b/system/t06_publish/snapshot.py index 3dcdf6fe..f72a34ed 100644 --- a/system/t06_publish/snapshot.py +++ b/system/t06_publish/snapshot.py @@ -1439,3 +1439,24 @@ class PublishSnapshot43Test(BaseTest): self.check_file_contents( 'public/dists/maverick/Release', 'release', match_prepare=strip_processor) + + +class PublishSnapshot44Test(BaseTest): + """ + publish snapshot: mirror with appstream + """ + fixtureWebServer = "../t04_mirror/test_release2" + fixtureGpg = True + fixtureCmds = [ + "aptly mirror create --ignore-signatures -with-appstream -architectures=amd64 appstream-test ${url} hardy main", + "aptly mirror update -ignore-checksums --ignore-signatures appstream-test", + "aptly snapshot create snap-appstream from mirror appstream-test", + ] + runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap-appstream" + gold_processor = BaseTest.expand_environ + configOverride = {"downloadRetries": 0} + + def check(self): + super(PublishSnapshot44Test, self).check() + self.check_exists('public/dists/hardy/main/dep11/Components-amd64.yml.gz') + self.check_exists('public/dists/hardy/main/dep11/icons-48x48.tar.gz')