Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
959efdac
Commit
959efdac
authored
16 years ago
by
Dirkjan Ochtman
Browse files
Options
Downloads
Patches
Plain Diff
tests: add some tests for web.allowpull configurations
parent
44c51574
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test-pull-http
+12
-32
12 additions, 32 deletions
tests/test-pull-http
tests/test-pull-http.out
+12
-0
12 additions, 0 deletions
tests/test-pull-http.out
with
24 additions
and
32 deletions
tests/test-pu
sh
-http
→
tests/test-pu
ll
-http
+
12
−
32
View file @
959efdac
...
@@ -13,6 +13,16 @@
...
@@ -13,6 +13,16 @@
echo
a
>>
a
echo
a
>>
a
hg ci
-mb
-d
'0 0'
hg ci
-mb
-d
'0 0'
echo
% expect error, cloning not allowed
echo
'[web]'
>
.hg/hgrc
echo
'allowpull = false'
>>
.hg/hgrc
hg serve
-p
$HGPORT
-d
--pid-file
=
hg.pid
-E
errors.log
cat
hg.pid
>>
$DAEMON_PIDS
hg clone http://localhost:
$HGPORT
/ test3 |
sed
-e
's,:[0-9][0-9]*/,/,'
kill
`
cat
hg.pid
`
echo
% serve errors
cat
errors.log
req
()
{
req
()
{
hg serve
-p
$HGPORT
-d
--pid-file
=
hg.pid
-E
errors.log
hg serve
-p
$HGPORT
-d
--pid-file
=
hg.pid
-E
errors.log
cat
hg.pid
>>
$DAEMON_PIDS
cat
hg.pid
>>
$DAEMON_PIDS
...
@@ -16,9 +26,9 @@
...
@@ -16,9 +26,9 @@
req
()
{
req
()
{
hg serve
-p
$HGPORT
-d
--pid-file
=
hg.pid
-E
errors.log
hg serve
-p
$HGPORT
-d
--pid-file
=
hg.pid
-E
errors.log
cat
hg.pid
>>
$DAEMON_PIDS
cat
hg.pid
>>
$DAEMON_PIDS
hg
--cwd
../test
2
pu
sh
http://localhost:
$HGPORT
/ |
sed
-e
's,:[0-9][0-9]*/,/,'
hg
--cwd
../test pu
ll
http://localhost:
$HGPORT
/ |
sed
-e
's,:[0-9][0-9]*/,/,'
kill
`
cat
hg.pid
`
kill
`
cat
hg.pid
`
echo
% serve errors
echo
% serve errors
cat
errors.log
cat
errors.log
}
}
...
@@ -20,18 +30,7 @@
...
@@ -20,18 +30,7 @@
kill
`
cat
hg.pid
`
kill
`
cat
hg.pid
`
echo
% serve errors
echo
% serve errors
cat
errors.log
cat
errors.log
}
}
cd
../test
echo
% expect error, pulling not allowed
echo
% expect ssl error
req
echo
% expect authorization error
echo
'[web]'
>
.hg/hgrc
echo
'push_ssl = false'
>>
.hg/hgrc
req
echo
% expect authorization error: must have authorized user
echo
'allow_push = unperson'
>>
.hg/hgrc
req
req
...
@@ -37,20 +36,1 @@
...
@@ -37,20 +36,1 @@
req
req
echo
% expect success
echo
'allow_push = *'
>>
.hg/hgrc
echo
'[hooks]'
>>
.hg/hgrc
echo
'changegroup = python ../printenv.py changegroup 0 ../urls'
>>
.hg/hgrc
req
cat
../urls
hg rollback
echo
% expect authorization error: all
users
denied
echo
'[web]'
>
.hg/hgrc
echo
'push_ssl = false'
>>
.hg/hgrc
echo
'deny_push = *'
>>
.hg/hgrc
req
echo
% expect authorization error: some
users
denied,
users
must be authenticated
echo
'deny_push = unperson'
>>
.hg/hgrc
req
This diff is collapsed.
Click to expand it.
tests/test-pull-http.out
0 → 100644
+
12
−
0
View file @
959efdac
adding a
updating working directory
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
% expect error, cloning not allowed
abort: error:
requesting all changes
% serve errors
% expect error, pulling not allowed
abort: error:
pulling from http://localhost/
searching for changes
% serve errors
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment