Skip to content

TOOLS-4263 Delete JS tests fully covered by existing Go tests - #1041

Merged
autarch merged 1 commit into
masterfrom
07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests
Aug 6, 2026
Merged

TOOLS-4263 Delete JS tests fully covered by existing Go tests#1041
autarch merged 1 commit into
masterfrom
07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests

Conversation

@autarch

@autarch autarch commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

These JS tests are already fully covered by existing Go tests, so they can be deleted with no new Go code.

JS -> Go mapping:

  • test/legacy42/jstests/tool/tool1.js -> TestRoundTripBasicData (integration/exportimport/data_test.go) + TestPipedDumpRestore (integration/dumprestore/roundtrip_test.go) - A basic smoke test: dump a collection and restore it, then export it and import it, checking the data survives each round trip.
  • test/legacy42/jstests/tool/exportimport3.js -> TestRoundTripJSONArray (integration/exportimport/json_test.go) - mongoexport --jsonArray followed by mongoimport --jsonArray round-trips a collection.
  • test/qa-tests/jstests/restore/users_and_roles_admin.js -> TestDumpRestoreSingleDBWithDBUsersAndRoles (mongorestore/dumprestore_auth_test.go) - Single-database dumps and restores handle access-control data correctly, including when the database being dumped is admin.
  • test/qa-tests/jstests/restore/stop_on_error.js -> TestMongorestoreMIOSOE (mongorestore/mongorestore_test.go) - mongorestore --stopOnError aborts on the first insert error instead of continuing.
  • test/qa-tests/jstests/restore/oplog_replay_specify_file.js -> TestOplogRestore and the related oplog-file cases (mongorestore/oplog_test.go) - mongorestore --oplogReplay with an explicit --oplogFile replays ops from that file.
  • test/qa-tests/jstests/import/stoponerror.js -> TestImportMIOSOE (mongoimport/mongoimport_test.go) - mongoimport --stopOnError and --maintainInsertionOrder abort on the first error.
  • test/qa-tests/jstests/files/mongofiles_list.js -> the "list" cases in TestMongoFilesCommands (mongofiles/mongofiles_test.go) - mongofiles list returns every stored file with the right names and sizes.

autarch commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

@autarch
autarch changed the base branch from master to graphite-base/1041 July 16, 2026 20:35
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from 75c4e40 to eef4eab Compare July 16, 2026 20:35
@autarch
autarch changed the base branch from graphite-base/1041 to 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis July 16, 2026 20:35
@autarch
autarch force-pushed the 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis branch from 2a490be to ae8464d Compare July 17, 2026 18:57
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from eef4eab to 47590df Compare July 17, 2026 18:57
@autarch
autarch force-pushed the 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis branch from ae8464d to ad7bb15 Compare July 23, 2026 13:44
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from 47590df to 5892362 Compare July 23, 2026 13:44
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from 5892362 to fcdfb84 Compare July 24, 2026 16:40
@autarch
autarch force-pushed the 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis branch from ad7bb15 to e95e844 Compare July 24, 2026 16:40
@autarch
autarch requested a review from tdq45gj July 24, 2026 18:24
@autarch
autarch marked this pull request as ready for review July 24, 2026 18:25
@autarch
autarch requested a review from a team as a code owner July 24, 2026 18:25
@codeowners-service-app

Copy link
Copy Markdown

Assigned nickweinberger for team dmt-core because tdq45gj is out of office.

@autarch
autarch requested review from mmcclimon and removed request for a team, nickweinberger and tdq45gj July 27, 2026 17:24
@autarch
autarch force-pushed the 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis branch from e95e844 to 26fdca5 Compare July 27, 2026 21:16
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from fcdfb84 to 523ab1e Compare July 27, 2026 21:17

@mmcclimon mmcclimon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, LGTM, thanks!

@autarch
autarch changed the base branch from 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis to graphite-base/1041 August 5, 2026 21:16
@autarch
autarch force-pushed the graphite-base/1041 branch from 26fdca5 to 7b47697 Compare August 5, 2026 21:16
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from 523ab1e to 37b0e2c Compare August 5, 2026 21:16
@autarch
autarch changed the base branch from graphite-base/1041 to 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis August 5, 2026 21:16

autarch commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

evergreen retry

@autarch
autarch changed the base branch from 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis to graphite-base/1041 August 5, 2026 21:43
@autarch
autarch force-pushed the 07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests branch from 37b0e2c to 95a5707 Compare August 5, 2026 21:47
@autarch
autarch force-pushed the graphite-base/1041 branch from 7b47697 to 6f5d3a5 Compare August 5, 2026 21:47
@autarch
autarch changed the base branch from graphite-base/1041 to 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis August 5, 2026 21:48

autarch commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

evergreen retry

autarch commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Aug 6, 7:53 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 6, 7:56 PM UTC: Graphite rebased this pull request as part of a merge.
  • Aug 6, 7:56 PM UTC: @autarch merged this pull request with Graphite.

@autarch
autarch changed the base branch from 07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis to graphite-base/1041 August 6, 2026 19:53
@autarch
autarch changed the base branch from graphite-base/1041 to master August 6, 2026 19:54
Here's a mapping of JS to existing Go tests:

- test/legacy42/jstests/tool/tool1.js
    -> TestRoundTripBasicData (integration/exportimport/data_test.go)
       + TestPipedDumpRestore (integration/dumprestore/roundtrip_test.go)
- test/legacy42/jstests/tool/exportimport3.js
    -> TestRoundTripJSONArray (integration/exportimport/json_test.go)
- test/legacy42/jstests/tool/restorewithauth.js
    -> TestDumpRestoreEnforcesAuthRoles (mongorestore/dumprestore_auth_test.go)
- test/qa-tests/jstests/restore/users_and_roles_admin.js
    -> TestDumpRestoreSingleDBWithDBUsersAndRoles (mongorestore/dumprestore_auth_test.go)
- test/qa-tests/jstests/restore/stop_on_error.js
    -> TestMongorestoreMIOSOE (mongorestore/mongorestore_test.go)
- test/qa-tests/jstests/restore/oplog_replay_specify_file.js
    -> TestOplogRestore and related oplog-file cases (mongorestore/oplog_test.go)
- test/qa-tests/jstests/import/stoponerror.js
    -> TestImportMIOSOE (mongoimport/mongoimport_test.go)
- test/qa-tests/jstests/files/mongofiles_list.js
    -> "list" cases in TestMongoFilesCommands (mongofiles/mongofiles_test.go)
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.

2 participants