Files
floci/compatibility-tests/sdk-test-java
Kenshin Okinaka 010bbd15cd feat(ses): add v2 PutAccountSuppressionAttributes (#853)
Implements PUT /v2/email/account/suppression so callers can change the
account-level suppression list reasons (BOUNCE / COMPLAINT). Entries
are persisted per region in ses-account-suppression.json via a new
AccountSuppressionAttributes model.

GetAccount's response is extended with a SuppressionAttributes object
that carries the stored SuppressedReasons. The setting itself is
metadata-only — floci does not synthesise bounce/complaint events so
no auto-suppression is triggered; the configuration round-trips for
SDK users and tooling that introspects account-level settings.

Behaviour aligned with real-AWS verification:

- SuppressedReasons accepts BOUNCE / COMPLAINT, validated against the
  AWS-canonical nested "Member must satisfy constraint:
  [Member must satisfy enum value set: [BOUNCE, COMPLAINT]]" wording
  (verbatim match against real AWS).
- SuppressedReasons may be omitted (treated as empty list) or supplied
  as an empty array (clears the reasons) — both return 200.
- Non-textual array members (JSON null, numeric, etc.) are rejected
  with BadRequestException.
- Fresh regions report the AWS-default [BOUNCE, COMPLAINT] via
  GetAccount; an explicit PUT (including an empty list) overrides it.
- The optional ValidationAttributes body field is accepted but not
  parsed (Tier S scope).

Tests:
- SesV2IntegrationTest gains nine cases covering store-and-list,
  clear-with-empty-array, missing field defaulting to empty, invalid
  Reason (with the AWS-canonical nested message asserted), non-array
  SuppressedReasons, JSON null array member, numeric array member,
  optional ValidationAttributes, and the default-on-fresh-region
  assertion in the existing getAccount case.
- SesAccountSuppressionTest exercises the Java SDK round trip and an
  explicit empty list through SesV2Client; @BeforeAll captures the
  caller's existing SuppressedReasons and @AfterAll restores it with
  failures surfaced so a real-AWS run cannot silently leave the
  account with auto-suppression disabled.
2026-05-15 22:59:14 -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