Skip to content

Commit b6660a1

Browse files
author
Sander van Harmelen
committed
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…
1 parent 2689601 commit b6660a1

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎communicator/winrm/communicator_test.go‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,26 @@ func newMockWinRMServer(t *testing.T) *winrmtest.Remote {
1616
wrm := winrmtest.NewRemote()
1717

1818
wrm.CommandFunc(
19-
"echo foo",
20-
"",
19+
winrmtest.MatchText("echo foo"),
2120
func(out, err io.Writer) int {
2221
out.Write([]byte("foo"))
2322
return 0
2423
})
2524

2625
wrm.CommandFunc(
27-
"file-copy",
28-
`^echo c29tZXRoaW5n >> ".*"$`,
26+
winrmtest.MatchPattern(`^echo c29tZXRoaW5n >> ".*"$`),
2927
func(out, err io.Writer) int {
3028
return 0
3129
})
3230

3331
wrm.CommandFunc(
34-
"file-encode",
35-
`^powershell.exe -EncodedCommand .*$`,
32+
winrmtest.MatchPattern(`^powershell.exe -EncodedCommand .*$`),
3633
func(out, err io.Writer) int {
3734
return 0
3835
})
3936

4037
wrm.CommandFunc(
41-
"powershell",
42-
"",
38+
winrmtest.MatchText("powershell"),
4339
func(out, err io.Writer) int {
4440
return 0
4541
})

0 commit comments

Comments
 (0)