From d43c3a0b0ea0c3ac85913b12067125c7ee23f358 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Thu, 21 Apr 2022 19:00:11 -0700 Subject: [PATCH] fix(ci): Fix aws_kinesis_firehose and elasticsearch integration tests (#12354) * fix(ci): Fix aws_kinesis_firehose and elasticsearch integration tests Region is now required when AWS authentication is used. Signed-off-by: Jesse Szwedko --- src/sinks/aws_kinesis_firehose/integration_tests.rs | 5 ++++- src/sinks/elasticsearch/integration_tests.rs | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sinks/aws_kinesis_firehose/integration_tests.rs b/src/sinks/aws_kinesis_firehose/integration_tests.rs index 88360031ab035..644c77d96002d 100644 --- a/src/sinks/aws_kinesis_firehose/integration_tests.rs +++ b/src/sinks/aws_kinesis_firehose/integration_tests.rs @@ -47,9 +47,11 @@ async fn firehose_put_records() { let mut batch = BatchConfig::default(); batch.max_events = Some(2); + let region = RegionOrEndpoint::with_both("localstack", kinesis_address().as_str()); + let config = KinesisFirehoseSinkConfig { stream_name: stream.clone(), - region: RegionOrEndpoint::with_both("localstack", kinesis_address().as_str()), + region: region.clone(), encoding: EncodingConfig::from(StandardEncodings::Json), // required for ES destination w/ localstack compression: Compression::None, batch, @@ -82,6 +84,7 @@ async fn firehose_put_records() { index: Some(stream.clone()), action: None, }), + aws: Some(region), ..Default::default() }; let common = ElasticsearchCommon::parse_config(&config) diff --git a/src/sinks/elasticsearch/integration_tests.rs b/src/sinks/elasticsearch/integration_tests.rs index a5afa514b9cda..93ef7a0029c85 100644 --- a/src/sinks/elasticsearch/integration_tests.rs +++ b/src/sinks/elasticsearch/integration_tests.rs @@ -13,6 +13,7 @@ use vector_core::{ use super::{config::DATA_STREAM_TIMESTAMP_KEY, *}; use crate::{ + aws::RegionOrEndpoint, config::{ProxyConfig, SinkConfig, SinkContext}, http::HttpClient, sinks::{ @@ -242,6 +243,7 @@ async fn insert_events_on_aws() { ElasticsearchConfig { auth: Some(ElasticsearchAuth::Aws(AwsAuthentication::Default {})), endpoint: aws_server(), + aws: Some(RegionOrEndpoint::with_region(String::from("localstack"))), ..config() }, false, @@ -258,6 +260,7 @@ async fn insert_events_on_aws_with_compression() { ElasticsearchConfig { auth: Some(ElasticsearchAuth::Aws(AwsAuthentication::Default {})), endpoint: aws_server(), + aws: Some(RegionOrEndpoint::with_region(String::from("localstack"))), compression: Compression::gzip_default(), ..config() },