Files
floci/compatibility-tests/sdk-test-java
Kenshin Okinaka 19b0432b8c feat(ses): apply suppression list during send with per-CS SuppressionOptions override (#1109)
When SendEmail / SendRawEmail is called with a recipient on the
account-level suppression list whose reason matches the effective
SuppressedReasons (the configuration set's SuppressionOptions
override if present, else the account-level reasons), Floci now:

1. Emits a synthetic Bounce or Complaint event (per the suppression
   reason) through the configured event destinations alongside the
   always-emitted Send event.
2. Drops the suppressed recipient from the SMTP relay step, while
   still delivering the message to non-suppressed recipients on the
   same send.

The SendEmail API response (200 + MessageId), the stored SentEmail
(used by the LocalStack-compatible /_aws/ses inspection endpoint),
and the published event's mail.destination all continue to reflect
the original recipient list — matching how AWS reports the message
at the API and event layers.

This PR bundles two related pieces:
- The per-configuration-set SuppressionOptions block (Put endpoint +
  GetConfigurationSet response shape + getEffectiveSuppressedReasons
  helper). Mirrors AWS V2 PutConfigurationSetSuppressionOptions:
  empty list = explicit "no suppression filtering" for this CS,
  unset block = fall back to account-level reasons. The validation
  message for the new endpoint matches the AWS V2 natural-language
  form ("Reason <X> is invalid, must be one of [BOUNCE, COMPLAINT].")
  which is distinct from the V1-style nested message returned by the
  three older suppression endpoints; both forms were verified
  against live AWS on 2026-06-03.
- The send-time filter + synthetic-event partitioning, plumbed
  through getEffectiveSuppressedReasons so the override takes effect
  per-send. collectSuppressedReasons and resolveSuppressionReason
  now both take configurationSetName, hitting the per-CS override
  when present and falling back to the account-level reasons
  otherwise.

Per-recipient: when only some recipients are suppressed, the
non-suppressed ones still reach smtpRelay.relay() / relayRaw().
The relay is skipped entirely only when every recipient is
suppressed.

- Recipient suppressed with reason BOUNCE (and BOUNCE in the
  effective reasons) -> synthetic Bounce event; not relayed.
- Recipient suppressed with reason COMPLAINT (and COMPLAINT in the
  effective reasons) -> synthetic Complaint event; not relayed.
- Reason mismatch or address not on the list -> Send only; relayed
  normally.
- Simulator-address recipients and suppression-listed recipients
  are unioned into the same event's recipient list, deduplicated.

Tests
- SesConfigurationSetSuppressionOptionsV2IntegrationTest (16 cases)
  for the CRUD + helper.
- SesConfigurationSetTest SDK compat (6 V2 cases) using
  SesV2Client.PutConfigurationSetSuppressionOptions and the typed
  SuppressionListReason enum (+ the WithStrings escape hatch for
  the server-side validation path).
- SesServiceSmtpTest grows four cases pinning the send-time
  override behaviour: empty list on the CS disables filtering and
  the relay receives the address; BOUNCE-only override leaves
  COMPLAINT-suppressed addresses unfiltered; a CS without an
  override falls back to account-level (parity with no-CS sends);
  raw-send mirrors the JSON-send path.
- SesEventPayload / SesEventPublishingV2IntegrationTest / further
  send-path coverage from the original suppression PR is preserved.
- All 452 SES tests pass.
2026-06-03 21:57:20 -05:00
..

sdk-test-java

Compatibility tests for Floci using the AWS SDK for Java v2 (2.31.8).

Runs 313 tests across 16 test classes against a live Floci instance — no mocks.

Services Covered

Test class Description
SsmTest Parameter Store — put, get, path, tags
SqsTest Queues, send/receive/delete, DLQ, visibility
SnsTest Topics, subscriptions, publish, SQS delivery
S3Test Buckets, objects, tagging, copy, multipart, batch delete
DynamoDbTest Tables, CRUD, batch, TTL, tags, streams
DynamoDbScanConditionTests Scan filter and condition expressions
LambdaTest Create/invoke/update/delete functions
IamTest Users, roles, policies, access keys
StsTest GetCallerIdentity, AssumeRole, GetSessionToken
SecretsManagerTest Create/get/put/list/delete secrets, versioning, tags
KmsTest Keys, aliases, encrypt/decrypt, data keys, sign/verify
CloudWatchTest PutMetricData, ListMetrics, GetMetricStatistics, alarms
CloudFormationVirtualHostTests Virtual host style S3 access via CloudFormation
ApigwSfnJsonataCrudlTests API Gateway + Step Functions JSONata CRUDL integration
ApiGatewayV2WebSocketAndExtendedOpsTest API GW v2 WebSocket APIs, Update ops, Route/Integration Responses, Models, Tagging
Ec2Tests EC2 instances, VPCs, security groups, subnets
EcsTests ECS clusters, task definitions, services

Adding a New Test

Create a standard JUnit 5 test class in src/test/java/com/floci/test/. Tests run against a live Floci instance using real AWS SDK clients.

Requirements

  • Java 17+
  • Maven

Running

# All tests
mvn test -q

# Specific test class
mvn test -Dtest=S3Test

# Via just (from compatibility-tests/)
just test-java

Configuration

Variable Default Description
FLOCI_ENDPOINT http://localhost:4566 Floci emulator endpoint

AWS credentials are always test / test / us-east-1.

Docker

docker build -t floci-sdk-java .
docker run --rm --network host floci-sdk-java

# Custom endpoint (macOS/Windows)
docker run --rm -e FLOCI_ENDPOINT=http://host.docker.internal:4566 floci-sdk-java