[DRE-commits] [ruby-net-scp] 02/02: d/p/0003-Fix-compatiblity-with-net-ssh-4.0.patch: (Closes: #869164) Add upstream commit to fix compatiblity with net-ssh 4.0+.

Unit 193 unit193-guest at moszumanska.debian.org
Mon Jul 24 09:01:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

unit193-guest pushed a commit to branch master
in repository ruby-net-scp.

commit 84113af4b7a0f1be74a22dbcd28b6f3e196c68eb
Author: Unit 193 <unit193 at ubuntu.com>
Date:   Mon Jul 24 03:02:10 2017 -0400

    d/p/0003-Fix-compatiblity-with-net-ssh-4.0.patch: (Closes: #869164) Add upstream commit to fix compatiblity with net-ssh 4.0+.
    
    Closes: #869164
---
 .../0003-Fix-compatiblity-with-net-ssh-4.0.patch   | 118 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 119 insertions(+)

diff --git a/debian/patches/0003-Fix-compatiblity-with-net-ssh-4.0.patch b/debian/patches/0003-Fix-compatiblity-with-net-ssh-4.0.patch
new file mode 100644
index 0000000..dde028d
--- /dev/null
+++ b/debian/patches/0003-Fix-compatiblity-with-net-ssh-4.0.patch
@@ -0,0 +1,118 @@
+From: =?utf-8?q?V=C3=ADt_Ondruch?= <vondruch at redhat.com>
+Date: Mon, 27 Feb 2017 13:38:00 +0100
+Subject: Fix compatiblity with net-ssh 4.0+
+
+---
+ test/test_download.rb | 36 +++++++++++++++++++++++-------------
+ test/test_upload.rb   | 10 +++++++---
+ 2 files changed, 30 insertions(+), 16 deletions(-)
+
+diff --git a/test/test_download.rb b/test/test_download.rb
+index 1f2952a..6298070 100644
+--- a/test/test_download.rb
++++ b/test/test_download.rb
+@@ -70,12 +70,12 @@ class TestDownload < Net::SCP::TestCase
+     end
+ 
+     error = nil
+-    assert_scripted do
+-      begin
+-        scp.download!("/path/to/remote.txt")
+-      rescue
+-        error = $!
+-      end
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++    begin
++      scp.download!("/path/to/remote.txt")
++    rescue
++      error = $!
++    end
+     end
+     assert_equal Net::SCP::Error, error.class
+     assert_equal "SCP did not finish successfully (1): File not found: /path/to/remote.txt\n", error.message
+@@ -116,7 +116,9 @@ class TestDownload < Net::SCP::TestCase
+ 
+   def test_download_io_with_recursive_should_raise_error
+     expect_scp_session "-f -r /path/to/remote.txt"
+-    assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", StringIO.new, :recursive => true) }
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", StringIO.new, :recursive => true) }
++    end
+   end
+ 
+   def test_download_io_with_preserve_should_ignore_preserve
+@@ -155,7 +157,9 @@ class TestDownload < Net::SCP::TestCase
+       channel.gets_data "D0755 0 remote\n"
+     end
+ 
+-    assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote") }
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote") }
++    end
+   end
+ 
+   def test_download_should_raise_error_if_gets_not_ok
+@@ -168,8 +172,10 @@ class TestDownload < Net::SCP::TestCase
+       channel.gets_data "\1"
+     end
+ 
+-    e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", "/path/to/local.txt") }
+-    assert_equal("\1", e.message)
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", "/path/to/local.txt") }
++      assert_equal("\1", e.message)
++    end
+   end
+ 
+   def test_download_directory_should_raise_error_if_local_exists_and_is_not_directory
+@@ -185,8 +191,10 @@ class TestDownload < Net::SCP::TestCase
+       channel.sends_ok
+     end
+ 
+-    e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote", "/path/to/local", :recursive => true) }
+-    assert_match(/exists and is not a directory/, e.message)
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote", "/path/to/local", :recursive => true) }
++      assert_match(/exists and is not a directory/, e.message)
++    end
+   end
+ 
+   def test_download_directory_should_create_directory_and_files_locally
+@@ -211,7 +219,9 @@ class TestDownload < Net::SCP::TestCase
+       channel.sends_ok
+     end
+ 
+-    scp.download!("/path/to/remote", "/path/to/local", :recursive => true, :ssh => { :verbose => :debug })
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      scp.download!("/path/to/remote", "/path/to/local", :recursive => true, :ssh => { :verbose => :debug })
++    end
+     assert_equal "a" * 1234, file.io.string
+   end
+ 
+diff --git a/test/test_upload.rb b/test/test_upload.rb
+index 02b4062..d0f63e2 100644
+--- a/test/test_upload.rb
++++ b/test/test_upload.rb
+@@ -156,7 +156,9 @@ class TestUpload < Net::SCP::TestCase
+       channel.gets_ok
+     end
+ 
+-    assert_raises(Net::SCP::Error) { scp.upload!("/path/to/local", "/path/to/remote") }
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      assert_raises(Net::SCP::Error) { scp.upload!("/path/to/local", "/path/to/remote") }
++    end
+   end
+ 
+   def test_upload_empty_directory_should_create_directory_and_finish
+@@ -274,7 +276,9 @@ class TestUpload < Net::SCP::TestCase
+       channel.gets_data "\1"
+     end
+ 
+-    e = assert_raises(Net::SCP::Error) { scp.upload!("/path/to/local.txt", "/path/to/remote.txt") }
+-    assert_equal("\1", e.message)
++    Net::SSH::Test::Extensions::IO.with_test_extension do
++      e = assert_raises(Net::SCP::Error) { scp.upload!("/path/to/local.txt", "/path/to/remote.txt") }
++      assert_equal("\1", e.message)
++    end
+   end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 9b25df6..c622a03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 disable-gem-in-tests.patch
 0002-Fix-some-error-cases-to-raise-Net-SCP-Error-instead-.patch
+0003-Fix-compatiblity-with-net-ssh-4.0.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-net-scp.git



More information about the Pkg-ruby-extras-commits mailing list