Summary:
Mercurial is maintaining it's own dummyssh, and they've started to
diverge. I've copied over the hgcli bits to Mercurial's dummyssh in order to
support Mononoke integration tests, so let's just symlink Mononoke to use
Mercurial's dummyssh.
Reviewed By: markbt
Differential Revision: D15382377
fbshipit-source-id: 0847ce6efac7db256f16cc53705777cf55f71593
Summary:
Previously the cert directory was assumed to be inside $TESTDIR. This
doesn't work with the Mercurial tests, since they run inside the actual test
directory instead of in a buck-out/gen created directory.
To allow the Mercurial tests to use these same certs, let's allow customizing
the location via HGTEST_CERTDIR. In a future diff the Mercurial tests will set
this when running with Mononoke integration.
Reviewed By: StanislavGlebik
Differential Revision: D15381789
fbshipit-source-id: e1be3d1cc17f5622d1cc277a377d628d5eb45160
Summary:
In order to do more complete tests around authentication we need to provide
fb identity in to our test certificates.
Reviewed By: StanislavGlebik
Differential Revision: D15046017
fbshipit-source-id: 3f3cd450425944a2970c6f02e7eb92a878076a05
Summary: In this final diff for verify_integrity the data authorization data is being passed from hgcli (where the ssh connection is established) to Mononoke where it is further passed to verify_integrity script.
Reviewed By: StanislavGlebik
Differential Revision: D14387759
fbshipit-source-id: 2c0f9eef4128f5af0052276a1830ea2f449fb03a
Summary:
I already made them the same (but copy) in a different diff. As we discussed at
war room, symlinks is a better solution.
Also removed unused import and some functions that were copied from mercurial.
This is no longer needed as we now share tinit.sh with general purpose
functions.
The only mononoke specific file left is dummyssh.py
I think later we could pack them in a separate buck target or something and share in a better way that symlinks but for now it is the easiest solution.
Reviewed By: DurhamG
Differential Revision: D13881960
fbshipit-source-id: 36f425d6f0ddbae2c9d083de35d2779669dc01e7
Summary:
This is the first step, I just copied the files from mercurial to mononoke/tests/integration/third_party and made it work.
Further unification is required to reuse the same files.
It renders progress bars and other fancy things and matches our mercurial test framework.
Also it allows to use embedded python code!
Some things are not supported: like aliases, so changes in the tests are required.
Some tests used urandom and cat in a wrong way, I had to fix it as well.
Reviewed By: lukaspiatkowski
Differential Revision: D13871531
fbshipit-source-id: c723bb18c2233639bb36bc7964e57baddff4c0b9
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.
Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.
Reviewed By: phillco
Differential Revision: D13868981
fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
Summary:
Tests don't close the child process stdout. On newer versions of Python, this
can lead to ResourceWarnings when the test runner thread terminates.
Reviewed By: HarveyHunt
Differential Revision: D13517425
fbshipit-source-id: 6cedf4f39efe1299c41dbde784daf8c159309640
Summary:
Some of the escape sequences in run-tests.py are invalid. These cause
DeprecationWarnings on newer versions of Python.
In both cases, there are `\` characters that need to be escaped as `\\`.
Reviewed By: HarveyHunt
Differential Revision: D13517137
fbshipit-source-id: a899c3c28d55210f5972a515474a2fa69d051671
Summary:
Use tls for connection between hgcli and Mononoke server always, even for
localhost connections[1]
The setup is similar to tls setup of Eden server.
[1] This is not necessary of course, but adding an option to bypass tls
connection may result in accidental use of it in prod. However if it turns out
to be too unusable, we can add such option in the future
Reviewed By: jsgf
Differential Revision: D8644299
fbshipit-source-id: 0898e30e33b718e13a766763479f3adf9323ffe7
Summary: This allows us to put hgcli on the different host
Reviewed By: jsgf
Differential Revision: D7910980
fbshipit-source-id: 45bdd1ee42b54f8f1a425ed6950e785cdf85bfc3
Summary:
Curently hgcli can connect to Mononoke only if they are on the same host,
because unix domain socket are used. Also Mononoke has to use separate unix
domain socket for different repos.
The goal of this stack of diffs is to remove these limitations:
1 Make it possible to have hgcli and Mononoke server on different hosts
2 Make it possible to use one port/unix domain socket to connect to many repos.
This diff adds a separate thread that parses the Preamble, extracts the
reponame and sends request to a thread responsible for this repo.
Also hgcli now has a new cmd line option that specifies path to connect to.
Reviewed By: jsgf
Differential Revision: D7845156
fbshipit-source-id: a48bcfeec4755b2d5b3dfcf8e0383e6945178018
Summary:
1) Do not use system hg in tests.
Let's use current version of hg in the tests. It will simplify debugging
because we can now easily tweak both hg client and server. It will also result
in fewer test breakages, because previously our tests were broken when system
hg was updated.
2) Run integration tests in parallel with -j option
Reviewed By: quark-zju
Differential Revision: D6998535
fbshipit-source-id: dac4eb6d33978161ffe42d9d6a5a39a3ddf3a4e3
Summary:
There was an upstream fix 573baab2a797 that fixed run-tests --interactive for
test with many test cases. This diff grafts the change
Reviewed By: lukaspiatkowski
Differential Revision: D5902793
fbshipit-source-id: 0b90a0105d0bf0e2d9f5f788503dc40009441c40
Summary:
Mercurial test suite have #testcases features. It allows to use the same test
file for two different tests while tweaking just small parts of it.
I used testcases in test-eden-server.t, but I used it incorrectly - #files test
case wasn't actually used at all. This is because hghave is not present in the
repo.
This diff adds hghave. It's a copy-paste from upstream mercurial
Reviewed By: farnz
Differential Revision: D5901439
fbshipit-source-id: 2131733d8c523b7f7ce9e6a087c77fed6a427e6d