Submitter | Gregory Szorc |
---|---|
Date | Feb. 18, 2018, 6:23 p.m. |
Message ID | <e978e0c132522bde7cd9.1518978184@ubuntu-vm-main> |
Download | mbox | patch |
Permalink | /patch/28116/ |
State | Accepted |
Headers | show |
Comments
On Sun, Feb 18, 2018 at 10:23 AM, Gregory Szorc <gregory.szorc@gmail.com> wrote: > # HG changeset patch > # User Gregory Szorc <gregory.szorc@gmail.com> > # Date 1518972558 28800 > # Sun Feb 18 08:49:18 2018 -0800 > # Branch stable > # Node ID e978e0c132522bde7cd922a250b0733d7bbf870c > # Parent 48783333f45ccd16bb1a3b30097ba0713d61cfb5 > tests: add phase testing to test-push-http-bundle1.t > I sent this series to stable because I found some wire protocol bugs that will require patches on stable. I wanted to have the tests in a more consistent state on stable to facilitate testing. > > test-push-http.t and test-push-http-bundle1.t were initially copies. > Now that we have support for inline test variants, we can combine them. > > One of the variances between the tests is testing of phase moving. > We add the missing code to test-push-http-bundle1.t. > > diff --git a/tests/test-push-http-bundle1.t b/tests/test-push-http- > bundle1.t > --- a/tests/test-push-http-bundle1.t > +++ b/tests/test-push-http-bundle1.t > @@ -66,11 +66,16 @@ expect authorization error: must have au > > expect success > > + $ cat > $TESTTMP/hook.sh <<'EOF' > + > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" > + > EOF > + > $ cat >> .hg/hgrc <<EOF > > allow_push = * > > [hooks] > > changegroup = sh -c "printenv.py changegroup 0" > > pushkey = sh -c "printenv.py pushkey 0" > + > txnclose-phase.test = sh $TESTTMP/hook.sh > > EOF > $ req > pushing to http://localhost:$HGPORT/ > @@ -79,6 +84,8 @@ expect success > remote: adding manifests > remote: adding file changes > remote: added 1 changesets with 1 changes to 1 files > + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft > -> public > + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> > public > remote: changegroup hook: HG_HOOKNAME=changegroup > HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 > HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve > HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) > % serve errors > $ hg rollback > @@ -95,6 +102,8 @@ expect success, server lacks the httphea > remote: adding manifests > remote: adding file changes > remote: added 1 changesets with 1 changes to 1 files > + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft > -> public > + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> > public > remote: changegroup hook: HG_HOOKNAME=changegroup > HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 > HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve > HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) > % serve errors > $ hg rollback > @@ -111,6 +120,8 @@ expect success, server lacks the unbundl > remote: adding manifests > remote: adding file changes > remote: added 1 changesets with 1 changes to 1 files > + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft > -> public > + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> > public > remote: changegroup hook: HG_HOOKNAME=changegroup > HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 > HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve > HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) > % serve errors > $ hg rollback > @@ -140,6 +151,8 @@ has no parameter > remote: adding manifests > remote: adding file changes > remote: added 1 changesets with 1 changes to 1 files > + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft > -> public > + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> > public > remote: changegroup hook: * (glob) > % serve errors > $ hg rollback >
Patch
diff --git a/tests/test-push-http-bundle1.t b/tests/test-push-http-bundle1.t --- a/tests/test-push-http-bundle1.t +++ b/tests/test-push-http-bundle1.t @@ -66,11 +66,16 @@ expect authorization error: must have au expect success + $ cat > $TESTTMP/hook.sh <<'EOF' + > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" + > EOF + $ cat >> .hg/hgrc <<EOF > allow_push = * > [hooks] > changegroup = sh -c "printenv.py changegroup 0" > pushkey = sh -c "printenv.py pushkey 0" + > txnclose-phase.test = sh $TESTTMP/hook.sh > EOF $ req pushing to http://localhost:$HGPORT/ @@ -79,6 +84,8 @@ expect success remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) % serve errors $ hg rollback @@ -95,6 +102,8 @@ expect success, server lacks the httphea remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) % serve errors $ hg rollback @@ -111,6 +120,8 @@ expect success, server lacks the unbundl remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) % serve errors $ hg rollback @@ -140,6 +151,8 @@ has no parameter remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public + remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public remote: changegroup hook: * (glob) % serve errors $ hg rollback