Skip to content

CDRIVER-4493 Override host platform, os, flags, compiler info for testing #1355

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

Merged
merged 9 commits into from
Jul 25, 2023

Conversation

adriandole
Copy link
Contributor

Tests in test-mongo-handshake.c expect that the handshake doc is not truncated, causing failures with some test hosts with a long platform string. This PR overrides host info for testing.

@adriandole adriandole requested a review from kevinAlbs July 24, 2023 20:53
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM with question and possible suggestion.

ASSERT (BSON_ITER_HOLDS_UTF8 (&inner_iter));
val = bson_iter_utf8 (&inner_iter, NULL);
_check_os_version_valid (val);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since _override_host_platform_os is used to avoid truncation, can version or architecture be assumed to exist? If so, suggest reverting the added if checks to improve test coverage.

@adriandole adriandole merged commit 2105327 into mongodb:master Jul 25, 2023
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