From 36892a27971f5084a8280f122664f4ba887d9e99 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 7 Feb 2014 13:41:53 +0400 Subject: [PATCH] Fix tests. --- system/t04_mirror/CreateMirror10Test_gold | 2 +- system/t04_mirror/CreateMirror12Test_gold | 2 +- system/t04_mirror/create.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/t04_mirror/CreateMirror10Test_gold b/system/t04_mirror/CreateMirror10Test_gold index a39de397..c124a0ac 100644 --- a/system/t04_mirror/CreateMirror10Test_gold +++ b/system/t04_mirror/CreateMirror10Test_gold @@ -7,4 +7,4 @@ Downloading http://mirror.yandex.ru/debian-backports/dists/squeeze-backports/Rel gpgv: keyblock resource `${HOME}/.gnupg/aptlytest.gpg': file open error gpgv: RSA key ID 46925553 gpgv: Can't check signature: public key not found -ERROR: unable to fetch mirror: GnuPG verification of detached signature failed: exit status 2 +ERROR: unable to fetch mirror: verification of detached signature failed: exit status 2 diff --git a/system/t04_mirror/CreateMirror12Test_gold b/system/t04_mirror/CreateMirror12Test_gold index 164666e9..907fc8b6 100644 --- a/system/t04_mirror/CreateMirror12Test_gold +++ b/system/t04_mirror/CreateMirror12Test_gold @@ -6,4 +6,4 @@ gpgv: RSA key ID 473041FA gpgv: Can't check signature: public key not found gpgv: RSA key ID B98321F9 gpgv: Can't check signature: public key not found -ERROR: unable to fetch mirror: GnuPG verification of detached signature failed: exit status 2 +ERROR: unable to fetch mirror: verification of detached signature failed: exit status 2 diff --git a/system/t04_mirror/create.py b/system/t04_mirror/create.py index 866650fd..36dc593f 100644 --- a/system/t04_mirror/create.py +++ b/system/t04_mirror/create.py @@ -95,8 +95,11 @@ class CreateMirror9Test(BaseTest): outputMatchPrepare = lambda _, s: 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 mirror9", "mirror_show") + self.check_cmd_output("aptly mirror show mirror9", "mirror_show", match_prepare=removeDates) class CreateMirror10Test(BaseTest):