Patchwork [2,of,2] tests: move blackbox testing of tags to test-tags.t

login
register
mail settings
Submitter Gregory Szorc
Date April 13, 2015, 2:52 p.m.
Message ID <ba3299c5538669b7cb7e.1428936724@gps-mbp.local>
Download mbox | patch
Permalink /patch/8629/
State Superseded
Headers show

Comments

Gregory Szorc - April 13, 2015, 2:52 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1428932764 14400
#      Mon Apr 13 09:46:04 2015 -0400
# Node ID ba3299c5538669b7cb7e2392daf9fb9b317a4b9a
# Parent  f8ea787cd2b077ba0c8eb6163cc69cf910842e2e
tests: move blackbox testing of tags to test-tags.t

We're going to refactor tags cache shortly. It is easier to test the
blackbox logging if these tests are in test-tags.t.

Patch

diff --git a/tests/test-blackbox.t b/tests/test-blackbox.t
--- a/tests/test-blackbox.t
+++ b/tests/test-blackbox.t
@@ -111,20 +111,8 @@  backup bundles get logged
   1970/01/01 00:00:00 bob> updated base branch cache in ?.???? seconds (glob)
   1970/01/01 00:00:00 bob> wrote base branch cache with 1 labels and 2 nodes
   1970/01/01 00:00:00 bob> strip tip exited 0 after * seconds (glob)
 
-tags cache gets logged
-  $ hg up tip
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg tag -m 'create test tag' test-tag
-  $ hg tags
-  tip                                3:5b5562c08298
-  test-tag                           2:d02f48003e62
-  $ hg blackbox -l 3
-  1970/01/01 00:00:00 bob> resolved 1 tags cache entries from 1 manifests in ?.???? seconds (glob)
-  1970/01/01 00:00:00 bob> writing tags cache file with 2 heads and 1 tags
-  1970/01/01 00:00:00 bob> tags exited 0 after ?.?? seconds (glob)
-
 extension and python hooks - use the eol extension for a pythonhook
 
   $ echo '[extensions]' >> .hg/hgrc
   $ echo 'eol=' >> .hg/hgrc
diff --git a/tests/test-tags.t b/tests/test-tags.t
--- a/tests/test-tags.t
+++ b/tests/test-tags.t
@@ -1,4 +1,12 @@ 
+setup
+
+  $ cat >> $HGRCPATH << EOF
+  > [extensions]
+  > blackbox=
+  > mock=$TESTDIR/mockblackbox.py
+  > EOF
+
 Helper functions:
 
   $ cacheexists() {
   >   [ -f .hg/cache/tags ] && echo "tag cache exists" || echo "no tag cache"
@@ -81,8 +89,19 @@  And again, but now unable to write tag c
   b9154636be93 tip
   $ chmod 755 .hg
 #endif
 
+Tag cache debug info written to blackbox log
+
+  $ rm -f .hg/cache/tags
+  $ hg identify
+  b9154636be93 tip
+  $ hg blackbox -l 3
+  1970/01/01 00:00:00 bob> resolved 1 tags cache entries from 1 manifests in ?.???? seconds (glob)
+  1970/01/01 00:00:00 bob> writing tags cache file with 1 heads and 1 tags
+  1970/01/01 00:00:00 bob> identify exited 0 after ?.?? seconds (glob)
+
+
 Create a branch:
 
   $ echo bb > a
   $ hg status