##// END OF EJS Templates
tests: remove duplicate inline dummyssh in test-wireproto.t
Matt Mackall -
r25475:c3ecbf69 default
parent child Browse files
Show More
@@ -1,118 +1,105 b''
1 1 #require killdaemons
2 2
3 3 Test wire protocol argument passing
4 4
5 5 Setup repo:
6 6
7 7 $ hg init repo
8 8
9 9 Local:
10 10
11 11 $ hg debugwireargs repo eins zwei --three drei --four vier
12 12 eins zwei drei vier None
13 13 $ hg debugwireargs repo eins zwei --four vier
14 14 eins zwei None vier None
15 15 $ hg debugwireargs repo eins zwei
16 16 eins zwei None None None
17 17 $ hg debugwireargs repo eins zwei --five fuenf
18 18 eins zwei None None fuenf
19 19
20 20 HTTP:
21 21
22 22 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
23 23 $ cat hg1.pid >> $DAEMON_PIDS
24 24
25 25 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
26 26 un deux trois quatre None
27 27 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
28 28 un deux trois qu atre None
29 29 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
30 30 eins zwei None vier None
31 31 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
32 32 eins zwei None None None
33 33 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
34 34 eins zwei None None None
35 35 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
37 37 $ cat error.log
38 38 $ cat access.log
39 39 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
40 40 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
41 41 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
42 42 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
43 43 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
44 44 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
45 45 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
46 46 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
47 47 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
48 48 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
49 49 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
50 50 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
51 51 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
52 52 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
53 53 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
54 54 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
55 55 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
57 57
58 58 HTTP without the httpheader capability:
59 59
60 60 $ HGRCPATH="`pwd`/repo/.hgrc"
61 61 $ export HGRCPATH
62 62 $ CAP=httpheader
63 63 $ . "$TESTDIR/notcapable"
64 64
65 65 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
66 66 $ cat hg2.pid >> $DAEMON_PIDS
67 67
68 68 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
69 69 un deux trois quatre None
70 70 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
71 71 eins zwei None vier None
72 72 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
73 73 eins zwei None None None
74 74 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
75 75 eins zwei None None None
76 76 $ cat error2.log
77 77 $ cat access2.log
78 78 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
79 79 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
80 80 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
81 81 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
82 82 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
83 83 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
84 84 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
85 85 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
86 86 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
87 87 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
88 88 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
89 89 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
90 90
91 91 SSH (try to exercise the ssh functionality with a dummy script):
92 92
93 $ cat <<EOF > dummyssh
94 > import sys
95 > import os
96 > os.chdir(os.path.dirname(sys.argv[0]))
97 > if sys.argv[1] != "user@dummy":
98 > sys.exit(-1)
99 > if not os.path.exists("dummyssh"):
100 > sys.exit(-1)
101 > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
102 > r = os.system(sys.argv[2])
103 > sys.exit(bool(r))
104 > EOF
105
106 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo uno due tre quattro
93 $ hg debugwireargs --ssh dummyssh ssh://user@dummy/repo uno due tre quattro
107 94 uno due tre quattro None
108 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --four vier
95 $ hg debugwireargs --ssh dummyssh ssh://user@dummy/repo eins zwei --four vier
109 96 eins zwei None vier None
110 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei
97 $ hg debugwireargs --ssh dummyssh ssh://user@dummy/repo eins zwei
111 98 eins zwei None None None
112 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
99 $ hg debugwireargs --ssh dummyssh ssh://user@dummy/repo eins zwei --five fuenf
113 100 eins zwei None None None
114 101
115 102 Explicitly kill daemons to let the test exit on Windows
116 103
117 104 $ killdaemons.py
118 105
General Comments 0
You need to be logged in to leave comments. Login now