TOOLS-4263 Add a Go test that we preserve indexes when restoring with a non-admin user on a per-data basis - #1047
Open
autarch wants to merge 1 commit into
Conversation
This was referenced Jul 16, 2026
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
autarch
changed the base branch from
07-16-tools-4263_delete_js_tests_fully_covered_by_existing_go_tests
to
graphite-base/1047
July 16, 2026 20:35
autarch
force-pushed
the
graphite-base/1047
branch
from
July 16, 2026 20:35
75c4e40 to
926381b
Compare
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
July 16, 2026 20:35
882c120 to
2a490be
Compare
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
July 17, 2026 18:57
2a490be to
ae8464d
Compare
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
July 23, 2026 13:44
ae8464d to
ad7bb15
Compare
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
July 24, 2026 16:40
ad7bb15 to
e95e844
Compare
autarch
marked this pull request as ready for review
July 24, 2026 16:42
autarch
requested review from
mmcclimon and
tdq45gj
and removed request for
a team and
tdq45gj
July 24, 2026 16:42
mmcclimon
approved these changes
Jul 27, 2026
mmcclimon
left a comment
Collaborator
There was a problem hiding this comment.
Sure, ok with me. I think the test the JS test does isn't exactly covered with the existing Go tests, though, because it does a dump on an unauth cluster and first tries to restore it with an auth cluster. Maybe we don't need to test that, though; I'll leave it up to you.
| t.Cleanup(cleanup) | ||
|
|
||
| ctx := context.Background() | ||
| for i := 0; i < 4; i++ { |
Collaborator
There was a problem hiding this comment.
Suggested change
| for i := 0; i < 4; i++ { | |
| for i := range 4 { |
(nit)
… a non-admin user on a per-data basis
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
July 27, 2026 21:17
e95e844 to
26fdca5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This adds a Go test for the part of
test/legacy42/jstests/tool/restorewithauth.jsthat was not already covered by the existingTestDumpRestoreEnforcesAuthRoles, which is that non-_idindexes are restored when the user doing the restore has just thereadWritepermission.