changeset 51534:a72ab2ec5315

stream-clone-test: factor some piece of basic clone test out Multiple parts of this case (listing cache, checking error) are common to all cases and don't need to be in the conditionnal block. This simplify the test update.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 28 Feb 2024 22:05:28 +0100
parents 749e7685935a
children b0d08bdc6a60
files tests/test-clone-stream.t
diffstat 1 files changed, 19 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-clone-stream.t	Wed Feb 28 22:01:09 2024 +0100
+++ b/tests/test-clone-stream.t	Wed Feb 28 22:05:28 2024 +0100
@@ -179,6 +179,13 @@
   $ cd ..
 
 Basic clone
+-----------
+
+Check that --stream trigger a stream clone and result in a valid repositoty
+
+We check the associated output for exact bytes on file number as changes in
+these value implies changes in the data transfered and can detect unintended
+changes in the process.
 
 #if stream-legacy
   $ hg clone --stream -U http://localhost:$HGPORT clone1
@@ -189,7 +196,6 @@
   transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
   searching for changes
   no changes found
-  $ cat server/errors.txt
 #endif
 #if stream-bundle2-v2
   $ hg clone --stream -U http://localhost:$HGPORT clone1
@@ -200,7 +206,18 @@
   transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
   1096 files to transfer, 99.0 KB of data (zstd rust !)
   transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
+#endif
 
+#if stream-bundle2-v3
+  $ hg clone --stream -U http://localhost:$HGPORT clone1
+  streaming all changes
+  1093 entries to transfer
+  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
+  transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
+  transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
+#endif
+
+#if no-stream-legacy
   $ ls -1 clone1/.hg/cache
   branch2-base
   branch2-immutable
@@ -212,29 +229,10 @@
   rbc-revs-v1
   tags2
   tags2-served
-  $ cat server/errors.txt
 #endif
-#if stream-bundle2-v3
-  $ hg clone --stream -U http://localhost:$HGPORT clone1
-  streaming all changes
-  1093 entries to transfer
-  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
-  transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
-  transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
 
-  $ ls -1 clone1/.hg/cache
-  branch2-base
-  branch2-immutable
-  branch2-served
-  branch2-served.hidden
-  branch2-visible
-  branch2-visible-hidden
-  rbc-names-v1
-  rbc-revs-v1
-  tags2
-  tags2-served
+  $ hg -R clone1 verify --quiet
   $ cat server/errors.txt
-#endif
 
 getbundle requests with stream=1 are uncompressed