-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose additional winrm options #392
Expose additional winrm options #392
Conversation
Signed-off-by: Noel Georgi <git@frezbo.com>
e7479ab
to
6a1660e
Compare
Signed-off-by: Noel Georgi <git@frezbo.com>
rerunning to fix the GCP fluke. |
The failure is related to GCP test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this! Main request is to add prefix as disussed; and a desire for test coverage, which is optional here.
lib/train/transports/winrm.rb
Outdated
@@ -45,6 +45,9 @@ class WinRM < Train.plugin(1) | |||
option :port | |||
option :user, default: 'administrator', required: true | |||
option :password, nil | |||
option :transport, default: :negotiate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, let's add a --winrm- prefix here, to match what InSpec will be sending. I think in the future we may be able to something like having InSpec strip the prefix from options (or all options would have the prefix - point being it should be consistent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved.
lib/train/transports/winrm.rb
Outdated
transport: :negotiate, | ||
disable_sspi: false, | ||
basic_auth_only: false, | ||
transport: opts[:transport].intern, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's equivalent, but more readable, to say .to_sym
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, come to think of it, we might want to add some validation here; I'm not sure what valid values are for the transport flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved.
lib/train/transports/winrm.rb
Outdated
@@ -45,6 +45,9 @@ class WinRM < Train.plugin(1) | |||
option :port | |||
option :user, default: 'administrator', required: true | |||
option :password, nil | |||
option :transport, default: :negotiate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if you could add a test file in test/windows/
to exercise the new options (those tests are run by rake test:windows
, see Rakefile for details). If that would be overly difficult to do, I'm OK with omitting that for now - but please open a new issue on Train mentioning the need to add testing for the new winrm options, so it doesn't get lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved.
Signed-off-by: Noel Georgi <git@frezbo.com>
Closing and re-running to rule out the Cloud Provider UT's, they are a fluke on local workstation too. |
@clintoncwolfe I have updated the PR as per the review. The tests are failing due to |
Signed-off-by: Noel Georgi <git@frezbo.com>
Re-trigger tests |
Signed-off-by: Noel Georgi <git@frezbo.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @frezbo !
Disregarding unrelated failing unit test per #393 |
Signed-off-by: Noel Georgi git@frezbo.com
Fixes: #391