Files
floci/compatibility-tests/sdk-test-awscli
Michal Schreiber 5033ace772 fix(rds): store and return the encryption and backup settings given on create (#2617)
* fix(rds): store and return the encryption and backup settings given on create

DescribeDBInstances never returned StorageEncrypted, KmsKeyId,
BackupRetentionPeriod or CopyTagsToSnapshot, and wrote both windows as
constants. Store the six values from CreateDBInstance, apply the backup
settings and windows from ModifyDBInstance, and emit them from the
instance XML. A record persisted without them reads as AWS defaults.

KmsKeyId is resolved against the KMS store in the request's region — a
key ARN, key id, alias ARN or alias name — and stored as the key ARN, as
a live account reports it; a key that does not exist or is not enabled
is KMSKeyNotAccessibleFault.

Validation follows a live account: KmsKeyId needs StorageEncrypted,
window times are checked with AWS's wording, windows are at least 30
minutes and may not overlap; the retention period is not range-checked
since AWS accepted 40 days.

Closes #2611

* fix(rds): check window overlap against the windows that will be in effect

A window given alone was not checked at all: the request's other window
was null, so validate() skipped the overlap check although the instance
kept its stored counterpart on modify and got a default on create. Check
the pair that results from the request — on modify the stored other
window, on create the default, swapped for an alternate default when the
given window overlaps it, since AWS picks a random window clear of the
given one. Verified on a live account: a modify overlapping the stored
window is refused either way, replacing both at once checks only the new
pair.

* fix(rds): detect window overlap across the week boundary in both directions

A Sunday backup window running past midnight lies beyond the end of the
week, so comparing it with a Monday maintenance window needs the
maintenance interval shifted forward as well as back.

* fix(rds): derive the default counterpart window from the given one's end

A fixed alternate default cannot be clear of every window a request can
give — a 00:00-07:00 backup window covers it. When the window given on
create overlaps the usual default, pair it with a 30-minute window that
starts the minute the given one ends, which is clear of a daily window by
construction; the overlap check stays as the backstop.

* fix(rds): refuse a window given alone that leaves no room for the other, in AWS's words

The derived counterpart is clear of any window that leaves a 30-minute
gap (swept over every start and length in DbInstanceSettingsTest); a
window longer than that has no clear counterpart, and a live account
refuses it: "The specified backup window overlaps all available default
maintenance windows. Shrink the backup window or specify a non-overlapping
maintenance window." (mirrored for maintenance), and a maintenance
window of 24 hours or more is "Maintenance window must be less than 24
hours."

* refactor(rds): share the window checks with BackupWindows
2026-08-28 18:07:08 -04:00
..

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