changeset 35272:ae79d878702b

bookmark: introduce in advance a variant of the exchange test We are about to introduce a new way to push bookmark to server. We introduce the test variant before actually updating the exchange to help the output changes to stand out when it happens.
author Boris Feld <boris.feld@octobus.net>
date Tue, 17 Oct 2017 12:37:39 +0200
parents 3fd5f05a5b87
children a1e70c1dbec0
files tests/test-bookmarks-pushpull.t
diffstat 1 files changed, 168 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bookmarks-pushpull.t	Sun Oct 15 19:22:56 2017 +0200
+++ b/tests/test-bookmarks-pushpull.t	Tue Oct 17 12:37:39 2017 +0200
@@ -1,3 +1,4 @@
+#testcases b2-pushkey b2-binary
 #require serve
 
   $ cat << EOF >> $HGRCPATH
@@ -103,6 +104,9 @@
 delete a remote bookmark
 
   $ hg book -d W
+
+#if b2-pushkey
+
   $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes
   pushing to ../a
   query 1; heads
@@ -212,6 +216,120 @@
   listing keys for "phases"
   [1]
 
+#endif
+#if b2-binary
+
+  $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes
+  pushing to ../a
+  query 1; heads
+  searching for changes
+  all remote heads known locally
+  listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
+  no changes found
+  bundle2-output-bundle: "HG20", 4 parts total
+  bundle2-output: start emission of HG20 stream
+  bundle2-output: bundle parameter: 
+  bundle2-output: start of parts
+  bundle2-output: bundle part: "replycaps"
+  bundle2-output-part: "replycaps" 195 bytes payload
+  bundle2-output: part 0: "REPLYCAPS"
+  bundle2-output: header chunk size: 16
+  bundle2-output: payload chunk size: 195
+  bundle2-output: closing payload chunk
+  bundle2-output: bundle part: "check:bookmarks"
+  bundle2-output-part: "check:bookmarks" 23 bytes payload
+  bundle2-output: part 1: "CHECK:BOOKMARKS"
+  bundle2-output: header chunk size: 22
+  bundle2-output: payload chunk size: 23
+  bundle2-output: closing payload chunk
+  bundle2-output: bundle part: "check:phases"
+  bundle2-output-part: "check:phases" 48 bytes payload
+  bundle2-output: part 2: "CHECK:PHASES"
+  bundle2-output: header chunk size: 19
+  bundle2-output: payload chunk size: 48
+  bundle2-output: closing payload chunk
+  bundle2-output: bundle part: "pushkey"
+  bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload
+  bundle2-output: part 3: "PUSHKEY"
+  bundle2-output: header chunk size: 90
+  bundle2-output: closing payload chunk
+  bundle2-output: end of bundle
+  bundle2-input: start processing of HG20 stream
+  bundle2-input: reading bundle2 stream parameters
+  bundle2-input-bundle: with-transaction
+  bundle2-input: start extraction of bundle2 parts
+  bundle2-input: part header size: 16
+  bundle2-input: part type: "REPLYCAPS"
+  bundle2-input: part id: "0"
+  bundle2-input: part parameters: 0
+  bundle2-input: found a handler for part replycaps
+  bundle2-input-part: "replycaps" supported
+  bundle2-input: payload chunk size: 195
+  bundle2-input: payload chunk size: 0
+  bundle2-input-part: total payload size 195
+  bundle2-input: part header size: 22
+  bundle2-input: part type: "CHECK:BOOKMARKS"
+  bundle2-input: part id: "1"
+  bundle2-input: part parameters: 0
+  bundle2-input: found a handler for part check:bookmarks
+  bundle2-input-part: "check:bookmarks" supported
+  bundle2-input: payload chunk size: 23
+  bundle2-input: payload chunk size: 0
+  bundle2-input-part: total payload size 23
+  bundle2-input: part header size: 19
+  bundle2-input: part type: "CHECK:PHASES"
+  bundle2-input: part id: "2"
+  bundle2-input: part parameters: 0
+  bundle2-input: found a handler for part check:phases
+  bundle2-input-part: "check:phases" supported
+  bundle2-input: payload chunk size: 48
+  bundle2-input: payload chunk size: 0
+  bundle2-input-part: total payload size 48
+  bundle2-input: part header size: 90
+  bundle2-input: part type: "PUSHKEY"
+  bundle2-input: part id: "3"
+  bundle2-input: part parameters: 4
+  bundle2-input: found a handler for part pushkey
+  bundle2-input-part: "pushkey" (params: 4 mandatory) supported
+  pushing key for "bookmarks:W"
+  bundle2-input: payload chunk size: 0
+  bundle2-input: part header size: 0
+  bundle2-input: end of bundle2 stream
+  bundle2-input-bundle: 3 parts total
+  running hook txnclose-bookmark.test: sh $TESTTMP/hook.sh
+  test-hook-bookmark: W:  0000000000000000000000000000000000000000 -> 
+  bundle2-output-bundle: "HG20", 1 parts total
+  bundle2-output: start emission of HG20 stream
+  bundle2-output: bundle parameter: 
+  bundle2-output: start of parts
+  bundle2-output: bundle part: "reply:pushkey"
+  bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
+  bundle2-output: part 0: "REPLY:PUSHKEY"
+  bundle2-output: header chunk size: 43
+  bundle2-output: closing payload chunk
+  bundle2-output: end of bundle
+  bundle2-input: start processing of HG20 stream
+  bundle2-input: reading bundle2 stream parameters
+  bundle2-input-bundle: no-transaction
+  bundle2-input: start extraction of bundle2 parts
+  bundle2-input: part header size: 43
+  bundle2-input: part type: "REPLY:PUSHKEY"
+  bundle2-input: part id: "0"
+  bundle2-input: part parameters: 2
+  bundle2-input: found a handler for part reply:pushkey
+  bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
+  bundle2-input: payload chunk size: 0
+  bundle2-input: part header size: 0
+  bundle2-input: end of bundle2 stream
+  bundle2-input-bundle: 0 parts total
+  deleting remote bookmark W
+  listing keys for "phases"
+  [1]
+
+#endif
+
 export the active bookmark
 
   $ hg bookmark V
@@ -953,6 +1071,8 @@
 Local push
 ----------
 
+#if b2-pushkey
+
   $ hg push -B @ local
   pushing to $TESTTMP/issue4455-dest (glob)
   searching for changes
@@ -960,12 +1080,28 @@
   pushkey-abort: prepushkey hook exited with status 1
   abort: exporting bookmark @ failed!
   [255]
+
+#endif
+#if b2-binary
+
+  $ hg push -B @ local
+  pushing to $TESTTMP/issue4455-dest (glob)
+  searching for changes
+  no changes found
+  pushkey-abort: prepushkey hook exited with status 1
+  abort: exporting bookmark @ failed!
+  [255]
+
+#endif
+
   $ hg -R ../issue4455-dest/ bookmarks
   no bookmarks set
 
 Using ssh
 ---------
 
+#if b2-pushkey
+
   $ hg push -B @ ssh # bundle2+
   pushing to ssh://user@dummy/issue4455-dest
   searching for changes
@@ -973,6 +1109,7 @@
   remote: pushkey-abort: prepushkey hook exited with status 1
   abort: exporting bookmark @ failed!
   [255]
+
   $ hg -R ../issue4455-dest/ bookmarks
   no bookmarks set
 
@@ -983,12 +1120,27 @@
   remote: pushkey-abort: prepushkey hook exited with status 1
   exporting bookmark @ failed!
   [1]
+
+#endif
+#if b2-binary
+
+  $ hg push -B @ ssh # bundle2+
+  pushing to ssh://user@dummy/issue4455-dest
+  searching for changes
+  no changes found
+  remote: pushkey-abort: prepushkey hook exited with status 1
+  abort: exporting bookmark @ failed!
+  [255]
+
+#endif
+
   $ hg -R ../issue4455-dest/ bookmarks
   no bookmarks set
 
 Using http
 ----------
 
+#if b2-pushkey
   $ hg push -B @ http # bundle2+
   pushing to http://localhost:$HGPORT/
   searching for changes
@@ -996,6 +1148,7 @@
   remote: pushkey-abort: prepushkey hook exited with status 1
   abort: exporting bookmark @ failed!
   [255]
+
   $ hg -R ../issue4455-dest/ bookmarks
   no bookmarks set
 
@@ -1006,5 +1159,20 @@
   remote: pushkey-abort: prepushkey hook exited with status 1
   exporting bookmark @ failed!
   [1]
+
+#endif
+
+#if b2-binary
+
+  $ hg push -B @ ssh # bundle2+
+  pushing to ssh://user@dummy/issue4455-dest
+  searching for changes
+  no changes found
+  remote: pushkey-abort: prepushkey hook exited with status 1
+  abort: exporting bookmark @ failed!
+  [255]
+
+#endif
+
   $ hg -R ../issue4455-dest/ bookmarks
   no bookmarks set