Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Multiple Updates to WinRM Transport #8

Merged
merged 5 commits into from
Jun 24, 2015
Merged

Conversation

smurawski
Copy link
Contributor

Fix unzipping from COM. Closes #7
Fix failed single file copies (when parent directory was not present).
Adding more tests around decode_files.ps1
Cleaner error output from @xmik

Collapsed a few common commands to their aliases to save characters.
Really needs that trailing line break
More tests for powershell functions.
System.Security.Cryptography.MD5CryptoService is IDisposable, but has no public Dispose method in .NET 2.0
@smurawski smurawski force-pushed the smurawski/fix_com_unpacking branch from 41dc8ff to 2b249f2 Compare June 16, 2015 15:33
@smurawski smurawski changed the title Fix unzipping from COM. Closes #7 Multiple Updates to WinRM Transport Jun 16, 2015
Handle powershell errors:
* when powershell script is too long (too many lines or chars?), raise
error.
* when running powershell script with WinRM fails with exitcode == 0
but its stderr is not empty, raise error.
* parse WinRM::Output.stderr, which is CLIXML, into String (error
messages parsed from CLIXML).
@smurawski
Copy link
Contributor Author

@tyler-ball @fnichol These are some pretty necessary updates. I broke COM uploading when I fixed IO.Compression last time. I've got that sorted out and added a bunch of tests around the PowerShell to cover those cases. I've also got the single file copy fail fixed and a test to cover that.

@tyler-ball
Copy link
Contributor

This LGTM, but I could use some help groking the Powershell - @jdmundrawala

@jaym
Copy link

jaym commented Jun 24, 2015

@smurawski this fixes the issue i was having
You are a god

@@ -252,8 +252,8 @@ def decode_files(files)
vars = %{$hash_file = "#{hash_file}"\n}

output = service.run_powershell_script(
[vars,
". #{decode_files_script}",
["#{decode_files_script}",
Copy link

Choose a reason for hiding this comment

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

unneeded string interpolation

Copy link

Choose a reason for hiding this comment

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

For my own learning, what does this change do

@jaym
Copy link

jaym commented Jun 24, 2015

💯 please 🚢

@smurawski
Copy link
Contributor Author

@jdmundrawala moving the decode-files call out of the script file makes it easier to test the powershell. Then the script file is just a library of functions and we don't have to try to intercept the invocation to test the internal functions.

@tyler-ball
Copy link
Contributor

We have 2 👍 - I'm going to merge this unless someone stops me

@jaym
Copy link

jaym commented Jun 24, 2015

merge

@fnichol
Copy link
Contributor

fnichol commented Jun 24, 2015

I'm seeing pretty decisive :shipit:, so yay!

fnichol added a commit that referenced this pull request Jun 24, 2015
@fnichol fnichol merged commit 1d8c232 into master Jun 24, 2015
@fnichol fnichol removed the Reviewing label Jun 24, 2015
@fnichol fnichol deleted the smurawski/fix_com_unpacking branch June 24, 2015 20:41
@fnichol fnichol mentioned this pull request Jun 24, 2015
@fnichol fnichol added this to the 1.0.2 milestone Jun 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unpacking files using the COM objects overwrites directories.
5 participants