Updated test as the winrmtest package was tweaked a little...

The winrmtest package update is merged now, so this can be merged now
as well…
This commit is contained in:
Sander van Harmelen 2015-05-01 18:33:49 +02:00
parent 2689601bc3
commit b6660a1abe
1 changed files with 4 additions and 8 deletions

View File

@ -16,30 +16,26 @@ func newMockWinRMServer(t *testing.T) *winrmtest.Remote {
wrm := winrmtest.NewRemote()
wrm.CommandFunc(
"echo foo",
"",
winrmtest.MatchText("echo foo"),
func(out, err io.Writer) int {
out.Write([]byte("foo"))
return 0
})
wrm.CommandFunc(
"file-copy",
`^echo c29tZXRoaW5n >> ".*"$`,
winrmtest.MatchPattern(`^echo c29tZXRoaW5n >> ".*"$`),
func(out, err io.Writer) int {
return 0
})
wrm.CommandFunc(
"file-encode",
`^powershell.exe -EncodedCommand .*$`,
winrmtest.MatchPattern(`^powershell.exe -EncodedCommand .*$`),
func(out, err io.Writer) int {
return 0
})
wrm.CommandFunc(
"powershell",
"",
winrmtest.MatchText("powershell"),
func(out, err io.Writer) int {
return 0
})