From 38485a5b1e7e07d9e96bde1daf16fd70c9dc5921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Thu, 7 Nov 2024 17:05:00 +0100 Subject: [PATCH] add test --- system/t09_repo/AddRepo17Test_gold | 3 +++ system/t09_repo/AddRepo17Test_repo_show | 8 ++++++++ system/t09_repo/add.py | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 system/t09_repo/AddRepo17Test_gold create mode 100644 system/t09_repo/AddRepo17Test_repo_show diff --git a/system/t09_repo/AddRepo17Test_gold b/system/t09_repo/AddRepo17Test_gold new file mode 100644 index 00000000..687c9eb4 --- /dev/null +++ b/system/t09_repo/AddRepo17Test_gold @@ -0,0 +1,3 @@ +Loading packages... +[+] mesa-stable-no-march_24.2.6-101pika1_amd64 added +[+] mesa-stable_24.2.6-101pika1_amd64 added diff --git a/system/t09_repo/AddRepo17Test_repo_show b/system/t09_repo/AddRepo17Test_repo_show new file mode 100644 index 00000000..7be66585 --- /dev/null +++ b/system/t09_repo/AddRepo17Test_repo_show @@ -0,0 +1,8 @@ +Name: repo17 +Comment: Repo17 +Default Distribution: squeeze +Default Component: main +Number of packages: 2 +Packages: + mesa-stable_24.2.6-101pika1_amd64 + mesa-stable-no-march_24.2.6-101pika1_amd64 diff --git a/system/t09_repo/add.py b/system/t09_repo/add.py index 61c64d1e..08274f77 100644 --- a/system/t09_repo/add.py +++ b/system/t09_repo/add.py @@ -344,3 +344,21 @@ class AddRepo16Test(BaseTest): self.check_cmd_output("aptly repo show repo2", "repo_show") shutil.rmtree(self.tempSrcDir) + + +class AddRepo17Test(BaseTest): + """ + add packages to local repo: .deb file with provides + """ + fixtureCmds = [ + "aptly repo create -comment=Repo17 -distribution=squeeze repo17", + ] + runCmd = "aptly repo add repo17 ${testfiles}/mesa-stable_24.2.6-101pika1_amd64.deb ${testfiles}/mesa-stable-no-march_24.2.6-101pika1_amd64.deb" + + def check(self): + self.check_output() + self.check_cmd_output("aptly repo show -with-packages repo17", "repo_show") + + # check pool + self.check_exists('pool/e3/f6/51297bd4bd0ef999296ef0a28299_mesa-stable-no-march_24.2.6-101pika1_amd64.deb') + self.check_exists('pool/01/6b/3d864229761eff49a8680c9987ab_mesa-stable_24.2.6-101pika1_amd64.deb')