view tests/test-push-validation.t @ 16482:a5d359b3927a stable

tests: remove test-pull-pull-corruption2.t This test gave random failures on slow machines (solaris). The test was added in 6f6e210b38cf as a test case from issue148. It did however require manual setup: The attached script creates such a corruption (you have to add a "import time; time.spleep(3)" in localrepo.addchangegroup before the changegroup manifest are written for example. The test as it is has thus no value as automatic test case. The necessary sleep could be added by a hook, but test-pending.t already tests that.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 23 Apr 2012 01:39:26 +0200
parents 9910f60a37ee
children f2719b387380
line wrap: on
line source

  $ hg init test
  $ cd test

  $ cat > .hg/hgrc <<EOF
  > [server]
  > validate=1
  > EOF

  $ echo alpha > alpha
  $ echo beta > beta
  $ hg addr
  adding alpha
  adding beta
  $ hg ci -m 1

  $ cd ..
  $ hg clone test test-clone
  updating to branch default
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ cd test-clone
  $ cp .hg/store/data/beta.i tmp
  $ echo blah >> beta
  $ hg ci -m '2 (corrupt)'
  $ mv tmp .hg/store/data/beta.i

Expected to fail:

  $ hg verify
  checking changesets
  checking manifests
  crosschecking files in changesets and manifests
  checking files
   beta@1: dddc47b3ba30 in manifests not found
  2 files, 2 changesets, 2 total revisions
  1 integrity errors encountered!
  (first damaged changeset appears to be 1)
  [1]

Expected to fail:

  $ hg push
  pushing to $TESTTMP/test (glob)
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  transaction abort!
  rollback completed
  abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
  [255]