mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 07:11:11 -05:00
* test(appconfig): add edge case coverage for polling, deployments, empty configs Extends both AppConfigIntegrationTest (internal Quarkus) and the compat-suite AppConfigTest with five additional cases: - stale configuration token is rejected with BadRequestException once a newer next-poll token has been issued - syntactically invalid configuration token is rejected - updated deployment is visible when polling with the next-poll token (create v2 hosted config, start deployment, confirm response body flips to v2 payload and Version-Label header updates) - RequiredMinimumPollIntervalInSeconds is accepted in the start configuration session request but NOT enforced on subsequent polls (pins current Floci behavior per PLAN_FLOCI_2 Phase 1 decision: storing-but-not-enforcing is the behavior under test, enforcement would be a separate feature PR) - empty configuration profile (no hosted config version, no deployment) returns an empty octet-stream body with empty Version-Label No changes to AppConfigDataService or any main sources; this is test-only expansion over existing scaffolding. * fix(test): address review findings for AppConfig edge case tests Document poll-interval 15s as known emulator deviation (AWS returns the requested value, emulator always returns 15). Add explicit nextPollIntervalInSeconds() assertions to the SDK compat test. Clarify null vs "" Version-Label difference between SDK and HTTP transport layers.
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