Skip to content

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
masterfrom
07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis
Open

TOOLS-4263 Add a Go test that we preserve indexes when restoring with a non-admin user on a per-data basis#1047
autarch wants to merge 1 commit into
masterfrom
07-16-tools-4263_add_a_go_test_that_we_preserve_indexes_when_restoring_with_a_non-admin_user_on_a_per-data_basis

Conversation

@autarch

@autarch autarch commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This adds a Go test for the part of test/legacy42/jstests/tool/restorewithauth.js that was not already covered by the existing TestDumpRestoreEnforcesAuthRoles, which is that non-_id indexes are restored when the user doing the restore has just the readWrite permission.

autarch commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

@autarch
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
autarch force-pushed the graphite-base/1047 branch from 75c4e40 to 926381b Compare 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 882c120 to 2a490be Compare July 16, 2026 20:35
@autarch
autarch changed the base branch from graphite-base/1047 to master 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_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_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 marked this pull request as ready for review July 24, 2026 16:42
@autarch
autarch requested a review from a team as a code owner July 24, 2026 16:42
@autarch
autarch requested review from mmcclimon and tdq45gj and removed request for a team and tdq45gj July 24, 2026 16:42

@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, 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++ {

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.

Suggested change
for i := 0; i < 4; i++ {
for i := range 4 {

(nit)

@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:17
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