mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
add tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
Downloading: http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/Release
|
||||||
|
Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/Release
|
||||||
|
Retrying 0 http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/Release...
|
||||||
|
Download Error: http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/Release
|
||||||
|
Downloading: http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/InRelease
|
||||||
|
ERROR: unable to fetch mirror: no architectures found, please specify
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Downloading & parsing package files...
|
||||||
|
Applying filter...
|
||||||
|
Packages filtered: 4743 -> 81.
|
||||||
|
Building download queue...
|
||||||
|
Download queue: 81 items (3.00 GiB)
|
||||||
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
Name: mirror35
|
||||||
|
Archive Root URL: http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/
|
||||||
|
Distribution: ./
|
||||||
|
Components:
|
||||||
|
Architectures: amd64
|
||||||
|
Download Sources: no
|
||||||
|
Download .udebs: no
|
||||||
|
Filter: cuda-12-6 (= 12.6.2-1)
|
||||||
|
Filter With Deps: yes
|
||||||
|
Last update: never
|
||||||
|
|
||||||
|
Information from release file:
|
||||||
|
Acquire-By-Hash: no
|
||||||
|
Architecture: x86_64
|
||||||
|
Date: Mon, 04 Nov 2024 16:02:23 +0000
|
||||||
|
Label: NVIDIA CUDA
|
||||||
|
Origin: NVIDIA
|
||||||
@@ -454,3 +454,38 @@ class CreateMirror33Test(BaseTest):
|
|||||||
def check(self):
|
def check(self):
|
||||||
self.check_output()
|
self.check_output()
|
||||||
self.check_cmd_output("aptly mirror show mirror33", "mirror_show")
|
self.check_cmd_output("aptly mirror show mirror33", "mirror_show")
|
||||||
|
|
||||||
|
|
||||||
|
class CreateMirror34Test(BaseTest):
|
||||||
|
"""
|
||||||
|
create mirror error: flat repo with filter but no architectures in InRelease file
|
||||||
|
"""
|
||||||
|
configOverride = {"max-tries": 1}
|
||||||
|
runCmd = "aptly mirror create -ignore-signatures -filter \"cuda-12-6 (= 12.6.2-1)\" -filter-with-deps mirror34 http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ ./"
|
||||||
|
|
||||||
|
|
||||||
|
class CreateMirror35Test(BaseTest):
|
||||||
|
"""
|
||||||
|
create mirror: flat repo with filter but no architectures in InRelease file
|
||||||
|
"""
|
||||||
|
configOverride = {"max-tries": 1}
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly mirror create -architectures amd64 -ignore-signatures -filter \"cuda-12-6 (= 12.6.2-1)\" -filter-with-deps mirror35 "
|
||||||
|
"http://repo.aptly.info/system-tests/developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ ./",
|
||||||
|
]
|
||||||
|
runCmd = "aptly mirror update -ignore-signatures mirror35"
|
||||||
|
|
||||||
|
# the downloading of the actual packages will return 404 since they don't exist. ignore the errors, the test verifies proper count of filtered packages
|
||||||
|
|
||||||
|
def outputMatchPrepare(self, s):
|
||||||
|
s = re.sub(r'Downloading: .*\n', '', s, flags=re.MULTILINE)
|
||||||
|
s = re.sub(r'Download Error: .*\n', '', s, flags=re.MULTILINE)
|
||||||
|
s = re.sub(r'Retrying .*\n', '', s, flags=re.MULTILINE)
|
||||||
|
s = re.sub(r'Error \(retrying\): .*\n', '', s, flags=re.MULTILINE)
|
||||||
|
s = re.sub(r'HTTP code 404 while fetching .*\n', '', s, flags=re.MULTILINE)
|
||||||
|
s = re.sub(r'ERROR: unable to update: .*\n', '', s, flags=re.MULTILINE)
|
||||||
|
return s
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
self.check_output()
|
||||||
|
self.check_cmd_output("aptly mirror show mirror35", "mirror_show")
|
||||||
|
|||||||
Reference in New Issue
Block a user