##// END OF EJS Templates
tests: test using both versions of SSH protocol...
Gregory Szorc -
r36235:1ee1a42b default
parent child Browse files
Show More
@@ -1,3 +1,13 b''
1 #testcases sshv1 sshv2
2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
9 #endif
10
1 Test exchange of common information using bundle2
11 Test exchange of common information using bundle2
2
12
3
13
@@ -1,3 +1,13 b''
1 #testcases sshv1 sshv2
2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
9 #endif
10
1 $ cat > bundle2.py << EOF
11 $ cat > bundle2.py << EOF
2 > """A small extension to test bundle2 pushback parts.
12 > """A small extension to test bundle2 pushback parts.
3 > Current bundle2 implementation doesn't provide a way to generate those
13 > Current bundle2 implementation doesn't provide a way to generate those
@@ -1,5 +1,15 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 #testcases sshv1 sshv2
4
5 #if sshv2
6 $ cat >> $HGRCPATH << EOF
7 > [experimental]
8 > sshpeer.advertise-v2 = true
9 > sshserver.support-v2 = true
10 > EOF
11 #endif
12
3 Create an extension to test bundle2 remote-changegroup parts
13 Create an extension to test bundle2 remote-changegroup parts
4
14
5 $ cat > bundle2.py << EOF
15 $ cat > bundle2.py << EOF
@@ -1,3 +1,13 b''
1 #testcases sshv1 sshv2
2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
9 #endif
10
1 Prepare repo a:
11 Prepare repo a:
2
12
3 $ hg init a
13 $ hg init a
@@ -1142,12 +1152,14 b' SEC: check for unsafe ssh url'
1142 #if windows
1152 #if windows
1143 $ hg clone "ssh://%26touch%20owned%20/" --debug
1153 $ hg clone "ssh://%26touch%20owned%20/" --debug
1144 running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio"
1154 running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio"
1155 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
1145 sending hello command
1156 sending hello command
1146 sending between command
1157 sending between command
1147 abort: no suitable response from remote hg!
1158 abort: no suitable response from remote hg!
1148 [255]
1159 [255]
1149 $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug
1160 $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug
1150 running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio"
1161 running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio"
1162 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
1151 sending hello command
1163 sending hello command
1152 sending between command
1164 sending between command
1153 abort: no suitable response from remote hg!
1165 abort: no suitable response from remote hg!
@@ -1155,12 +1167,14 b' SEC: check for unsafe ssh url'
1155 #else
1167 #else
1156 $ hg clone "ssh://%3btouch%20owned%20/" --debug
1168 $ hg clone "ssh://%3btouch%20owned%20/" --debug
1157 running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio'
1169 running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio'
1170 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
1158 sending hello command
1171 sending hello command
1159 sending between command
1172 sending between command
1160 abort: no suitable response from remote hg!
1173 abort: no suitable response from remote hg!
1161 [255]
1174 [255]
1162 $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug
1175 $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug
1163 running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio'
1176 running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio'
1177 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
1164 sending hello command
1178 sending hello command
1165 sending between command
1179 sending between command
1166 abort: no suitable response from remote hg!
1180 abort: no suitable response from remote hg!
@@ -1169,6 +1183,7 b' SEC: check for unsafe ssh url'
1169
1183
1170 $ hg clone "ssh://v-alid.example.com/" --debug
1184 $ hg clone "ssh://v-alid.example.com/" --debug
1171 running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re)
1185 running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re)
1186 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
1172 sending hello command
1187 sending hello command
1173 sending between command
1188 sending between command
1174 abort: no suitable response from remote hg!
1189 abort: no suitable response from remote hg!
@@ -1,3 +1,13 b''
1 #testcases sshv1 sshv2
2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
9 #endif
10
1 This file contains testcases that tend to be related to the wire protocol part
11 This file contains testcases that tend to be related to the wire protocol part
2 of largefiles.
12 of largefiles.
3
13
@@ -1,5 +1,15 b''
1 #require serve
1 #require serve
2
2
3 #testcases sshv1 sshv2
4
5 #if sshv2
6 $ cat >> $HGRCPATH << EOF
7 > [experimental]
8 > sshpeer.advertise-v2 = true
9 > sshserver.support-v2 = true
10 > EOF
11 #endif
12
3 $ hg init test
13 $ hg init test
4 $ cd test
14 $ cd test
5
15
@@ -1,6 +1,16 b''
1 This test is a duplicate of 'test-http.t' feel free to factor out
1 This test is a duplicate of 'test-http.t' feel free to factor out
2 parts that are not bundle1/bundle2 specific.
2 parts that are not bundle1/bundle2 specific.
3
3
4 #testcases sshv1 sshv2
5
6 #if sshv2
7 $ cat >> $HGRCPATH << EOF
8 > [experimental]
9 > sshpeer.advertise-v2 = true
10 > sshserver.support-v2 = true
11 > EOF
12 #endif
13
4 $ cat << EOF >> $HGRCPATH
14 $ cat << EOF >> $HGRCPATH
5 > [devel]
15 > [devel]
6 > # This test is dedicated to interaction through old bundle
16 > # This test is dedicated to interaction through old bundle
@@ -465,11 +475,13 b' debug output'
465 $ hg pull --debug ssh://user@dummy/remote
475 $ hg pull --debug ssh://user@dummy/remote
466 pulling from ssh://user@dummy/remote
476 pulling from ssh://user@dummy/remote
467 running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re)
477 running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re)
478 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
468 sending hello command
479 sending hello command
469 sending between command
480 sending between command
470 remote: 384
481 protocol upgraded to exp-ssh-v2-0001 (sshv2 !)
482 remote: 384 (sshv1 !)
471 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
483 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
472 remote: 1
484 remote: 1 (sshv1 !)
473 preparing listkeys for "bookmarks"
485 preparing listkeys for "bookmarks"
474 sending listkeys command
486 sending listkeys command
475 received listkey for "bookmarks": 45 bytes
487 received listkey for "bookmarks": 45 bytes
@@ -1,5 +1,15 b''
1 This test tries to exercise the ssh functionality with a dummy script
1 This test tries to exercise the ssh functionality with a dummy script
2
2
3 #testcases sshv1 sshv2
4
5 #if sshv2
6 $ cat >> $HGRCPATH << EOF
7 > [experimental]
8 > sshpeer.advertise-v2 = true
9 > sshserver.support-v2 = true
10 > EOF
11 #endif
12
3 creating 'remote' repo
13 creating 'remote' repo
4
14
5 $ hg init remote
15 $ hg init remote
@@ -1,3 +1,12 b''
1 #testcases sshv1 sshv2
2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
9 #endif
1
10
2 This test tries to exercise the ssh functionality with a dummy script
11 This test tries to exercise the ssh functionality with a dummy script
3
12
@@ -481,14 +490,16 b' debug output'
481 $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes
490 $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes
482 pulling from ssh://user@dummy/remote
491 pulling from ssh://user@dummy/remote
483 running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re)
492 running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re)
493 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
484 devel-peer-request: hello
494 devel-peer-request: hello
485 sending hello command
495 sending hello command
486 devel-peer-request: between
496 devel-peer-request: between
487 devel-peer-request: pairs: 81 bytes
497 devel-peer-request: pairs: 81 bytes
488 sending between command
498 sending between command
489 remote: 384
499 remote: 384 (sshv1 !)
500 protocol upgraded to exp-ssh-v2-0001 (sshv2 !)
490 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
501 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
491 remote: 1
502 remote: 1 (sshv1 !)
492 query 1; heads
503 query 1; heads
493 devel-peer-request: batch
504 devel-peer-request: batch
494 devel-peer-request: cmds: 141 bytes
505 devel-peer-request: cmds: 141 bytes
General Comments 0
You need to be logged in to leave comments. Login now