]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ukify: make the test happy with the latest OpenSSL
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 23 Dec 2023 11:20:03 +0000 (12:20 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 23 Dec 2023 11:32:31 +0000 (12:32 +0100)
Which dropped some whitespaces in the output:

$ openssl version
OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)
$ openssl x509 -in cert.pem -text -noout | grep Issuer
        Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd

$ openssl version
OpenSSL 3.0.9 30 May 2023 (Library: OpenSSL 3.0.9 30 May 2023)
$ openssl x509 -in cert.pem -text -noout | grep Issuer
        Issuer: C = XX, L = Default City, O = Default Company Ltd

Making test-ukify unhappy:

>       assert 'Issuer: CN = SecureBoot signing key on host' in out
E       AssertionError: assert 'Issuer: CN = SecureBoot signing key on host' in '<...snip...>Issuer: CN=SecureBoot signing key on host archlinux2\n...'

src/ukify/test/test_ukify.py

index 7db7c6ba61a0b362ba1acbace2495ae13acf164d..0a0a9024e96ece8b8ff1946e76be4f602edad745 100755 (executable)
@@ -859,7 +859,7 @@ def test_key_cert_generation(tmp_path):
         '-noout',
     ], text = True)
     assert 'Certificate' in out
-    assert 'Issuer: CN = SecureBoot signing key on host' in out
+    assert re.search('Issuer: CN\s?=\s?SecureBoot signing key on host', out)
 
 if __name__ == '__main__':
     sys.exit(pytest.main(sys.argv))