mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
fix: preserve Firehose compression format in CloudFormation (#2406)
* fix: preserve Firehose compression format in CloudFormation * test(cloudformation): assert Firehose compression format * test(cloudformation): assert Firehose compression format
This commit is contained in:
1 parent
f2ad05ce22
commit
ebd4a078d3
2 files changed
+12
-6
No files matched your search
+4
@@ -2032,6 +2032,10 @@ public class CloudFormationResourceProvisioner {
|
||||
: (props != null ? props.get("S3DestinationConfiguration") : null);
|
||||
if (s3Node != null && !s3Node.isNull()) {
|
||||
s3 = new DeliveryStreamDescription.S3Destination();
|
||||
|
||||
s3.setCompressionFormat(
|
||||
blankToNull(engine.resolve(s3Node.path("CompressionFormat")))
|
||||
);
|
||||
s3.setBucketArn(blankToNull(engine.resolve(s3Node.path("BucketARN"))));
|
||||
s3.setPrefix(blankToNull(engine.resolve(s3Node.path("Prefix"))));
|
||||
if (s3Node.has("BufferingHints")) {
|
||||
|
||||
+8
-6
@@ -1,13 +1,13 @@
|
||||
package io.github.hectorvent.floci.services.cloudformation;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.restassured.RestAssured;
|
||||
import static io.restassured.RestAssured.given;
|
||||
import io.restassured.config.EncoderConfig;
|
||||
import io.restassured.http.ContentType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
||||
/**
|
||||
* End-to-end check that CloudFormation provisions an AWS::KinesisFirehose::DeliveryStream for real
|
||||
@@ -39,7 +39,8 @@ class CloudFormationFirehoseIntegrationTest {
|
||||
"S3DestinationConfiguration": {
|
||||
"BucketARN": "arn:aws:s3:::my-firehose-bucket",
|
||||
"RoleARN": "arn:aws:iam::000000000000:role/firehose-role",
|
||||
"Prefix": "logs/"
|
||||
"Prefix": "logs/",
|
||||
"CompressionFormat": "GZIP"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,6 +87,7 @@ class CloudFormationFirehoseIntegrationTest {
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString(streamName));
|
||||
.body(containsString(streamName))
|
||||
.body(containsString("GZIP"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user