Show More
@@ -0,0 +1,51 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | hg init test | |||
|
4 | cd test | |||
|
5 | echo a > a | |||
|
6 | hg ci -Ama | |||
|
7 | ||||
|
8 | cd .. | |||
|
9 | hg clone test test2 | |||
|
10 | cd test2 | |||
|
11 | echo a >> a | |||
|
12 | hg ci -mb | |||
|
13 | ||||
|
14 | cd ../test | |||
|
15 | ||||
|
16 | echo % expect ssl error | |||
|
17 | hg serve -p 20059 -d --pid-file=hg.pid | |||
|
18 | hg --cwd ../test2 push http://localhost:20059/ | |||
|
19 | kill `cat hg.pid` | |||
|
20 | ||||
|
21 | echo % expect authorization error | |||
|
22 | echo '[web]' > .hg/hgrc | |||
|
23 | echo 'push_ssl = false' >> .hg/hgrc | |||
|
24 | hg serve -p 20059 -d --pid-file=hg.pid | |||
|
25 | hg --cwd ../test2 push http://localhost:20059/ | |||
|
26 | kill `cat hg.pid` | |||
|
27 | ||||
|
28 | echo % expect authorization error: must have authorized user | |||
|
29 | echo 'allow_push = unperson' >> .hg/hgrc | |||
|
30 | hg serve -p 20059 -d --pid-file=hg.pid | |||
|
31 | hg --cwd ../test2 push http://localhost:20059/ | |||
|
32 | kill `cat hg.pid` | |||
|
33 | ||||
|
34 | echo % expect success | |||
|
35 | echo 'allow_push = *' >> .hg/hgrc | |||
|
36 | hg serve -p 20059 -d --pid-file=hg.pid | |||
|
37 | hg --cwd ../test2 push http://localhost:20059/ | |||
|
38 | kill `cat hg.pid` | |||
|
39 | hg rollback | |||
|
40 | ||||
|
41 | echo % expect authorization error: all users denied | |||
|
42 | echo 'deny_push = *' >> .hg/hgrc | |||
|
43 | hg serve -p 20059 -d --pid-file=hg.pid | |||
|
44 | hg --cwd ../test2 push http://localhost:20059/ | |||
|
45 | kill `cat hg.pid` | |||
|
46 | ||||
|
47 | echo % expect authorization error: some users denied, users must be authenticated | |||
|
48 | echo 'deny_push = unperson' >> .hg/hgrc | |||
|
49 | hg serve -p 20059 -d --pid-file=hg.pid | |||
|
50 | hg --cwd ../test2 push http://localhost:20059/ | |||
|
51 | kill `cat hg.pid` |
@@ -0,0 +1,30 b'' | |||||
|
1 | adding a | |||
|
2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
3 | % expect ssl error | |||
|
4 | pushing to http://localhost:20059/ | |||
|
5 | searching for changes | |||
|
6 | ssl required | |||
|
7 | % expect authorization error | |||
|
8 | pushing to http://localhost:20059/ | |||
|
9 | searching for changes | |||
|
10 | push not authorized | |||
|
11 | % expect authorization error: must have authorized user | |||
|
12 | pushing to http://localhost:20059/ | |||
|
13 | searching for changes | |||
|
14 | push not authorized | |||
|
15 | % expect success | |||
|
16 | pushing to http://localhost:20059/ | |||
|
17 | searching for changes | |||
|
18 | adding changesets | |||
|
19 | adding manifests | |||
|
20 | adding file changes | |||
|
21 | added 1 changesets with 1 changes to 1 files | |||
|
22 | rolling back last transaction | |||
|
23 | % expect authorization error: all users denied | |||
|
24 | pushing to http://localhost:20059/ | |||
|
25 | searching for changes | |||
|
26 | push not authorized | |||
|
27 | % expect authorization error: some users denied, users must be authenticated | |||
|
28 | pushing to http://localhost:20059/ | |||
|
29 | searching for changes | |||
|
30 | push not authorized |
General Comments 0
You need to be logged in to leave comments.
Login now