##// END OF EJS Templates
tests: easier hg serve error diagnosis
Dirkjan Ochtman -
r6167:f53b9a38 default
parent child Browse files
Show More
@@ -13,53 +13,44 b' cd test2'
13 13 echo a >> a
14 14 hg ci -mb -d '0 0'
15 15
16 req() {
17 hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
18 cat hg.pid >> $DAEMON_PIDS
19 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
20 kill `cat hg.pid`
21 echo % serve errors
22 cat errors.log
23 }
24
16 25 cd ../test
17 26
18 27 echo % expect ssl error
19 hg serve -p $HGPORT -d --pid-file=hg.pid
20 cat hg.pid >> $DAEMON_PIDS
21 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
22 kill `cat hg.pid`
28 req
23 29
24 30 echo % expect authorization error
25 31 echo '[web]' > .hg/hgrc
26 32 echo 'push_ssl = false' >> .hg/hgrc
27 hg serve -p $HGPORT -d --pid-file=hg.pid
28 cat hg.pid >> $DAEMON_PIDS
29 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
30 kill `cat hg.pid`
33 req
31 34
32 35 echo % expect authorization error: must have authorized user
33 36 echo 'allow_push = unperson' >> .hg/hgrc
34 hg serve -p $HGPORT -d --pid-file=hg.pid
35 cat hg.pid >> $DAEMON_PIDS
36 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
37 kill `cat hg.pid`
37 req
38 38
39 39 echo % expect success
40 40 echo 'allow_push = *' >> .hg/hgrc
41 41 echo '[hooks]' >> .hg/hgrc
42 42 echo 'changegroup = python ../printenv.py changegroup 0 ../urls' >> .hg/hgrc
43 hg serve -p $HGPORT -d --pid-file=hg.pid
44 cat hg.pid >> $DAEMON_PIDS
45 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
46 kill `cat hg.pid`
47 hg rollback
43 req
48 44
49 45 cat ../urls
50 46
47 hg rollback
51 48 echo % expect authorization error: all users denied
52 49 echo '[web]' > .hg/hgrc
53 50 echo 'push_ssl = false' >> .hg/hgrc
54 51 echo 'deny_push = *' >> .hg/hgrc
55 hg serve -p $HGPORT -d --pid-file=hg.pid
56 cat hg.pid >> $DAEMON_PIDS
57 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
58 kill `cat hg.pid`
52 req
59 53
60 54 echo % expect authorization error: some users denied, users must be authenticated
61 55 echo 'deny_push = unperson' >> .hg/hgrc
62 hg serve -p $HGPORT -d --pid-file=hg.pid
63 cat hg.pid >> $DAEMON_PIDS
64 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
65 kill `cat hg.pid`
56 req
@@ -4,14 +4,17 b' 1 files updated, 0 files merged, 0 files'
4 4 pushing to http://localhost/
5 5 searching for changes
6 6 ssl required
7 % serve errors
7 8 % expect authorization error
8 9 pushing to http://localhost/
9 10 searching for changes
10 11 push not authorized
12 % serve errors
11 13 % expect authorization error: must have authorized user
12 14 pushing to http://localhost/
13 15 searching for changes
14 16 push not authorized
17 % serve errors
15 18 % expect success
16 19 pushing to http://localhost/
17 20 searching for changes
@@ -19,13 +22,16 b' adding changesets'
19 22 adding manifests
20 23 adding file changes
21 24 added 1 changesets with 1 changes to 1 files
25 % serve errors
26 changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http
22 27 rolling back last transaction
23 changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http
24 28 % expect authorization error: all users denied
25 29 pushing to http://localhost/
26 30 searching for changes
27 31 push not authorized
32 % serve errors
28 33 % expect authorization error: some users denied, users must be authenticated
29 34 pushing to http://localhost/
30 35 searching for changes
31 36 push not authorized
37 % serve errors
General Comments 0
You need to be logged in to leave comments. Login now