[Git][reproducible-builds/diffoscope][master] 2 commits: Move to assert_diff in test_openssh_pub_key.py
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Wed Jul 3 17:57:05 UTC 2024
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
e8c5dc10 by Chris Lamb at 2024-07-03T10:55:45-07:00
Move to assert_diff in test_openssh_pub_key.py
- - - - -
0743d63f by Chris Lamb at 2024-07-03T10:56:37-07:00
Move away from using DSA OpenSSH keys in tests as support has been removed in OpenSSH 9.8p1. (Closes: #382)
- - - - -
3 changed files:
- tests/comparators/test_openssh_pub_key.py
- tests/data/openssh_pub_key_expected_diff
- tests/data/test_openssh_pub_key1.pub
Changes:
=====================================
tests/comparators/test_openssh_pub_key.py
=====================================
@@ -25,11 +25,11 @@ from diffoscope.config import Config
from diffoscope.comparators.openssh import PublicKeyFile
from diffoscope.comparators.missing_file import MissingFile
-from ..utils.data import load_fixture, get_data
+from ..utils.data import assert_diff, load_fixture
from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
-# Generated by: ssh-keygen -t dsa -C "Test1"
+# Generated by: ssh-keygen -t rsa -C "Test1"
opensshpubkey1 = load_fixture("test_openssh_pub_key1.pub")
# Generated by: ssh-keygen -t rsa -b 4096 -C "Test2"
opensshpubkey2 = load_fixture("test_openssh_pub_key2.pub")
@@ -56,8 +56,7 @@ def differences(opensshpubkey1, opensshpubkey2):
@skip_unless_tool_is_at_least("ssh-keygen", openssh_version, "6.9")
def test_diff(differences):
- expected_diff = get_data("openssh_pub_key_expected_diff")
- assert differences[0].unified_diff == expected_diff
+ assert_diff(differences[0], "openssh_pub_key_expected_diff")
@skip_unless_tools_exist("ssh-keygen")
=====================================
tests/data/openssh_pub_key_expected_diff
=====================================
@@ -1,3 +1,3 @@
@@ -1 +1 @@
--1024 SHA256:v/O+0ETvi2H5TGRXky1RhQ1/WFwLlPpxch5E2Mrj6FM Test1 (DSA)
+-3072 SHA256:Rz00jt5jJMTTyRqlVyvALNvUjPgHYIgogQObBrI3opU Test1 (RSA)
+4096 SHA256:9dH1CMkA6DSfPWU7vNwdPKS5/ppN4LMdvHTP60l7aSA Test2 (RSA)
=====================================
tests/data/test_openssh_pub_key1.pub
=====================================
@@ -1 +1 @@
-ssh-dss AAAAB3NzaC1kc3MAAACBAIa8YajID9g38jwQm8sNBGoGkkwIOv6sQ8k+Bcq8oPXPy1FRXWcra6Kd3iKqApIzLuZUvoYO/f3G2K4lue5yrv72rgwANWmyL4dHVXgcsjwvWwjOl6o4xWTPFspkdNcAAMcZfzG0+w1AOkQxhwMsnK380m3J9a3VOWugUiU4fV1jAAAAFQDzkrIZuJoxlxes564ltb2Vn3hnpQAAAIBHr6uzpiSeSkWLuItB00hHx1RHtBns0zaheNFTTUMGftxtfBU2eBLqObcTlqHJZ3UUY3/YAvD6Ux/uLSgUzEe7JaqvHcgML3K5V4HWIwE0ARRIwzrfU4cAErJObmZZ/OXbXNNRmW2IJgQJI52x4gVuSt0EEuctzASOOvyPA8IekAAAAIA7xe4o0o/ZwUqfWKR9K4QrbPPa6/D4ruFVhMcRJEE/A1LMY1Xo4nVSRU5bxzvMmJPBZvsbR5NEE3CgESqYxp5IPzK8LLyxcf8YxhdHFDYqFL1TbavwaDqtj6/9a/e7+bd8mMYe7zXJUdKWa/Uf+Xm6WRt3HgdLiCEsS2OlpvS2KA== Test1
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUD8xnTzadpJ38IVPXyRbOFWlIPSDABvD0Pf9HBQQNBxH/eK9CSZiHRKC8XS8rLDMkliWnQ1ShLU4OHkaro985zVo9bXauPJcICNDLNSACgWM4HCJdhPEWkwZFwGwVnPYgem/YzXlrYviVzRbUSxIiiuE0yiehtnsheCK2Qk9QKhGRCrYp2AAHIx9eGGHJBVkblmx9lIbTnyRDNyAmU1+k4+7dF2RlJCXo6BjZMKGz7VdLoU/n7/esGWzOQlnZdptl/my23FTw8USvxRZsvzviUV59Qp7SLSziT+bp80NpGpL8uWDMMQ/Rinw2e3EXlZzta2KAqalus5ndtSMyAdQhuGrWSqOpHw/V+KzjbP20I/6i7Zj4kM05mxeJ9xRvxNfhblFXQR5r8MRDhOoxi37RHQ/+A3TbYqHXXxAgVeJ/2zZh/cCqdynqz8J8DdUj4WH3jH7IqhBeOJR80dTbM+sZDj9V0H3odfdbS5gKZbMiAJYYs1xQDYiHIejy5sxq7+s= Test1
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/73966620343aa1f7110a0d6cbcce0183cb1b95d8...0743d63f85f298131e78045ec6d73acdc50b97eb
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/73966620343aa1f7110a0d6cbcce0183cb1b95d8...0743d63f85f298131e78045ec6d73acdc50b97eb
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20240703/f47cb87c/attachment.htm>
More information about the rb-commits
mailing list