Files
floci/compatibility-tests/justfile
T
Hector Ventura c22aa88905 chore(compat): remove sdk-test-rust suite and refresh test counts (#1717)
The Rust suite is dropped from the compatibility matrix: the suite
directory, its justfile recipes (test-rust, setup-rust, test-all and
setup aggregates), README rows, and gitignore entry. The Rust SDK client
example in the README stays since the wire protocols remain
language-agnostic.

The README compatibility table had also drifted ~33% behind the real
suites; counts are refreshed from the Jul 2 runtime totals (java 1326,
node 449, python 311, terraform 22, opentofu 16, cdk 20) and static
counts (go 157 subtests, awscli 205 bats tests), with the headline
updated from 1,969 to 2,506 tests across 5 SDKs and 3 IaC tools.
2026-07-03 02:01:01 -05:00

129 lines
3.9 KiB
Makefile

# SDK Compatibility Tests - Task Runner Configuration
# Run `just` to see available commands
set export
set dotenv-load
# Environment defaults
FLOCI_ENDPOINT := env('FLOCI_ENDPOINT', 'http://localhost:4566')
AWS_ACCESS_KEY_ID := env('AWS_ACCESS_KEY_ID', 'test')
AWS_SECRET_ACCESS_KEY := env('AWS_SECRET_ACCESS_KEY', 'test')
AWS_DEFAULT_REGION := env('AWS_DEFAULT_REGION', 'us-east-1')
# Default recipe - list all available commands
default:
@just --list
# Run all SDK tests sequentially (continues on failure)
test-all:
#!/usr/bin/env bash
set +e
failed=0
for suite in python typescript awscli java go; do
echo "=== Running $suite tests ==="
just test-$suite || failed=1
done
exit $failed
# Run Python SDK tests (JUnit XML output)
[working-directory: 'sdk-test-python']
test-python:
pytest tests/ --junit-xml=test-results/junit.xml
# Run TypeScript SDK tests (JUnit XML output via vitest junit reporter)
[working-directory: 'sdk-test-node']
test-typescript:
npm test
# Run AWS CLI tests (JUnit XML output via bats)
test-awscli:
./lib/run-bats-with-junit.sh sdk-test-awscli/test/ sdk-test-awscli/test-results/junit.xml
# Run Java SDK tests (JUnit XML output via Maven Surefire)
[working-directory: 'sdk-test-java']
test-java:
mvn test -q
# Run Go SDK tests (JUnit XML output via gotestsum)
[working-directory: 'sdk-test-go']
test-go:
gotestsum --junitfile test-results.xml ./tests/...
# Install all test dependencies
setup: setup-python setup-typescript setup-awscli setup-java setup-go
# Install Python test dependencies
[working-directory: 'sdk-test-python']
setup-python:
pip install -r requirements.txt
# Install TypeScript test dependencies
[working-directory: 'sdk-test-node']
setup-typescript:
npm install
# Install Java test dependencies
[working-directory: 'sdk-test-java']
setup-java:
mvn dependency:resolve -q
# Install Go test dependencies
[working-directory: 'sdk-test-go']
setup-go:
go mod download
go install gotest.tools/gotestsum@latest
# Install AWS CLI test dependencies (uses shared bats from repo root)
setup-awscli: setup-bats
@echo "AWS CLI test dependencies ready (using shared bats)"
# Install bats-core and helpers for compat tests
setup-bats:
#!/usr/bin/env bash
set -euo pipefail
mkdir -p lib
if [ ! -d "lib/bats-core" ]; then
echo "Cloning bats-core..."
git clone --depth 1 https://github.com/bats-core/bats-core.git lib/bats-core
fi
if [ ! -d "lib/bats-support" ]; then
echo "Cloning bats-support..."
git clone --depth 1 https://github.com/bats-core/bats-support.git lib/bats-support
fi
if [ ! -d "lib/bats-assert" ]; then
echo "Cloning bats-assert..."
git clone --depth 1 https://github.com/bats-core/bats-assert.git lib/bats-assert
fi
echo "Bats dependencies installed!"
# Run CDK compatibility tests (JUnit XML output via bats)
test-cdk:
./lib/run-bats-with-junit.sh compat-cdk/test/ compat-cdk/test-results/junit.xml
# Run Terraform compatibility tests (JUnit XML output via bats)
test-terraform:
./lib/run-bats-with-junit.sh compat-terraform/test/ compat-terraform/test-results/junit.xml
# Run OpenTofu compatibility tests (JUnit XML output via bats)
test-opentofu:
./lib/run-bats-with-junit.sh compat-opentofu/test/ compat-opentofu/test-results/junit.xml
# Run all IaC compatibility tests (continues on failure)
test-compat:
#!/usr/bin/env bash
set +e
failed=0
for suite in cdk terraform opentofu; do
echo "=== Running $suite tests ==="
just test-$suite || failed=1
done
exit $failed
# Remove build artifacts and dependencies
clean:
rm -rf sdk-test-python/__pycache__ sdk-test-python/.pytest_cache sdk-test-python/test-results
rm -rf sdk-test-node/node_modules sdk-test-node/dist sdk-test-node/test-results
rm -rf sdk-test-java/target
rm -rf sdk-test-go/test-results.xml
rm -rf lib/bats-core lib/bats-support lib/bats-assert