Skip to content

RUST-656 Run tests against serverless in evergreen #504

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 21 commits into from
Nov 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
override default hosts
  • Loading branch information
abr-egn committed Nov 8, 2021
commit abf119c36a7957bb9034b4fa64beb280c5b79d7d
6 changes: 5 additions & 1 deletion src/client/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,11 @@ impl ClientOptions {
/// Applies the options in other to these options if a value is not already present
#[cfg(test)]
pub(crate) fn merge(&mut self, other: ClientOptions) {
if self.hosts.is_empty() {
let default_hosts = vec![ServerAddress::Tcp {
host: "localhost".to_string(),
port: Some(27017),
}];
if self.hosts.is_empty() || self.hosts == default_hosts {
self.hosts = other.hosts;
}
merge_options!(
Expand Down