Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

#450 rsync command doesn't work in windows with cygwin due to broken ControlMaster support #453

Conversation

xunnanxu
Copy link
Contributor

No description provided.

@@ -69,7 +75,7 @@ def test_try_connection_with_gateway_connects_using_ssh_gateway
cmd = command("10.0.0.1", "--ssh-gateway=user@gateway")
ssh_mock = mock 'ssh_mock'
Net::SSH::Gateway.expects(:new).with('gateway', 'user').returns(ssh_mock)
ssh_mock.expects(:ssh).with(cmd.host, cmd.user, cmd.connection_options.except(:gateway))
ssh_mock.expects(:ssh).with(cmd.host, cmd.user, cmd.connection_options.select{|o| o != :gateway})
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change here? Could I get some info?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think hash.except is something in rails? Does ruby support that itself?

I got this when I ran the test:

SshCommandTest#test_try_connection_with_gateway_connects_using_ssh_gateway:
NoMethodError: undefined method `except' for #Hash:0x00000601f0d7d0

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh odd. This test was passing. Wonder if we were getting the method from a
transient gem.

Thanks then!

On Saturday, September 12, 2015, Shawn Xu [email protected] wrote:

In test/ssh_command_test.rb
#453 (comment):

@@ -69,7 +75,7 @@ def test_try_connection_with_gateway_connects_using_ssh_gateway
cmd = command("10.0.0.1", "--ssh-gateway=user@gateway")
ssh_mock = mock 'ssh_mock'
Net::SSH::Gateway.expects(:new).with('gateway', 'user').returns(ssh_mock)

  • ssh_mock.expects(:ssh).with(cmd.host, cmd.user, cmd.connection_options.except(:gateway))
  • ssh_mock.expects(:ssh).with(cmd.host, cmd.user, cmd.connection_options.select{|o| o != :gateway})

I think hash.except is something in rails? Does ruby support that itself?

I got this when I ran the test:

SshCommandTest#test_try_connection_with_gateway_connects_using_ssh_gateway:
NoMethodError: undefined method `except' for #Hash:0x00000601f0d7d0


Reply to this email directly or view it on GitHub
https://github.com/matschaffer/knife-solo/pull/453/files#r39331141.

-Mat

matschaffer.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. You can definitely get it from ActiveSupport but I don't see anything requiring it in this repo so I'm not sure how it used to work. It certainly works when you run all the tests but fails if you just run this one.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's coming from buff-extensions via berkshelf. That would explain why it works running the full suite since there are berkshelf tests in there too. Thanks for finding this!

matschaffer added a commit that referenced this pull request Sep 15, 2015
…ter-cygwin

#450 rsync command doesn't work in windows with cygwin due to broken ControlMaster support
@matschaffer matschaffer merged commit 28c264a into matschaffer:master Sep 15, 2015
@matschaffer matschaffer removed the ready label Sep 15, 2015
@matschaffer
Copy link
Owner

Thanks! I'll plan to get this out as a point release soon (hopefully this week).

I might pull out the control socket stuff for 0.6.0 since I think pre-staging assets might be simpler and open up parallelization options.

But definitely good to have this in the mean time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants