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:
parent
2689601bc3
commit
b6660a1abe
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue