TOOLS-4319 Fix TestReadDumpServerVersionFromArchive to work when run with all Server builds - #1103
TOOLS-4319 Fix TestReadDumpServerVersionFromArchive to work when run with all Server builds#1103autarch wants to merge 1 commit into
TestReadDumpServerVersionFromArchive to work when run with all Server builds#1103Conversation
…n with all Server builds If we use a Server binary built from an arbitrary git commit, this test will fail because it compares the literal Server version string against the version returned by the Server's `buildInfo` command, e.g. "8.0.16-353-gb19191c" vs `[8, 0, 17, -199]`).
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| // [8, 0, 17, -100]), which would not match. | ||
| serverVersionStr, err := sessionProvider.ServerVersion() | ||
| require.NoError(err) | ||
| expectedVersion, err := db.StrToVersion(serverVersionStr) |
There was a problem hiding this comment.
This test is checking this error but L379 in mongorestore.go has restore.dumpServerVersion, _ = db.StrToVersion(dumpServerVersionStr) - shouldn't that follow the same pattern and at least check the error rather than discard it?
There was a problem hiding this comment.
It probably should, but that's much earlier work. @FGasper It looks like you wrote that. Do you remember why this doesn't check the error, by any chance?
There was a problem hiding this comment.
Felipe is out until next week, and I don't think this needs to block merging this test change.
There was a problem hiding this comment.
Commenting just to postpone this at least until the release process for tools is complete.

If we use a Server binary built from an arbitrary git commit, this test will fail because it compares the literal Server version string against the version returned by the Server's
buildInfocommand, e.g. "8.0.16-353-gb19191c" vs[8, 0, 17, -199]).