diff --git a/communicator/winrm/communicator_test.go b/communicator/winrm/communicator_test.go index ff0e95309..5f71f34dd 100644 --- a/communicator/winrm/communicator_test.go +++ b/communicator/winrm/communicator_test.go @@ -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 })