mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-05 22:08:27 +00:00
test: add system tests for AppStream mirror create, edit, and update
This commit is contained in:
committed by
André Roth
parent
7276b9621f
commit
6ecbc9ba90
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components:
|
||||
Architectures: all, amd64, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: i386
|
||||
Download Sources: yes
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, armel, i386, powerpc
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: i386
|
||||
Download Sources: yes
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components:
|
||||
Architectures: all
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, arm64, armel, armhf, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Filter: nginx | Priority (required)
|
||||
Filter With Deps: no
|
||||
Last update: never
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: i386
|
||||
Download Sources: no
|
||||
Download .udebs: yes
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: openmanage/740
|
||||
Architectures: amd64, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components:
|
||||
Architectures: amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components:
|
||||
Architectures: amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Filter: cuda-12-6 (= 12.6.2-1)
|
||||
Filter With Deps: yes
|
||||
Last update: never
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, arm64, armel, armhf, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Filter: nginx | Priority (required)
|
||||
Filter With Deps: no
|
||||
Last update: never
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, arm64, armel, armhf, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Filter: nginx | Priority (required)
|
||||
Filter With Deps: no
|
||||
Last update: never
|
||||
|
||||
4
system/t04_mirror/CreateMirror38Test_gold
Normal file
4
system/t04_mirror/CreateMirror38Test_gold
Normal file
@@ -0,0 +1,4 @@
|
||||
Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/Release
|
||||
|
||||
Mirror [mirror38]: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/ stretch [appstream] successfully added.
|
||||
You can run 'aptly mirror update mirror38' to download repository contents.
|
||||
23
system/t04_mirror/CreateMirror38Test_mirror_show
Normal file
23
system/t04_mirror/CreateMirror38Test_mirror_show
Normal file
@@ -0,0 +1,23 @@
|
||||
Name: mirror38
|
||||
Archive Root URL: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/
|
||||
Distribution: stretch
|
||||
Components: main, contrib, non-free
|
||||
Architectures: amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: yes
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
Acquire-By-Hash: yes
|
||||
Architectures: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x
|
||||
Changelogs: http://metadata.ftp-master.debian.org/changelogs/@CHANGEPATH@_changelog
|
||||
Codename: stretch
|
||||
Components: main contrib non-free
|
||||
Date: Sat, 14 Aug 2021 07:42:00 UTC
|
||||
Description: Debian 9.13 Released 18 July 2020
|
||||
|
||||
Label: Debian
|
||||
Origin: Debian
|
||||
Suite: oldoldstable
|
||||
Version: 9.13
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib
|
||||
Architectures: i386, amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib
|
||||
Architectures: i386, amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
1
system/t04_mirror/EditMirror11Test_gold
Normal file
1
system/t04_mirror/EditMirror11Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
Mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy [appstream] successfully updated.
|
||||
21
system/t04_mirror/EditMirror11Test_mirror_show
Normal file
21
system/t04_mirror/EditMirror11Test_mirror_show
Normal file
@@ -0,0 +1,21 @@
|
||||
Name: wheezy-main
|
||||
Archive Root URL: http://mirror.yandex.ru/debian/
|
||||
Distribution: wheezy
|
||||
Components: main
|
||||
Architectures: i386, amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: yes
|
||||
Number of packages: 56121
|
||||
|
||||
Information from release file:
|
||||
Architectures: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc
|
||||
Codename: wheezy
|
||||
Components: main contrib non-free
|
||||
Date: Sat, 26 Apr 2014 09:27:11 UTC
|
||||
Description: Debian 7.5 Released 26 April 2014
|
||||
|
||||
Label: Debian
|
||||
Origin: Debian
|
||||
Suite: stable
|
||||
Version: 7.5
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: i386, amd64
|
||||
Download Sources: yes
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Filter: nginx
|
||||
Filter With Deps: yes
|
||||
Number of packages: 56121
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: i386, amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Number of packages: 56121
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, arm64, armel, armhf, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
|
||||
Information from release file:
|
||||
Acquire-By-Hash: yes
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: i386, amd64
|
||||
Download Sources: no
|
||||
Download .udebs: yes
|
||||
Download AppStream: no
|
||||
Number of packages: 56121
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
"SkipArchitectureCheck": false,
|
||||
"DownloadSources": false,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false
|
||||
},
|
||||
{
|
||||
"Name": "mirror2",
|
||||
@@ -85,7 +86,8 @@
|
||||
"SkipArchitectureCheck": false,
|
||||
"DownloadSources": true,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false
|
||||
},
|
||||
{
|
||||
"Name": "mirror3",
|
||||
@@ -119,7 +121,8 @@
|
||||
"SkipArchitectureCheck": false,
|
||||
"DownloadSources": false,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false
|
||||
},
|
||||
{
|
||||
"Name": "mirror4",
|
||||
@@ -148,6 +151,7 @@
|
||||
"SkipArchitectureCheck": false,
|
||||
"DownloadSources": false,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main, contrib, non-free
|
||||
Architectures: amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Last update: never
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: contrib
|
||||
Architectures: i386, amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Number of packages: 325
|
||||
|
||||
Information from release file:
|
||||
|
||||
@@ -5,6 +5,7 @@ Components: main
|
||||
Architectures: amd64, arm64, armel, armhf, i386
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: no
|
||||
Filter: nginx | Priority (required)
|
||||
Filter With Deps: yes
|
||||
Last update: never
|
||||
|
||||
@@ -41,5 +41,6 @@
|
||||
"SkipArchitectureCheck": false,
|
||||
"DownloadSources": false,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
"DownloadSources": false,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false,
|
||||
"Packages": [
|
||||
"alien-arena-server_7.53+dfsg-3_amd64",
|
||||
"alien-arena-server_7.53+dfsg-3_i386",
|
||||
|
||||
@@ -33,5 +33,6 @@
|
||||
"SkipArchitectureCheck": false,
|
||||
"DownloadSources": false,
|
||||
"DownloadUdebs": false,
|
||||
"DownloadInstaller": false
|
||||
"DownloadInstaller": false,
|
||||
"DownloadAppStream": false
|
||||
}
|
||||
|
||||
26
system/t04_mirror/UpdateMirror28Test_gold
Normal file
26
system/t04_mirror/UpdateMirror28Test_gold
Normal file
@@ -0,0 +1,26 @@
|
||||
Downloading: ${url}dists/hardy/Release
|
||||
Downloading & parsing package files...
|
||||
Downloading: ${url}dists/hardy/main/binary-amd64/Packages.bz2
|
||||
Error (retrying): HTTP code 404 while fetching ${url}dists/hardy/main/binary-amd64/Packages.bz2
|
||||
Retrying 0 ${url}dists/hardy/main/binary-amd64/Packages.bz2...
|
||||
Download Error: ${url}dists/hardy/main/binary-amd64/Packages.bz2
|
||||
Downloading: ${url}dists/hardy/main/binary-amd64/Packages.gz
|
||||
Error (retrying): HTTP code 404 while fetching ${url}dists/hardy/main/binary-amd64/Packages.gz
|
||||
Retrying 0 ${url}dists/hardy/main/binary-amd64/Packages.gz...
|
||||
Download Error: ${url}dists/hardy/main/binary-amd64/Packages.gz
|
||||
Downloading: ${url}dists/hardy/main/binary-amd64/Packages.xz
|
||||
Error (retrying): HTTP code 404 while fetching ${url}dists/hardy/main/binary-amd64/Packages.xz
|
||||
Retrying 0 ${url}dists/hardy/main/binary-amd64/Packages.xz...
|
||||
Download Error: ${url}dists/hardy/main/binary-amd64/Packages.xz
|
||||
Downloading: ${url}dists/hardy/main/binary-amd64/Packages
|
||||
Downloading AppStream metadata...
|
||||
Downloading AppStream file main/dep11/Components-amd64.yml.gz...
|
||||
Downloading: ${url}dists/hardy/main/dep11/Components-amd64.yml.gz
|
||||
Downloading AppStream file main/dep11/icons-48x48.tar.gz...
|
||||
Downloading: ${url}dists/hardy/main/dep11/icons-48x48.tar.gz
|
||||
Building download queue...
|
||||
Download queue: 1 items (30 B)
|
||||
Downloading: ${url}pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb
|
||||
WARNING: ${url}pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb: sha1 hash mismatch "8d3a014000038725d6daf8771b42a0784253688f" != "66b27417d37e024c46526c2f6d358a754fc552f3"
|
||||
|
||||
Mirror `appstream-test` has been updated successfully.
|
||||
21
system/t04_mirror/UpdateMirror28Test_mirror_show
Normal file
21
system/t04_mirror/UpdateMirror28Test_mirror_show
Normal file
@@ -0,0 +1,21 @@
|
||||
Name: appstream-test
|
||||
Archive Root URL: ${url}
|
||||
Distribution: hardy
|
||||
Components: main
|
||||
Architectures: amd64
|
||||
Download Sources: no
|
||||
Download .udebs: no
|
||||
Download AppStream: yes
|
||||
Number of packages: 1
|
||||
|
||||
Information from release file:
|
||||
Architectures: amd64
|
||||
Codename: hardy
|
||||
Components: main
|
||||
Date: Sat, 19 Oct 2013 13:54:21 UTC
|
||||
Description: Debian 6.0.8 Released 19 October 2013
|
||||
|
||||
Label: failure
|
||||
Origin: test
|
||||
Suite: test
|
||||
Version: 6.0.8
|
||||
@@ -533,3 +533,14 @@ class CreateMirror37Test(BaseTest):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror37",
|
||||
"mirror_show", match_prepare=removeDates)
|
||||
|
||||
|
||||
class CreateMirror38Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with appstream enabled
|
||||
"""
|
||||
runCmd = "aptly -architectures=amd64 mirror create -ignore-signatures -with-appstream mirror38 http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/ stretch"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror38", "mirror_show")
|
||||
|
||||
@@ -114,3 +114,16 @@ class EditMirror10Test(BaseTest):
|
||||
"""
|
||||
fixtureCmds = ["aptly mirror create -ignore-signatures mirror10 http://repo.aptly.info/system-tests/ftp.ru.debian.org/debian bookworm main"]
|
||||
runCmd = "aptly mirror edit -ignore-signatures -archive-url http://repo.aptly.info/system-tests/ftp.ch.debian.org/debian mirror10"
|
||||
|
||||
|
||||
class EditMirror11Test(BaseTest):
|
||||
"""
|
||||
edit mirror: enable appstream
|
||||
"""
|
||||
fixtureDB = True
|
||||
runCmd = "aptly mirror edit -with-appstream wheezy-main"
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show",
|
||||
match_prepare=lambda s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s))
|
||||
|
||||
@@ -9,3 +9,11 @@ Components: main
|
||||
Description: Debian 6.0.8 Released 19 October 2013
|
||||
MD5Sum:
|
||||
846549680001f5c632b6ee8e0f183825 827 main/binary-amd64/Packages
|
||||
f72bdc4905a2d68a7a4b85544a7135c3 92 main/dep11/Components-amd64.yml.gz
|
||||
26dce1ff9274a848f1633737936044ed 170 main/dep11/icons-48x48.tar.gz
|
||||
SHA1:
|
||||
2a4d420955106ebf1765153341ba4581680f62ce 92 main/dep11/Components-amd64.yml.gz
|
||||
2f14d886f1e798b899184e7ff1ef2d2f27cd59df 170 main/dep11/icons-48x48.tar.gz
|
||||
SHA256:
|
||||
1245da5002d7e96c3b3133671e9267f69eea41ee4e3f3b8a0dcb6df15e5b51b7 92 main/dep11/Components-amd64.yml.gz
|
||||
bdd3f75f27c2eaf78e074142ee2270809d5f16b26cc64c60df7cb38ae0f38516 170 main/dep11/icons-48x48.tar.gz
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -482,3 +482,23 @@ class UpdateMirror27Test(BaseTest):
|
||||
runCmd = "aptly mirror update -downloader=grab -keyring=aptlytest.gpg grab-fail"
|
||||
outputMatchPrepare = filterOutRedirects
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class UpdateMirror28Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update with appstream
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly mirror create --ignore-signatures -with-appstream appstream-test ${url} hardy main",
|
||||
]
|
||||
fixtureWebServer = "test_release2"
|
||||
configOverride = {"downloadRetries": 0}
|
||||
runCmd = "aptly mirror update -ignore-checksums --ignore-signatures appstream-test"
|
||||
|
||||
def gold_processor(self, gold):
|
||||
return string.Template(gold).substitute({'url': self.webServerUrl})
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show appstream-test", "mirror_show",
|
||||
match_prepare=lambda s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s))
|
||||
|
||||
Reference in New Issue
Block a user