tests/test-simple4server.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Tue, 22 Apr 2014 17:15:05 -0700
changeset 906 24f59f38a202
parent 885 6cb81dbb9516
child 944 b71b563b17de
permissions -rw-r--r--
test: sort output of listkey command The pushkey namespace came as dict key. So they have no defined order. We sort them to stabilize the test.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
  > [defaults]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  > amend=-d "0 0"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  > [web]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  > push_ssl = false
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > allow_push = *
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  > [phases]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  > publish = False
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  > [extensions]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  > hgext.rebase=
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  > EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  $ mkcommit() {
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  >    echo "$1" > "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  >    hg add "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  >    hg ci -m "add $1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  > }
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
setup repo
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  $ hg init server
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  $ echo "[extensions]" >> ./server/.hg/hgrc
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/simple4server.py" >> ./server/.hg/hgrc
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  $ cat hg.pid >> $DAEMON_PIDS
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  $ hg clone http://localhost:$HGPORT/ client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  updating to branch default
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  $ echo "[extensions]" >> ./client/.hg/hgrc
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> ./client/.hg/hgrc
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ cp -r client other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
Smoke testing
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
===============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ cd client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  $ mkcommit 0
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ mkcommit a
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  remote: adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  remote: adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  remote: adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  remote: added 2 changesets with 2 changes to 2 files
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ hg pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  OBSEXC: pull obsolescence markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  OBSEXC: looking for common markers in 2 nodes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  OBSEXC: no unknown remote markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  OBSEXC: DONE
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  $ hg pull -R ../other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  requesting all changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  added 2 changesets with 2 changes to 2 files
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  OBSEXC: pull obsolescence markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  OBSEXC: looking for common markers in 2 nodes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  OBSEXC: no unknown remote markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  OBSEXC: DONE
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  (run 'hg update' to get a working copy)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  $ hg push -R ../other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  [1]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
Capacity testing
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
===================
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  $ curl --silent http://localhost:$HGPORT/?cmd=hello
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    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
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    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)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
    83
  $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
    85
  namespaces	
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
    86
  obsolete	
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  phases	
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
Push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
=============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  $ echo 'A' > a
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  $ hg amend
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  remote: adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  remote: adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  remote: adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  OBSEXC: computing relevant nodes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  OBSEXC: looking for common markers in 2 nodes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  OBSEXC: computing markers relevant to 1 nodes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  OBSEXC: writing 2 markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  OBSEXC: pushing 171 bytes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  OBSEXC: DONE
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  OBSEXC: computing relevant nodes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  OBSEXC: looking for common markers in [23] nodes (re)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   113
  OBSEXC: markers already in sync
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  OBSEXC: no marker to push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  OBSEXC: DONE
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  [1]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   117
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
Pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   119
=============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   121
  $ hg -R ../other pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   123
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   124
  adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   125
  adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
  adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
  added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   128
  OBSEXC: pull obsolescence markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   129
  OBSEXC: looking for common markers in [23] nodes (re)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   130
  OBSEXC: merging obsolescence markers (171 bytes)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   131
  OBSEXC: 2 markers added
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   132
  OBSEXC: DONE
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   133
  (run 'hg heads' to see heads)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   134
  $ hg -R ../other pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   135
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   136
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   137
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   138
  OBSEXC: pull obsolescence markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   139
  OBSEXC: looking for common markers in [23] nodes (re)
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   140
  OBSEXC: no unknown remote markers
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   141
  OBSEXC: DONE
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   142
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   143
  $ cd ..
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   144
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   145
Test disabling obsolete advertisement
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   146
===========================================
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   147
(used by bitbucket to select which repo use evolve)
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   148
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   149
  $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   150
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   151
  namespaces	
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   152
  obsolete	
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   153
  phases	
885
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   154
  $ curl --silent http://localhost:$HGPORT/?cmd=hello
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   155
  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
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   156
  $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   157
  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)
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   158
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   159
  $ echo '[__temporary__]' >> server/.hg/hgrc
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   160
  $ echo 'advertiseobsolete=False' >> server/.hg/hgrc
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   161
  $ $TESTDIR/killdaemons.py
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   162
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   163
  $ cat hg.pid >> $DAEMON_PIDS
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   164
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   165
  $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   166
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   167
  namespaces	
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   168
  phases	
885
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   169
  $ curl --silent http://localhost:$HGPORT/?cmd=hello
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   170
  capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   171
  $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   172
  lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 (no-eol)
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   173
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   174
  $ echo 'advertiseobsolete=True' >> server/.hg/hgrc
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   175
  $ $TESTDIR/killdaemons.py
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   176
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   177
  $ cat hg.pid >> $DAEMON_PIDS
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   178
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   179
  $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   180
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   181
  namespaces	
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   182
  obsolete	
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   183
  phases	
885
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   184
  $ curl --silent http://localhost:$HGPORT/?cmd=hello
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   185
  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
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   186
  $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
6cb81dbb9516 simple4server: update tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 882
diff changeset
   187
  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)