Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #76 bugfix restore database with db as argument #85

Merged
merged 1 commit into from
Apr 20, 2024
Merged

Fix #76 bugfix restore database with db as argument #85

merged 1 commit into from
Apr 20, 2024

Conversation

boly38
Copy link
Owner

@boly38 boly38 commented Apr 20, 2024

Fix #76 bugfix restore database with db as argument

  • for restore case where db name is set, nsInclude is still reported in the restore command with nsInclude db.*
  • on test side, some test data (db+collection+n docs) have been added and a verify is done after restore on mongo documents count

@boly38 boly38 added the bug Something isn't working label Apr 20, 2024
@boly38 boly38 added this to the v2.2.2 milestone Apr 20, 2024
@boly38 boly38 self-assigned this Apr 20, 2024
} else {
command += ' --nsInclude ' + options.db;
}
command += ' --nsInclude ' + options.db + '.*';
Copy link
Owner Author

@boly38 boly38 Apr 20, 2024

Choose a reason for hiding this comment

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

@dandziz fell free to review this PR (even if already merged, coz I always could improve this)

the bug was here

@@ -59,7 +59,7 @@ describe("MTWrapper unit tests", function () {

const command = wrapper.commandConnectFromOptions(mtOptions, '--beginning', true);

command.should.be.eql("--beginning --host 127.0.0.1 --port 17017 --username root --password mypass --authenticationDatabase admin --nsInclude myDbForTest");
command.should.be.eql("--beginning --host 127.0.0.1 --port 17017 --username root --password mypass --authenticationDatabase admin --nsInclude myDbForTest.*");
Copy link
Owner Author

Choose a reason for hiding this comment

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

FYI bugfix related assertion

tests/tests-utils.js Outdated Show resolved Hide resolved
tests/tests-utils.js Outdated Show resolved Hide resolved
@boly38 boly38 merged commit 398d603 into main Apr 20, 2024
2 checks passed
@boly38 boly38 deleted the 76 branch April 20, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I cannot restore a previously dumped database.
1 participant