Copy verification files due to systemd machinectl limitations
This commit is contained in:
parent
7d73dafdcf
commit
86277e0c43
@ -9,6 +9,7 @@ import fcntl
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
@ -698,9 +699,11 @@ Dir::Etc::preferencesparts "/var/empty";
|
||||
cmd = [self.checksum_command] + files
|
||||
self.info(f'Calculate checksum of {string}')
|
||||
self.call(cmd, stdout_to_file=sum_file)
|
||||
shutil.copyfile(sum_file, 'SHA256SUMS')
|
||||
|
||||
self.info(f'Sign checksum of {string}')
|
||||
self.call(['gpg2', '--yes', '-basu', self.key, sum_file])
|
||||
shutil.copyfile(sum_file + '.asc', 'SHA256SUMS.gpg')
|
||||
|
||||
def kick(self):
|
||||
remote = self._remote
|
||||
|
@ -62,6 +62,11 @@ class TestIntegrationImages(TestCase):
|
||||
def test_external_files(self):
|
||||
self.assertIn('README', self.images['p9'])
|
||||
|
||||
def test_verification_files(self):
|
||||
for images in self.images.values():
|
||||
self.assertIn('SHA256SUMS', images)
|
||||
self.assertIn('SHA256SUMS.gpg', images)
|
||||
|
||||
def test_number_of_images(self):
|
||||
number_of_images = sum(len(self.images[b]) for b in self.images.keys())
|
||||
self.assertEqual(number_of_images, 58)
|
||||
self.assertEqual(number_of_images, 64)
|
||||
|
Loading…
Reference in New Issue
Block a user