mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* fix(apigatewayv2): propagate deploymentId when creating a stage ApiGatewayV2Service.createStage was dropping the deploymentId field from the CreateStage request, so stages were being created without their stage->deployment linkage. The management API handler now stores deploymentId on the Stage model. Required for stage->deployment round-trip verification; surfaced by the upcoming ApiGatewayV2ManagementTest which asserts GetStage returns the deploymentId that CreateStage was called with. * test(apigatewayv2): add management API compat suite New ApiGatewayV2ManagementTest covering the control-plane CRUD surface: API, route, integration, stage, deployment, authorizer create/get/list/delete round-trips via ApiGatewayV2Client. Scope: - create/get/list/delete for each resource - JWT authorizer shape (token path only) - stage->deployment linkage (depends on the createStage deploymentId fix in the preceding commit) - round-trips that assert response field shapes match the SDK model Out of scope (intentional, per PLAN_FLOCI_2 Phase 2): - No update endpoints - @PATCH/@PUT handlers do not exist in the v2 management block (ApiGatewayController.java:783-1020) - No execute-api / dispatch / Lambda invocation - that is Phase 7 - No REQUEST authorizer coverage - no dispatch path exists today * fix(test): assert deploymentId in getStages list response Codex review flagged that the list endpoint assertion only checked stageName but not deploymentId. Added filtered assertion to verify the deployment reference survives the list round-trip. * fix(test): use deploymentStatusAsString() for enum comparison SDK returns DeploymentStatus enum, not a String. Using deploymentStatusAsString() avoids type mismatch assertion failure.
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 |
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