##// END OF EJS Templates
tests: consolidate test-push-http.t and test-push-http-bundle1.t...
Gregory Szorc -
r36319:47728063 stable
parent child Browse files
Show More
@@ -1,5 +1,15 b''
1 1 #require killdaemons
2 2
3 #testcases bundle1 bundle2
4
5 #if bundle1
6 $ cat << EOF >> $HGRCPATH
7 > [devel]
8 > # This test is dedicated to interaction through old bundle
9 > legacy.exchange = bundle1
10 > EOF
11 #endif
12
3 13 $ hg init test
4 14 $ cd test
5 15 $ echo a > a
@@ -76,7 +86,8 b' expect success'
76 86 remote: added 1 changesets with 1 changes to 1 files
77 87 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
78 88 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
79 remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob)
89 remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !)
90 remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !)
80 91 % serve errors
81 92 $ hg rollback
82 93 repository tip rolled back to revision 0 (undo serve)
@@ -94,7 +105,8 b' expect success, server lacks the httphea'
94 105 remote: added 1 changesets with 1 changes to 1 files
95 106 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
96 107 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
97 remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob)
108 remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !)
109 remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !)
98 110 % serve errors
99 111 $ hg rollback
100 112 repository tip rolled back to revision 0 (undo serve)
@@ -112,7 +124,8 b' expect success, server lacks the unbundl'
112 124 remote: added 1 changesets with 1 changes to 1 files
113 125 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
114 126 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
115 remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob)
127 remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !)
128 remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !)
116 129 % serve errors
117 130 $ hg rollback
118 131 repository tip rolled back to revision 0 (undo serve)
@@ -160,6 +173,22 b' expect push success, phase change failur'
160 173 > [devel]
161 174 > legacy.exchange=phases
162 175 > EOF
176
177 #if bundle1
178
179 $ req
180 pushing to http://localhost:$HGPORT/
181 searching for changes
182 remote: adding changesets
183 remote: adding manifests
184 remote: adding file changes
185 remote: added 1 changesets with 1 changes to 1 files
186 % serve errors
187
188 #endif
189
190 #if bundle2
191
163 192 $ req
164 193 pushing to http://localhost:$HGPORT/
165 194 searching for changes
@@ -175,13 +204,32 b' expect push success, phase change failur'
175 204 % serve errors
176 205 [255]
177 206
207 #endif
208
178 209 expect phase change success
179 210
180 211 $ cat >> .hg/hgrc <<EOF
212 > [hooks]
181 213 > prepushkey = sh -c "printenv.py prepushkey 0"
182 214 > [devel]
183 215 > legacy.exchange=
184 216 > EOF
217
218 #if bundle1
219
220 $ req
221 pushing to http://localhost:$HGPORT/
222 searching for changes
223 no changes found
224 % serve errors
225 [1]
226 $ hg rollback
227 repository tip rolled back to revision 0 (undo serve)
228
229 #endif
230
231 #if bundle2
232
185 233 $ req
186 234 pushing to http://localhost:$HGPORT/
187 235 searching for changes
@@ -193,6 +241,8 b' expect phase change success'
193 241 $ hg rollback
194 242 repository tip rolled back to revision 0 (undo serve)
195 243
244 #endif
245
196 246 expect authorization error: all users denied
197 247
198 248 $ echo '[web]' > .hg/hgrc
@@ -215,6 +265,8 b' expect authorization error: some users d'
215 265 % serve errors
216 266 [255]
217 267
268 #if bundle2
269
218 270 $ cat > .hg/hgrc <<EOF
219 271 > [web]
220 272 > push_ssl = false
@@ -231,4 +283,6 b' expect authorization error: some users d'
231 283 remote: added 1 changesets with 1 changes to 1 files
232 284 % serve errors
233 285
286 #endif
287
234 288 $ cd ..
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now