From 829ea2e65c7120dbfbc7063480fe0041da07fcee Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 17 May 2017 00:09:18 +0300 Subject: [PATCH] Fix tests for flat repos --- system/t04_mirror/UpdateMirror7Test_gold | 2 +- system/t04_mirror/UpdateMirror9Test_gold | 2 +- system/t04_mirror/create.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/t04_mirror/UpdateMirror7Test_gold b/system/t04_mirror/UpdateMirror7Test_gold index 657d6588..420a23e2 100644 --- a/system/t04_mirror/UpdateMirror7Test_gold +++ b/system/t04_mirror/UpdateMirror7Test_gold @@ -1,7 +1,7 @@ Building download queue... -Download queue: 84 items (138.28 MiB) +Download queue: 84 items (138.29 MiB) Downloading & parsing package files... Downloading https://cloud.r-project.org/bin/linux/debian/jessie-cran3/InRelease... Downloading https://cloud.r-project.org/bin/linux/debian/jessie-cran3/Packages.bz2... diff --git a/system/t04_mirror/UpdateMirror9Test_gold b/system/t04_mirror/UpdateMirror9Test_gold index adb4413d..f40a672d 100644 --- a/system/t04_mirror/UpdateMirror9Test_gold +++ b/system/t04_mirror/UpdateMirror9Test_gold @@ -1,7 +1,7 @@ Building download queue... -Download queue: 160 items (184.37 MiB) +Download queue: 160 items (184.38 MiB) Downloading & parsing package files... Downloading https://cloud.r-project.org/bin/linux/debian/jessie-cran3/InRelease... Downloading https://cloud.r-project.org/bin/linux/debian/jessie-cran3/Packages.bz2... diff --git a/system/t04_mirror/create.py b/system/t04_mirror/create.py index 84bafa86..c05fdccb 100644 --- a/system/t04_mirror/create.py +++ b/system/t04_mirror/create.py @@ -168,8 +168,11 @@ class CreateMirror14Test(BaseTest): return re.sub(r'Signature made .* using', '', s) def check(self): + def removeDates(s): + return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s) + self.check_output() - self.check_cmd_output("aptly mirror show mirror14", "mirror_show") + self.check_cmd_output("aptly mirror show mirror14", "mirror_show", match_prepare=removeDates) class CreateMirror15Test(BaseTest):