Skip to content

Commit

Permalink
fix(ci): Fix aws_kinesis_firehose and elasticsearch integration tests (
Browse files Browse the repository at this point in the history
…#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 <jesse@szwedko.me>
  • Loading branch information
jszwedko committed Apr 22, 2022
1 parent 6badc76 commit d43c3a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sinks/aws_kinesis_firehose/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/sinks/elasticsearch/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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,
Expand All @@ -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()
},
Expand Down

0 comments on commit d43c3a0

Please sign in to comment.