sapling/eden/mononoke/tests/integration
Kostia Balytskyi 220edc6740 admin: add a subcommand to manipulate mutable_counters
Summary:
This is generally something I wanted to have for a long time: instead of having to open a writable db shell, now we can just use the admin command. Also, this will be easier to document in the oncall wikis.

NB: this is lacking the `delete` functionality atm, but that one is almost never needed.

Reviewed By: krallin

Differential Revision: D21039606

fbshipit-source-id: 7b329e1782d1898f1a8a936bc711472fdc118a96
2020-04-16 03:19:44 -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 run blobstore healer integration test with mysql 2020-04-06 09:57:24 -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 mononoke/hg_sync_job: use hgsql name in integration test 2020-04-14 10:26:11 -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-alias-verify.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-allowed-users.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: add a test backfill derived data 2020-04-07 08:44:25 -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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: add support for changesets 2020-03-05 11:57:43 -08: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 commitcloud: migrate to tech-debt-free repo.pull for pulling 2020-04-01 19:40:57 -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: make commit validator manifest-diff-based 2020-03-13 07:46:48 -07:00
test-db-filenodes.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-gitimport-octopus.t admin: make sure bookmark operations create syncable log entries 2020-04-15 04:17:42 -07:00
test-gitimport.t admin: make sure bookmark operations create syncable log entries 2020-04-15 04:17:42 -07:00
test-hash-validation.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-hooks.t Modernise hooks support 2020-03-18 09:17:17 -07:00
test-inconsistent-hash.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-infinitepush-phaseheads.t getbundle: compute full set of new draft commits 2020-04-15 11:00:33 -07:00
test-infinitepush.t connectionpool: add a debug note saying connection being reused 2020-02-13 12:16:21 -08: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-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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-identity-parsing-untrusted.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-lfs-server-identity-parsing.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: fix a number of broken tests 2020-02-17 11:04:15 -08: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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 admin: add a subcommand to manipulate mutable_counters 2020-04-16 03:19:44 -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: use hgsql name in integration test 2020-04-14 10:26:11 -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 admin: make sure bookmark operations create syncable log entries 2020-04-15 04:17:42 -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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-push-disallowed.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-push-redirector-pushrebase-onesided.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: pushrebase: add tests for casefolding 2020-03-03 02:44:06 -08:00
test-pushrebase-block-merges.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-pushrebase-copy-src-changed.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-pushrebase-discovery.t Modernise hooks support 2020-03-18 09:17:17 -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 make BonsaiGitMapping repo-specific 2020-02-27 08:05:13 -08:00
test-pushrebase-globalrevs.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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: move the codebase under eden/ directory 2020-02-06 13:46:04 +01: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 remotefilelog: do not write delta in bundle2 2020-04-15 10:26:39 -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 mononoke/scs-log: integrate deleted manifest (linear) 2020-04-14 18:27:39 -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: use sampling blobstore in compression-benefit 2020-04-02 09:08:05 -07:00
test-walker-count-objects.t mononoke: walker: add ability to walk all published bookmarks 2020-03-10 05:26:35 -07:00
test-walker-enable-derive.t mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
test-walker-error-as-data.t mononoke: Add hash::GitSha1 as a pure hash-only key for git Aliases 2020-02-18 05:02:52 -08:00
test-walker-scrub-blobstore.t mononoke: fix walker filenode walks 2020-02-26 15:21:53 -08:00
test-walker-scrub-queue.t mononoke: include DB config in multiplexed blobstore configuration 2020-02-24 11:54:45 -08:00
test-walker-throttle.t mononoke: fix walker filenode walks 2020-02-26 15:21:53 -08:00
test-walker-validate-non-public.t mononoke: walker: test validate scuba logging for non-public commits 2020-02-26 06:16:29 -08:00
test-walker-validate.t mononoke: fix walker filenode walks 2020-02-26 15:21:53 -08: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.