Skip to content

Commit a0f9bc3

Browse files
authored
RUST-1163 Fix load balancer auth tests (#581)
1 parent 3b3e6f9 commit a0f9bc3

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/test/client.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -316,17 +316,15 @@ async fn auth_test_options(
316316
mechanism: Option<AuthMechanism>,
317317
success: bool,
318318
) {
319-
let mut options = ClientOptions::builder()
320-
.hosts(CLIENT_OPTIONS.hosts.clone())
321-
.max_pool_size(1)
322-
.credential(Credential {
323-
username: Some(user.to_string()),
324-
password: Some(password.to_string()),
325-
mechanism,
326-
..Default::default()
327-
})
328-
.build();
329-
options.tls = CLIENT_OPTIONS.tls.clone();
319+
let mut options = CLIENT_OPTIONS.clone();
320+
options.max_pool_size = Some(1);
321+
options.credential = Credential {
322+
username: Some(user.to_string()),
323+
password: Some(password.to_string()),
324+
mechanism,
325+
..Default::default()
326+
}
327+
.into();
330328

331329
auth_test(Client::with_options(options).unwrap(), success).await;
332330
}
@@ -387,6 +385,10 @@ async fn auth_test_uri(
387385
}
388386
}
389387

388+
if let Some(true) = CLIENT_OPTIONS.load_balanced {
389+
uri.push_str("&loadBalanced=true");
390+
}
391+
390392
auth_test(
391393
Client::with_uri_str(uri.as_str()).await.unwrap(),
392394
should_succeed,

0 commit comments

Comments
 (0)