mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 14:57:54 -05:00
* refactor: narrow exception handling to transport-level failures only The broad catch(Exception) in the Lambda dispatch probe and warmup swallowed all errors, masking real service regressions as skipped tests. Narrow to specific transport-level exceptions so only environment unavailability (timeout, connection refused) triggers a skip: - Java probe: SdkClientException + ConnectException (not all Exception) - APIGW warmup: HttpTimeoutException + ConnectException - Go invoke: net.Error via errors.As (not any error) Unexpected service errors now propagate as test failures. * fix: remove unreachable ConnectException catch in lambda probe AWS SDK wraps all transport-level failures (ConnectException, ApiCallTimeoutException, etc.) in SdkClientException, so the separate ConnectException catch was unreachable and broke compilation. * fix(compat): use unique_name in s3-notifications.bats to avoid parallel collisions Parallel bats workers could share the same $(date +%s) timestamp, producing identical bucket/queue/topic names. One worker's put-bucket-notification-configuration would overwrite another's, and the round-trip read would return zero filter rules. Switch to unique_name which appends the shell PID. * fix(compat): use unique_name in kms and ses bats to avoid parallel collisions Same class of flake as s3-notifications.bats. Under --jobs 4, parallel bats workers sharing a $(date +%s) timestamp produce identical alias names (kms) and identity names (ses), causing cross-worker interference.
sdk-test-awscli
Compatibility tests for Floci using the AWS CLI v2 (2.22.35).
Tests are plain bash scripts that call aws CLI commands with --endpoint-url pointed at the emulator.
Services Covered
| Group | Description |
|---|---|
ssm |
Parameter Store — put, get, path, tags |
sqs |
Queues, send/receive/delete, attributes |
sns |
Topics, publish, attributes |
s3 |
Buckets, objects, tagging, copy, delete |
dynamodb |
Tables, put/get/update/query/delete items |
iam |
Users, roles, create/get/delete |
sts |
GetCallerIdentity |
ses |
Identities, sending, quotas, notification attributes |
secretsmanager |
Create/get/put/list/tag/delete secrets |
kms |
Keys, aliases, encrypt/decrypt |
cognito |
User pools, clients |
s3-notifications |
S3 → SQS event notifications |
Requirements
- AWS CLI v2
- bash
- jq
- bats-core (installed via
just setup-awscli)
Running
# All groups (from compatibility-tests/)
just test-awscli
# Run bats directly
./lib/run-bats-with-junit.sh sdk-test-awscli/test/ sdk-test-awscli/test-results/junit.xml
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-awscli .
docker run --rm --network host floci-sdk-awscli
# Custom endpoint (macOS/Windows)
docker run --rm -e FLOCI_ENDPOINT=http://host.docker.internal:4566 floci-sdk-awscli