mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* feat(athena): support ListTagsForResource for workgroups Fixes #2791. terraform-provider-aws's read/refresh for aws_athena_workgroup calls ListTagsForResource unconditionally, even when no tags are set, and floci's Athena handler had no support for the action: Error: listing tags for Athena WorkGroup ...: InvalidAction: Action ListTagsForResource is not supported Parses the workgroup name out of the ResourceARN (using the existing AwsArnUtils helper) and returns the tags already captured on CreateWorkGroup. The primary workgroup always answers with an empty list, matching a live account, since CreateWorkGroup already rejects "primary" and it can never carry real tags. An ARN for an unsupported resource type, or naming a workgroup that doesn't exist, faults with InvalidRequestException like the rest of this handler's not-found cases. * docs(athena): sync the supported-actions table for ListTagsForResource * fix(athena): reject ListTagsForResource ARNs naming a different service pgermosen (review): listTagsForResource only checked that the ARN's resource path started with workgroup/, never the service, so an ARN naming a completely different service with a coincidentally matching region and workgroup name resolved instead of being rejected the way real AWS rejects a ResourceARN naming the wrong service. Adds the explicit arn.service() == "athena" check, plus a RestAssured test proving a workgroup-shaped ARN under a different service is rejected even when a same-named workgroup genuinely exists. Verified by disabling the check and confirming the new test fails with the exact expected 400-vs-200 mismatch before restoring it. Also adds an SDK-client test (AthenaTest, compat suite) round-tripping ListTagsForResource through the real AthenaClient, per review request to validate request/response shapes the way other management API PRs do.
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