##// END OF EJS Templates
tests: extract HTTP permissions tests to own test file...
Gregory Szorc -
r36769:2c647da8 stable
parent child Browse files
Show More
@@ -0,0 +1,52 b''
1 #require killdaemons
2
3 $ hg init test
4 $ cd test
5 $ echo a > a
6 $ hg ci -Ama
7 adding a
8 $ cd ..
9 $ hg clone test test2
10 updating to branch default
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 $ cd test2
13 $ echo a >> a
14 $ hg ci -mb
15 $ cd ../test
16
17 expect authorization error: all users denied
18
19 $ cat > .hg/hgrc <<EOF
20 > [web]
21 > push_ssl = false
22 > deny_push = *
23 > EOF
24
25 $ hg serve -p $HGPORT -d --pid-file hg.pid
26 $ cat hg.pid > $DAEMON_PIDS
27
28 $ hg --cwd ../test2 push http://localhost:$HGPORT/
29 pushing to http://localhost:$HGPORT/
30 searching for changes
31 abort: authorization failed
32 [255]
33
34 $ killdaemons.py
35
36 expect authorization error: some users denied, users must be authenticated
37
38 $ cat > .hg/hgrc <<EOF
39 > [web]
40 > push_ssl = false
41 > deny_push = unperson
42 > EOF
43
44 $ hg serve -p $HGPORT -d --pid-file hg.pid
45 $ cat hg.pid > $DAEMON_PIDS
46 $ hg --cwd ../test2 push http://localhost:$HGPORT/
47 pushing to http://localhost:$HGPORT/
48 searching for changes
49 abort: authorization failed
50 [255]
51
52 $ killdaemons.py
@@ -307,28 +307,6 b' Make phases updates work'
307 $ hg --config extensions.strip= strip -r 1:
307 $ hg --config extensions.strip= strip -r 1:
308 saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg
308 saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg
309
309
310 expect authorization error: all users denied
311
312 $ echo '[web]' > .hg/hgrc
313 $ echo 'push_ssl = false' >> .hg/hgrc
314 $ echo 'deny_push = *' >> .hg/hgrc
315 $ req
316 pushing to http://localhost:$HGPORT/
317 searching for changes
318 abort: authorization failed
319 % serve errors
320 [255]
321
322 expect authorization error: some users denied, users must be authenticated
323
324 $ echo 'deny_push = unperson' >> .hg/hgrc
325 $ req
326 pushing to http://localhost:$HGPORT/
327 searching for changes
328 abort: authorization failed
329 % serve errors
330 [255]
331
332 #if bundle2
310 #if bundle2
333
311
334 $ cat > .hg/hgrc <<EOF
312 $ cat > .hg/hgrc <<EOF
General Comments 0
You need to be logged in to leave comments. Login now