comparison tests/test-simple4server.t @ 881:380aa41a53a5

export: add test for simple4server We now officially test it over http
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 10 Mar 2014 19:47:24 -0700
parents
children 48804a8d7472
comparison
equal deleted inserted replaced
880:7fe06f32d1ad 881:380aa41a53a5
1
2 $ cat >> $HGRCPATH <<EOF
3 > [defaults]
4 > amend=-d "0 0"
5 > [web]
6 > push_ssl = false
7 > allow_push = *
8 > [phases]
9 > publish = False
10 > [extensions]
11 > hgext.rebase=
12 > EOF
13
14 $ mkcommit() {
15 > echo "$1" > "$1"
16 > hg add "$1"
17 > hg ci -m "add $1"
18 > }
19
20 setup repo
21
22 $ hg init server
23 $ echo "[extensions]" >> ./server/.hg/hgrc
24 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/simple4server.py" >> ./server/.hg/hgrc
25 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
26 $ cat hg.pid >> $DAEMON_PIDS
27
28 $ hg clone http://localhost:$HGPORT/ client
29 no changes found
30 updating to branch default
31 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 $ echo "[extensions]" >> ./client/.hg/hgrc
33 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> ./client/.hg/hgrc
34 $ cp -r client other
35
36 Smoke testing
37 ===============
38
39 $ cd client
40 $ mkcommit 0
41 $ mkcommit a
42 $ hg push
43 pushing to http://localhost:$HGPORT/
44 searching for changes
45 remote: adding changesets
46 remote: adding manifests
47 remote: adding file changes
48 remote: added 2 changesets with 2 changes to 2 files
49 $ hg pull
50 pulling from http://localhost:$HGPORT/
51 searching for changes
52 no changes found
53 OBSEXC: pull obsolescence markers
54 OBSEXC: looking for common markers in 2 nodes
55 OBSEXC: no unknown remote markers
56 OBSEXC: DONE
57 $ hg pull -R ../other
58 pulling from http://localhost:$HGPORT/
59 requesting all changes
60 adding changesets
61 adding manifests
62 adding file changes
63 added 2 changesets with 2 changes to 2 files
64 OBSEXC: pull obsolescence markers
65 OBSEXC: looking for common markers in 2 nodes
66 OBSEXC: no unknown remote markers
67 OBSEXC: DONE
68 (run 'hg update' to get a working copy)
69 $ hg push -R ../other
70 pushing to http://localhost:$HGPORT/
71 searching for changes
72 no changes found
73 [1]
74
75 Capacity testing
76 ===================
77
78 $ curl --silent http://localhost:$HGPORT/?cmd=hello
79 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0
80 $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
81 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 (no-eol)
82
83 $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces"
84 bookmarks
85 phases
86 namespaces
87 obsolete (no-eol)
88
89 Push
90 =============
91
92 $ echo 'A' > a
93 $ hg amend
94 $ hg push
95 pushing to http://localhost:$HGPORT/
96 searching for changes
97 remote: adding changesets
98 remote: adding manifests
99 remote: adding file changes
100 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
101 OBSEXC: computing relevant nodes
102 OBSEXC: looking for common markers in 2 nodes
103 OBSEXC: computing markers relevant to 1 nodes
104 OBSEXC: writing 2 markers
105 OBSEXC: pushing 171 bytes
106 OBSEXC: DONE
107 $ hg push
108 pushing to http://localhost:$HGPORT/
109 searching for changes
110 no changes found
111 OBSEXC: computing relevant nodes
112 OBSEXC: looking for common markers in [23] nodes (re)
113 OBSEXC: markers already in sync
114 OBSEXC: no marker to push
115 OBSEXC: DONE
116 [1]
117
118 Pull
119 =============
120
121 $ hg -R ../other pull
122 pulling from http://localhost:$HGPORT/
123 searching for changes
124 adding changesets
125 adding manifests
126 adding file changes
127 added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
128 OBSEXC: pull obsolescence markers
129 OBSEXC: looking for common markers in [23] nodes (re)
130 OBSEXC: merging obsolescence markers (171 bytes)
131 OBSEXC: 2 markers added
132 OBSEXC: DONE
133 (run 'hg heads' to see heads)
134 $ hg -R ../other pull
135 pulling from http://localhost:$HGPORT/
136 searching for changes
137 no changes found
138 OBSEXC: pull obsolescence markers
139 OBSEXC: looking for common markers in [23] nodes (re)
140 OBSEXC: no unknown remote markers
141 OBSEXC: DONE
142