mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* feat(ses): implement v1 ReorderReceiptRuleSet and CloneReceiptRuleSet Completes the SES v1 receipt management surface with the two remaining rule-set actions, both reproducing wire behavior probed against real AWS (us-east-1, 2026-09). ReorderReceiptRuleSet demands an exact permutation of the set's rules, with the probed error precedence: rule-set existence first, then a duplicate request name (InvalidParameterValue "Multiple positions found for rule", even when the duplicated name is not in the set), then set rules absent from the request (listed in set order), then request names not in the set (RuleDoesNotExist, first in request order). RuleNames members validate at the Smithy layer under the bare 'ruleNames' path with a nested list-member constraint whose length cap is 100; there is no service-level "Not a valid ruleName" stage, so a 65-char name lands on RuleDoesNotExist. A failed reorder leaves the order unchanged. CloneReceiptRuleSet deep-copies the source's rules under a new creation timestamp; the active flag stays behind. Name validation is two-layer for both members: the Smithy pattern combines violations with originalRuleSetName listed first, and the service-level 64-char check reports the target before the source. An existing target wins over a missing source (AlreadyExists before RuleSetDoesNotExist). Covered by unit tests, Query-protocol integration tests, and AWS SDK compatibility tests run against a live local instance. * fix(ses): parse ReorderReceiptRuleSet RuleNames with the probed AWS index grammar Review flagged that a sparse Query list (RuleNames.member.1 plus member.3) was silently truncated at the first missing index. Probing real SES with raw signed Query requests showed the string-list grammar differs from the receipt-action struct-list grammar: a gap is padded with empty members (which then fail the ruleNames Smithy constraint, so nothing is ever truncated) up to a skip of 10, counted from the previous index or from 1 for a leading gap; a larger gap is MalformedInput "Excessively sparse input would skip N list elements" with a comma-grouped count; an index above 214748369 (exact boundary, found by bisection) is MalformedInput "Index N is illegal"; index 0, a leading-zero spelling, and a non-numeric token are each their own probed MalformedInput; and a repeated index keeps its first value. The same probing showed the ruleNames Smithy violation carries no member index and appears at most once however many members are malformed, so the service now emits it once instead of per member. Covered by wire-level integration tests for each grammar case and a unit test for the single-violation behavior.
sdk-test-java
Compatibility tests for Floci using the AWS SDK for Java v2 (2.31.8).
Runs 352 tests across 17 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 |
AppSyncTest |
GraphQL API CRUDL, data sources, resolvers, functions, types, API keys, tags, schema validation |
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