public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-asyncssh] rawhide: Fix build / tests against newer OpenSSH versions
@ 2026-11-30 17:37 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-30 17:37 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-asyncssh
            Branch : rawhide
            Commit : 16021d36aac25b930ed9ec88939393991de89a87
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-11-30T12:51:01-03:00
            Stats  : +19/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-asyncssh/c/16021d36aac25b930ed9ec88939393991de89a87?branch=rawhide

            Log:
            Fix build / tests against newer OpenSSH versions

The exact scp error message for a missing direction argument varies
between OpenSSH versions, so accept both variants in the test.

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>

---
diff --git a/python-asyncssh.spec b/python-asyncssh.spec
index e947082..fc41075 100644
--- a/python-asyncssh.spec
+++ b/python-asyncssh.spec
@@ -17,8 +17,11 @@ Source0:        %pypi_source
 # SHA1 for RSA signing, so skip the ssh-rsa / rsa1024-sha1 signature
 # algorithms in the test when the backend cannot do them.
 Patch0:         openssl4-sha1.diff
-BuildArch:      noarch
+# The exact scp error message for a missing direction argument varies
+# between OpenSSH versions, so accept both variants in the test.
+Patch1:         scp-message.diff
 
+BuildArch:      noarch
 # required by unittests
 BuildRequires:  openssh-clients
 BuildRequires:  openssl

diff --git a/scp-message.diff b/scp-message.diff
new file mode 100644
index 0000000..e10bba6
--- /dev/null
+++ b/scp-message.diff
@@ -0,0 +1,15 @@
+--- a/tests/test_sftp.py	2026-11-27 19:19:30.485908300 -0300
++++ b/tests/test_sftp.py	2026-11-30 12:36:56.332169405 -0300
+@@ -6594,8 +6594,10 @@
+ 
+         async with self.connect() as conn:
+             result = await conn.run('scp xxx')
+-            self.assertEqual(result.stderr, 'scp: one of the arguments -f -t '
+-                             'is required\n')
++            # The exact message varies between OpenSSH versions
++            self.assertIn(result.stderr, (
++                'scp: one of the arguments -f -t is required\n',
++                'scp: one of the following arguments is required: -f, -t\n'))
+ 
+     @asynctest
+     async def test_invalid_argument(self):

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 17:37 [rpms/python-asyncssh] rawhide: Fix build / tests against newer OpenSSH versions Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox