Mercurial > hg
comparison tests/test-ssh-proto.t @ 35938:80a2b8ae42a1
sshpeer: move handshake outside of sshpeer
With the handshake now performed before a peer class is instantiated,
we can now instantiate a different peer class depending on the results
of the handshake.
Our test extension had to change to cope with the new API. Because
we now issue the command via raw I/O calls and don't call
_callstream(), we no longer have to register the fake command.
(_callstream() uses the command registration to see what args to
send).
Differential Revision: https://phab.mercurial-scm.org/D2034
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 05 Feb 2018 09:14:32 -0800 |
parents | 83d67257ba90 |
children | 556218e08e25 |
comparison
equal
deleted
inserted
replaced
35937:a9cffd14aa04 | 35938:80a2b8ae42a1 |
---|---|
144 1 | 144 1 |
145 | 145 |
146 | 146 |
147 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server | 147 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server |
148 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) | 148 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) |
149 devel-peer-request: no-args | |
150 sending no-args command | 149 sending no-args command |
151 devel-peer-request: hello | 150 devel-peer-request: hello |
152 sending hello command | 151 sending hello command |
153 devel-peer-request: between | 152 devel-peer-request: between |
154 devel-peer-request: pairs: 81 bytes | 153 devel-peer-request: pairs: 81 bytes |
180 1 | 179 1 |
181 | 180 |
182 | 181 |
183 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server | 182 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server |
184 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) | 183 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) |
185 devel-peer-request: unknown1 | |
186 sending unknown1 command | 184 sending unknown1 command |
187 devel-peer-request: unknown2 | |
188 sending unknown2 command | 185 sending unknown2 command |
189 devel-peer-request: unknown3 | |
190 sending unknown3 command | 186 sending unknown3 command |
191 devel-peer-request: hello | 187 devel-peer-request: hello |
192 sending hello command | 188 sending hello command |
193 devel-peer-request: between | 189 devel-peer-request: between |
194 devel-peer-request: pairs: 81 bytes | 190 devel-peer-request: pairs: 81 bytes |