8000 TOOLS-4263 Convert the last two qa-test JS tests to Go and remove the qa-tests CI by autarch · Pull Request #1164 · mongodb/mongo-tools · GitHub
[go: up one dir, main page]

Skip to content

TOOLS-4263 Convert the last two qa-test JS tests to Go and remove the qa-tests CI - #1164

Draft
autarch wants to merge 1 commit into
08-24-tools-4263_convert_the_users_and_roles_js_tests_to_gofrom
08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci
Draft

autarch wants to merge 1 commit into
08-24-tools-4263_convert_the_users_and_roles_js_tests_to_gofrom
08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci

Conversation

@autarch
@autarch autarch commented Aug 25, 2026
Copy link
Copy Markdown
Collaborator
  • test/qa-tests/jstests/files/mongofiles_delete.js -> mongofiles/delete_test.go - TestDeleteRemovesEveryVersionOfAFilename. A put does not replace an earlier file of the same name unless asked to, so ten puts of one name leave ten GridFS files; the test then asserts that a single delete of that name removes all ten and leaves fs.chunks empty. The existing goconvey delete case in mongofiles/mongofiles_test.go deletes a single file and checks only that its name is gone from fs.files, so neither the every-version behavior nor the chunk cleanup was covered.
  • test/qa-tests/jstests/restore/no_index_restore.js -> integration/dumprestore/index_roundtrip_test.go - TestNoIndexRestore. Two collections are dumped, one with two secondary indexes and one with none, then dropped and restored with --noIndexRestore. Each comes back with all of its documents and only its _id index, which the server creates with the collection rather than the restore. The pre-existing --noIndexRestore coverage in mongorestore/mongorestore_test.go is for the time-series system.buckets clustered index, read from a checked-in dump, and says nothing about ordinary secondary indexes.

Both JS files are deleted. No test JS remains under test/qa-tests/jstests.

Each test asserts the exact set of _ids rather than a document count, so it also
catches a document that should not be there. Both add a check that the setup they
depend on really happened - that the puts wrote chunks, and that the secondary
indexes existed before the dump - because without it the post-restore assertion of
an empty fs.chunks, or of an _id-only index list, would hold just as well if
the setup had silently done nothing.

Coverage notes:

mongofiles_delete.js ran against a standalone, a replica set, and a sharded
cluster, under both plain and auth passthroughs. The Go test runs against whatever
one server the integration suite is pointed at. mongofiles/sharded_gridfs_test.go
is the only sharded test in the package and it never issues a delete, so sharded
delete coverage is not carried over. It is worth having: deleteAll removes
chunks per file, and chunk distribution is exactly what sharding changes.

no_index_restore.js used plain_28.config.js, a single topology, so the suite
conversion loses nothing there.

The collection with no secondary indexes only proves that the restore does not
invent indexes; the collection with two is what makes the test able to fail. Both
are kept because the JS had the same pair.

Removes the qa-tests CI infrastructure, which now has nothing to run:

  • test/qa-tests/ - deleted. All four resmoke suites selected only jstests/{dump,files,import,restore}/*.js, which are now all gone. test/shell_common/libs/ is shared with test/legacy42 and stays; scripts/run-legacy-tests.sh drives the mongo shell directly and never touches test/qa-tests/buildscripts, so the directory was self-contained.
  • scripts/run_qa.sh and the run qa-tests function in common.yml - deleted, along with the twelve qa-tests-* and qa-dump-restore-* task definitions and the resmoke_use_tls, resmoke_args, and excludes expansions that only fed them. Buildvariants select tasks by tag, so no buildvariant task list changes.
  • scripts/setup-credentials.sh and the setup credentials function - deleted. The script's only job was writing mci.buildlogger and copying it into test/qa-tests, where resmoke hardcodes its location. The legacy-jstests-* tasks also called it, but run-legacy-tests.sh never reads the file, and with test/qa-tests gone the cp would have failed under errexit. get buildnumber goes with it: builder_num was only ever read by that script.
  • The attach.results for report.json in post - run_qa.sh was the only thing that produced that file. The pkill -f buildlogger.py and pkill -f smoke.py entries in the killall_mci default are dropped for the same reason.
  • eslint - precious.toml only ever pointed it at test/qa-tests/jstests/**/*.js, so with those files gone it lints nothing. The command, .eslintrc.yml, .eslintignore, and the mise.toml/package.json entries all go. The .eslintignore entry for test/shell_common/libs/replsettest-*.js was already dead - the include glob never matched those paths.
  • The github_pr_aliases entry for rhel88 drops qa-dump-restore and qa-tests. It also picks up native-cert-ssl, which the generator in evergreen/evergreen.go already emitted but common.yml had not been regenerated for. TestGitHubPRAliasBlockIsUpToDate was failing before this commit because of that drift and passes now.

The mongodump_passthrough resmoke included at the top of common.yml is a
different harness with its own functions and its own builder_num, and is
untouched.

autarch commented Aug 25, 2026 •
Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci branch from 1a4b896 to c4dfe34 Compare August 25, 2026 20:10
@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_users_and_roles_js_tests_to_go branch from 3832c09 to 83e29c4 Compare August 25, 2026 20:10
@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci branch from c4dfe34 to ed0de3c Compare August 25, 2026 20:18
@autarch autarch changed the title TOOLS-4263 Convert the last two JS tests to Go and remove the qa-tests CI TOOLS-4263 Convert the last two qa-test JS tests to Go and remove the qa-tests CI Aug 25, 2026
8000 @autarch
autarch force-pushed the 08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci branch from ed0de3c to e33d81a Compare August 26, 2026 18:18
@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci branch 2 times, most recently from a12a3a3 to 5a2487a Compare August 31, 2026 20:49
@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_users_and_roles_js_tests_to_go branch from 3c3b771 to 295c223 Compare August 31, 2026 20:49
- `test/qa-tests/jstests/files/mongofiles_delete.js` -> `mongofiles/delete_test.go` - `TestDeleteRemovesEveryVersionOfAFilename`. A put does not replace an earlier file of the same name unless asked to, so ten puts of one name leave ten GridFS files; the test then asserts that a single `delete` of that name removes all ten and leaves `fs.chunks` empty. The existing goconvey `delete` case in `mongofiles/mongofiles_test.go` deletes a single file and checks only that its name is gone from `fs.files`, so neither the every-version behavior nor the chunk cleanup was covered.
- `test/qa-tests/jstests/restore/no_index_restore.js` -> `integration/dumprestore/index_roundtrip_test.go` - `TestNoIndexRestore`. Two collections are dumped, one with two secondary indexes and one with none, then dropped and restored with `--noIndexRestore`. Each comes back with all of its documents and only its `_id` index, which the server creates with the collection rather than the restore. The pre-existing `--noIndexRestore` coverage in `mongorestore/mongorestore_test.go` is for the time-series `system.buckets` clustered index, read from a checked-in dump, and says nothing about ordinary secondary indexes.

Each test asserts the exact set of `_id`s rather than a document count, so it also
catches a document that should not be there. Both add a check that the setup they
depend on really happened - that the puts wrote chunks, and that the secondary
indexes existed before the dump - because without it the post-restore assertion of
an empty `fs.chunks`, or of an `_id`-only index list, would hold just as well if
the setup had silently done nothing.

The JS files themselves are not deleted here. They and the CI that runs them come
out in a later commit in this stack, so that this one adds coverage without
touching CI and every commit in between is independently green.

Coverage notes:

`mongofiles_delete.js` ran against a standalone, a replica set, and a sharded
cluster, under both plain and auth passthroughs. The Go test runs against whatever
one server the integration suite is pointed at. `mongofiles/sharded_gridfs_test.go`
is the only sharded test in the package and it never issues a `delete`, so sharded
`delete` coverage is not carried over. It is worth having: `deleteAll` removes
chunks per file, and chunk distribution is exactly what sharding changes.

`no_index_restore.js` used `plain_28.config.js`, a single topology, so the suite
conversion loses nothing there.

The collection with no secondary indexes only proves that the restore does not
invent indexes; the collection with two is what makes the test able to fail. Both
are kept because the JS had the same pair.
@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_users_and_roles_js_tests_to_go branch from 295c223 to e81fa4b Compare September 30, 2026 20:50
@autarch
autarch force-pushed the 08-24-tools-4263_convert_the_last_two_js_tests_to_go_and_remove_the_qa-tests_ci branch from 5a2487a to 3ab57a4 Compare September 30, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0