mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(ses): omit MailFromAttributes if MAIL FROM domain is not configured (#1273)
This commit is contained in:
1 parent
ee341003bf
commit
f8cf476848
3 files changed
+18
-11
No files matched your search
+11
-2
@@ -9,6 +9,7 @@ import org.junit.jupiter.api.TestMethodOrder;
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@QuarkusTest
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
@@ -30,6 +31,15 @@ class SesIdentityAttributesV2IntegrationTest {
|
||||
.post("/v2/email/identities")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
// Verify MailFromAttributes is omitted by default
|
||||
given()
|
||||
.header("Authorization", AUTH_HEADER)
|
||||
.when()
|
||||
.get("/v2/email/identities/v2-attrs.floci.test")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("MailFromAttributes", nullValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -84,8 +94,7 @@ class SesIdentityAttributesV2IntegrationTest {
|
||||
.get("/v2/email/identities/v2-attrs.floci.test")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("MailFromAttributes.MailFromDomain", equalTo(""))
|
||||
.body("MailFromAttributes.MailFromDomainStatus", equalTo("NOT_STARTED"));
|
||||
.body("MailFromAttributes", nullValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1189,9 +1189,7 @@ class SesV2IntegrationTest {
|
||||
.body("DkimAttributes", notNullValue())
|
||||
.body("DkimAttributes.SigningEnabled", notNullValue())
|
||||
.body("DkimAttributes.Status", notNullValue())
|
||||
.body("MailFromAttributes", notNullValue())
|
||||
.body("MailFromAttributes.MailFromDomainStatus", equalTo("NOT_STARTED"))
|
||||
.body("MailFromAttributes.BehaviorOnMxFailure", equalTo("USE_DEFAULT_VALUE"))
|
||||
.body("MailFromAttributes", nullValue())
|
||||
.body("Policies", notNullValue())
|
||||
.body("Tags", notNullValue());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user