From 72d60788e447226b84528997ee74fc905ea07fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 2 Aug 2016 02:12:49 +0200 Subject: [PATCH] tests: fix Debian repository format Use SHA256 instead of SHA1 - apt-get in Debian 9 rejects SHA1. Fix date format (according to apt-get in Debian 9). --- tests/network.py | 11 +++++------ tests/regressions.py | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/network.py b/tests/network.py index 2317f8dc..a1c57a09 100644 --- a/tests/network.py +++ b/tests/network.py @@ -518,10 +518,10 @@ class VmUpdatesMixin(qubes.tests.SystemTestsMixin): p = self.netvm_repo.run( "mkdir -p /tmp/apt-repo/dists/test && " "cd /tmp/apt-repo/dists/test && " - "cat > Release < Release && " + "echo '' $(sha256sum {p} | cut -f 1 -d ' ') $(stat -c %s {p}) {p}" " >> Release && " - "echo '' $(sha1sum {z} | cut -f 1 -d ' ') $(stat -c %s {z}) {z}" + "echo '' $(sha256sum {z} | cut -f 1 -d ' ') $(stat -c %s {z}) {z}" " >> Release" .format(p="main/binary-amd64/Packages", z="main/binary-amd64/Packages.gz"), @@ -531,11 +531,10 @@ class VmUpdatesMixin(qubes.tests.SystemTestsMixin): "Label: Test repo\n" "Suite: test\n" "Codename: test\n" - "Date: Tue, 27 Oct 2015 03:22:09 +0100\n" + "Date: Tue, 27 Oct 2015 03:22:09 UTC\n" "Architectures: amd64\n" "Components: main\n" - "SHA1:\n" - "EOF\n" + "SHA256:\n" ) p.stdin.close() if p.wait() != 0: diff --git a/tests/regressions.py b/tests/regressions.py index f61f3a2b..673de721 100644 --- a/tests/regressions.py +++ b/tests/regressions.py @@ -78,4 +78,3 @@ class TC_00_Regressions(qubes.tests.SystemTestsMixin, qubes.tests.QubesTestCase) p.stdin.close() self.assertTrue(dispvm_name.startswith("disp"), "Try {} failed".format(try_no)) -