tests: add test for remotefilelog interactions with hgweb
authorAugie Fackler <augie@google.com>
Tue, 17 Mar 2020 17:21:34 -0400
changeset 44569 5483e9c759e4
parent 44568 3aab524a8480
child 44570 9e63108123a4
tests: add test for remotefilelog interactions with hgweb It's not uncommon for hg users to rely on hgweb as a simple GUI and history browser (I do this all the time on Mercurial), but we lack any tests to ensure things keep working. At present, this merely demonstrates the "view contents of a single file" endpoint is broken. I'll fix that in a subsequent change. Differential Revision: https://phab.mercurial-scm.org/D8298
tests/test-remotefilelog-hgweb.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-remotefilelog-hgweb.t	Tue Mar 17 17:21:34 2020 -0400
@@ -0,0 +1,32 @@
+#require no-windows serve
+
+  $ . "$TESTDIR/remotefilelog-library.sh"
+
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > remotefilelog=
+  > share=
+  > EOF
+
+  $ hg init master
+  $ cd master
+  $ cat >> .hg/hgrc <<EOF
+  > [remotefilelog]
+  > server=True
+  > EOF
+  $ echo x > x
+  $ hg commit -qAm x
+
+  $ cd ..
+
+
+  $ hgcloneshallow ssh://user@dummy/master wdir --noupdate -q
+  $ cd wdir
+  $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
+  $ cat hg.pid >> $DAEMON_PIDS
+  $ (get-with-headers.py localhost:$HGPORT 'file/tip/x')
+  500 Internal Server Error
+  
+  Internal Server Error (no-eol)
+  [1]
+