sapling/eden/mononoke/tests/integration
Arun Kulshreshtha 40928f027c make_req: take array instead of object as input for data requests
Summary: Change `make_req` to take a JSON array as input when constructing `DataRequest`s instead of a JSON object. This is more correct because DataRequests can include multiple `Key`s with the same path; this cannot be represented as an object since an object is effectively a hash map wherein we would have duplicate keys.

Reviewed By: quark-zju

Differential Revision: D21412989

fbshipit-source-id: 07a092a15372d86f3198bea2aa07b973b1a8449d
2020-05-12 16:26:20 -07:00
..
commitsyncmap.toml mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
dummyssh.sh Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
generate_manifest.py Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
integration_runner_real.py commit cloud forwardfiller: add a test to exercise the flow 2020-04-30 13:00:22 -07:00
integration_runner.sh Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
lib_buck.py Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
library-push-redirector.sh mononoke: make commit validator manifest-diff-based 2020-03-13 07:46:48 -07:00
library.sh edenapi_server: add files endpoint 2020-05-12 16:26:19 -07:00
pushrebase_replay.bundle mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
README.md a small tool to backfill git mappings 2020-03-04 06:08:43 -08:00
test-admin-hg-sync-bundle-last-processed.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-admin-hg-sync-bundle-remains.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-admin-hg-sync-bundle-verify.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-admin-hg-sync-inspect.t mononoke/admin: add support for showing arbitrary bundles in hg sync 2020-04-27 07:24:41 -07:00
test-admin-hg-sync-show.t mononoke/admin: asyncify the hg_sync subcommand 2020-04-27 07:24:41 -07:00
test-alias-verify.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-allowed-users.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-apiserver-edenapi.t mononoke/apiserver: run streams on a Tokio 0.2 runtime 2020-03-03 10:18:02 -08:00
test-apiserver.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-backfill-derived-data.t mononoke/microwave: warmup from last derived state 2020-04-30 12:47:35 -07:00
test-backfill-git-mapping.t a small tool to backfill git mappings 2020-03-04 06:08:43 -08:00
test-backsyncer-merges.t mononoke: add x_repo_lookup to scsc 2020-02-06 07:26:14 -08:00
test-benchmark-filestore.t mononoke/benchmark_filestore: make it work again 2020-03-30 07:32:20 -07:00
test-blobimport-bookmarks.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-derived-data.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-fix-parent-order.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-git-mapping.t improve the check for conflicts during insert 2020-03-10 05:47:05 -07:00
test-blobimport-globalrev.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-inline.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-lfs.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-blobimport-megarepo.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-no-create.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport-return-error.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobimport.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-blobstore_healer.t run blobstore healer integration test with mysql 2020-04-06 09:57:24 -07:00
test-bonsai-verify.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-bookmark-hg-kind.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-bookmark-race.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-bookmarks-filler.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-bundle2-preservation.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-cache-warmup-microwave.t mononoke/microwave: warmup from last derived state 2020-04-30 12:47:35 -07:00
test-cache-warmup.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-clienttelemetry.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-commitcloud.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-copyrename.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-cross-repo-commit-sync-merge.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-cross-repo-commit-sync.t mononoke: make commit validator manifest-diff-based 2020-03-13 07:46:48 -07:00
test-cross-repo-commit-validator.t mononoke: [RFC] migrate bits of validation code to Small/Large newtypes 2020-04-20 11:30:05 -07:00
test-db-filenodes.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-edenapi-server.t make_req: take array instead of object as input for data requests 2020-05-12 16:26:20 -07:00
test-fastreplay-inline-args.t mononoke/repo_client: record depth 2020-04-07 04:36:06 -07:00
test-fastreplay-remote-args.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-filenodes-push-merge.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-filenodes.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-getpackv1.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-getpackv2.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-gettreepack-designated-nodes.t mononoke/repo_client: add telemetry for designated nodes 2020-03-18 12:57:34 -07:00
test-gettreepack.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-gitimport-octopus.t mononoke/gitimport: improve concurrency 2020-05-04 07:18:02 -07:00
test-gitimport.t mononoke/gitimport: support read-only mode 2020-05-04 07:18:02 -07:00
test-hash-validation.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-hook-tailer.t mononoke/hook_tailer: support passing a list of changesets to tail 2020-04-17 04:52:28 -07:00
test-hooks.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-inconsistent-hash.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-infinitepush-bookmarks-disabled.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-infinitepush-commits-disabled.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-infinitepush-hydrated.t getbundle: compute full set of new draft commits 2020-04-15 11:00:33 -07:00
test-infinitepush-lfs.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-infinitepush-namespace.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-infinitepush-phaseheads.t getbundle: compute full set of new draft commits 2020-04-15 11:00:33 -07:00
test-infinitepush-vs-push.t mononoke: fix how infinitepush is detected 2020-04-22 05:13:36 -07:00
test-infinitepush.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-init.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-large-path-and-content.t warn: remove large file warning 2020-02-11 10:18:06 -08:00
test-lfs-copytracing.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-import.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-acl-check.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-consistent-hashing.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-disabled-hostname-resolution.t mononoke: include DB config in multiplexed blobstore configuration 2020-02-24 11:54:45 -08:00
test-lfs-server-error-formatting.t mononoke/lfs_server: add a test for error formatting 2020-05-05 05:44:52 -07:00
test-lfs-server-https.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-identity-parsing-from-header.t mononoke: replace all remaining usages of aclchecker with permission_checker 2020-04-29 11:57:34 -07:00
test-lfs-server-identity-parsing-untrusted.t mononoke: replace all remaining usages of aclchecker with permission_checker 2020-04-29 11:57:34 -07:00
test-lfs-server-identity-parsing.t mononoke: replace all remaining usages of aclchecker with permission_checker 2020-04-29 11:57:34 -07:00
test-lfs-server-live-config.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-max-upload-size.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-proxy-skip-upstream.t mononoke/lfs_server: don't return a 502 on batch error 2020-04-08 11:58:09 -07:00
test-lfs-server-proxy.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-rate-limiting.t mononoke: lfs_server: add optional client identities to ratelimit config 2020-03-03 09:33:03 -08:00
test-lfs-server-scuba-logging.t mononoke/repo_client: add telemetry for designated nodes 2020-03-18 12:57:34 -07:00
test-lfs-server.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-to-mononoke.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-lfs-upload-alias-on-fetch.t mononoke: fix a number of broken tests 2020-02-17 11:04:15 -08:00
test-lfs.t exchange: always call prepushoutgoing hooks 2020-04-15 20:22:18 -07:00
test-linknodes.t mononoke: test-linknodes: add more testing 2020-05-05 10:32:55 -07:00
test-listkeyspatterns.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lookup.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-megarepo-tool.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-admin.t Expose ctime from Blobstore::get() in mononoke 2020-05-06 00:55:07 -07:00
test-mononoke-hg-sync-job-generate-bundles-force.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-hg-sync-job-generate-bundles-lfs-verification.t mononoke/hg_sync_job: use 0.2 runtime 2020-02-18 07:42:41 -08:00
test-mononoke-hg-sync-job-generate-bundles-lfs.t mononoke: add lfs rollout percentage 2020-03-16 08:18:41 -07:00
test-mononoke-hg-sync-job-generate-bundles-loop.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-hg-sync-job-generate-bundles-other-books.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-hg-sync-job-generate-bundles.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-hg-sync-job-sync-globalrevs.t mononoke_hg_sync_job: don't fail if the Globalrev counter is where we want it 2020-04-21 06:09:19 -07:00
test-mononoke-hg-sync-job-with-copies.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-hg-sync-job.t mononoke/hg_sync_job: use 0.2 runtime 2020-02-18 07:42:41 -08:00
test-mononoke-readonly-storage-blobstore.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-mononoke-readonly-storage-sql.t mononoke: fix a broken test 2020-05-05 02:47:03 -07:00
test-multiplexed-blobstore.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-multiplexed-chaosblob.t mononoke: include DB config in multiplexed blobstore configuration 2020-02-24 11:54:45 -08:00
test-new-repo.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-priority.t mononoke: allow selecting a priority in hgcli, and passing it to Mononoke 2020-03-11 08:54:51 -07:00
test-push-bookmarks.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-push-disallowed.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-push-newblobimport.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-push-protocol-lfs.t exchange: always call prepushoutgoing hooks 2020-04-15 20:22:18 -07:00
test-push-protocol.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-push-readonly.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-push-redirector-pushrebase-onesided.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-push-redirector-pushrebase.t mononoke: add x_repo_lookup to scsc 2020-02-06 07:26:14 -08:00
test-push-redirector-sync-job.t admin: make sure bookmark operations create syncable log entries 2020-04-15 04:17:42 -07:00
test-pushrebase-allow-casefolding.t mononoke: pushrebase: fix casefolding_check usage during changeset creation 2020-03-03 03:57:32 -08:00
test-pushrebase-block-casefolding.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-pushrebase-block-merges.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-pushrebase-copy-src-changed.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-pushrebase-discovery.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-pushrebase-emit-obsmarkers.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-pushrebase-empty.t mononoke/blobstore: remove rocksdb blobstore and replace its usages with sqliteblob 2020-02-24 05:23:07 -08:00
test-pushrebase-file-list.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-pushrebase-git-mapping.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-pushrebase-globalrevs.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-pushrebase-mutation.t debugmutation: add time range limiting 2020-02-17 06:41:03 -08:00
test-pushrebase-over-merge.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-pushrebase-per-head-config.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-pushrebase.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-rechunker.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-redaction-admin.t admin: change "blacklisted" to "redacted" in admin and tests 2020-04-14 16:18:35 -07:00
test-redaction-config.t remotefilelog: do not write delta in bundle2 2020-04-15 10:26:39 -07:00
test-redaction.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-remotefilelog-lfs.t mononoke: pretty-print root-cause 2020-05-12 07:59:42 -07:00
test-rename-in-merge.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-scs-blame.t mononoke/scs: separate blame integration test from test-scs.t 2020-03-25 09:00:20 -07:00
test-scs-diff.t scs: separate scs-diff test 2020-03-23 08:36:51 -07:00
test-scs-log.t log: improve default log output 2020-04-23 08:36:43 -07:00
test-scs-lookup.t scs: separate lookup integration test from test-scs.t 2020-03-25 09:00:20 -07:00
test-scs-x-repo.t mononoke: add x_repo_lookup to scsc 2020-02-06 07:26:14 -08:00
test-scs.t mononoke/scs: separate blame integration test from test-scs.t 2020-03-25 09:00:20 -07:00
test-server.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-sqlblob.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-traffic-replay.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-unbundle-replay-bookmarks-update-log.t mononoke/unbundle_replay: unbundle concurrently, derive filenodes concurrently 2020-03-30 06:25:07 -07:00
test-unbundle-replay-hg-bookmark.t mononoke/unbundle_replay: unbundle concurrently, derive filenodes concurrently 2020-03-30 06:25:07 -07:00
test-unbundle-replay-hg-recording.t mononoke/unbundle_replay: report size of the unbundle 2020-04-07 01:05:32 -07:00
test-walker-compression-benefit.t mononoke: walker: add fsnodes derivation to test blobimport 2020-04-24 04:29:52 -07:00
test-walker-count-objects.t mononoke: walker: add fsnodes derivation to test blobimport 2020-04-24 04:29:52 -07:00
test-walker-enable-derive.t mononoke: add walker for fsnodes 2020-04-23 01:24:20 -07:00
test-walker-error-as-data.t mononoke: add walker for fsnodes 2020-04-23 01:24:20 -07:00
test-walker-sample-by-node.t mononoke: walker: add --sample-offset so whole repo can be sampled in slices 2020-05-11 12:00:58 -07:00
test-walker-sample-by-path.t mononoke: walker: filter the repo path by node type 2020-05-11 12:00:59 -07:00
test-walker-scrub-blobstore.t Expose ctime from Blobstore::get() in mononoke 2020-05-06 00:55:07 -07:00
test-walker-scrub-queue.t mononoke: add walker for fsnodes 2020-04-23 01:24:20 -07:00
test-walker-throttle.t mononoke: add walker for fsnodes 2020-04-23 01:24:20 -07:00
test-walker-validate-non-public.t mononoke: add walker for fsnodes 2020-04-23 01:24:20 -07:00
test-walker-validate.t mononoke: add walker for fsnodes 2020-04-23 01:24:20 -07:00

Mononoke Integration Tests

Mononoke's integration tests run using Mercurial's run-tests test framework, which is orchestrated using a wrapper to make it more friendly to TestPilot and provide some added functionality, such as wiring up dependencies and / or setting up an ephemeral MySQL shard.

TL;DR: Running one test

Use:

buck run //eden/mononoke/tests/integration:integration_runner -- TEST

But! Keep reading: there are faster ways to run the tests if you're going to be iterating on something. You might as well read on while you wait for that build to complete.

Running Tests Incrementally: a better way

To run tests locally, a better way is to run the integration runner directly. This allows you to skip most build steps, and rebuild only what you need to re-run your test (e.g. if you're iterating on Mononoke server, then you won't need to rebuild blobimport more than once).

To do this, you should start by building everything once:

buck build //eden/mononoke/tests/integration

Then, run the tests by executing the integration runner directly. The integration runner relies on a manifest to find all the binaries it needs to run (the ones you built earlier), so you need to point it there:

~/fbcode/buck-out/dev/gen/eden/mononoke/tests/integration/integration_runner_real.par \
  ~/fbcode/buck-out/gen/eden/mononoke/tests/integration/manifest/manifest.json \
  test1.t test2.t test3.t

If you don't have ~/fbcode symlink, create it, or update the instructions as needed. Note that you can run this from anywhere in fbsource tree (so you can run it from the actual tests directory to get autocompletion or globbing on test names).

Every time you make changes to your code, buck build whatever you changed, then re-run.

Use --interactive when running your tests in order to accept (or reject) changes to your .t files.

Adding new tests:

Add your new test in this directory (or under facebook/) if it's not relevant to open-source.

If your test needs assets to work, then you'll need to:

  • Put the asset somewhere under this directory.
  • In tests, your asset can be found at ${TEST_FIXTURES}/relative/path, where relative/path is the path to your asset relative from .../mononoke/tests/integration.
  • Add your asset to the test_fixtures Buck rule in this directory's TARGETS file. If you don't do this, then running tests using the runner directly will work (read on to understand why), but it won't work when running through Buck / TestPilot.

Exposing a new binary

Add it to MANIFEST_DEPS in the TARGETS file in this directory. The key is an environment variable that will be set to the path to this binary when the tests execute (if you need to customize the environment variable a bit, you can do so in generate_manifest.py).

How it works

To avoid full rebuilds whenever you make a change, the test runner takes a few shortcuts to avoid relying on the Buck dependency graph (that is because Buck doesn't see each individual test's dependencies: it only knows that all the tests depend on everything).

Notably, it:

  • Uses the actual test source files (and assets) from your fbcode working directory when running the runner directly (as documented above). This allows --interactive to work seamlessly.
  • Stores the paths to all its dependencies in a manifest file (which is generated from Buck).

However, when you're running tests using Buck, then the test runner will not use source files, and will instead expect files to be managed using Buck. The main result of this is that while you might have a bunch of files jumbled together in this directory, when running tests using Buck, they will not.

Normally, this should all be transparent if you're adding a new test and using ${TEST_FIXTURES} to reference it.