Skip to content

Commit dbeae5d

Browse files
fix(elasticsearch sink): match only when feature is enabled (#23404)
1 parent 144a0af commit dbeae5d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/sinks/elasticsearch/tests.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,8 @@ async fn test_parse_config_with_uri_auth() {
702702

703703
let got_auth_inner = match common.auth.as_ref().unwrap() {
704704
Auth::Basic(auth) => auth,
705-
_ => panic!("Expected auth to be Basic"),
705+
#[cfg(feature = "aws-core")]
706+
Auth::Aws { .. } => panic!("Expected auth to be Basic"),
706707
};
707708

708709
assert_eq!(
@@ -737,7 +738,8 @@ async fn test_parse_config_with_config_auth() {
737738

738739
let got_auth_inner = match common.auth.as_ref().unwrap() {
739740
Auth::Basic(auth) => auth,
740-
_ => panic!("Expected auth to be Basic"),
741+
#[cfg(feature = "aws-core")]
742+
Auth::Aws { .. } => panic!("Expected auth to be Basic"),
741743
};
742744

743745
assert_eq!(

0 commit comments

Comments
 (0)