mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Initial pass on Antithesis testing
This adds a "limbo_stress" tool for stress testing Limbo in non-deterministic way together with support code to run the tests under Antithesis (which makes them deterministic). The stress tester does not really do anything useful yet, this is just a step to make sure we can run tests under Antithesis.
This commit is contained in:
parent
672fe066c1
commit
be4014a1df
15 changed files with 330 additions and 2 deletions
10
scripts/antithesis/launch.sh
Executable file
10
scripts/antithesis/launch.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
curl --fail -u "$ANTITHESIS_USER:$ANTITHESIS_PASSWD" \
|
||||
-X POST https://$ANTITHESIS_TENANT.antithesis.com/api/v1/launch/basic_test \
|
||||
-d "{\"params\": { \"antithesis.description\":\"basic_test on main\",
|
||||
\"antithesis.duration\":\"1\",
|
||||
\"antithesis.config_image\":\"$ANTITHESIS_DOCKER_REPO/limbo-config:antithesis-latest\",
|
||||
\"antithesis.images\":\"$ANTITHESIS_DOCKER_REPO/limbo-workload:antithesis-latest\",
|
||||
\"antithesis.report.recipients\":\"$ANTITHESIS_EMAIL\"
|
||||
} }"
|
19
scripts/antithesis/publish-config.sh
Executable file
19
scripts/antithesis/publish-config.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
export DOCKER_REPO_URL=$ANTITHESIS_DOCKER_REPO
|
||||
|
||||
export IMAGE_NAME=limbo-config
|
||||
|
||||
export DOCKER_IMAGE_VERSION=antithesis-latest
|
||||
|
||||
export DOCKER_BUILD_ARGS="--build-arg antithesis=true"
|
||||
|
||||
export DOCKERFILE=stress/Dockerfile.antithesis-config
|
||||
|
||||
export DOCKER_DIR=stress
|
||||
|
||||
cat turso.key.json | docker login -u _json_key https://$ANTITHESIS_DOCKER_HOST --password-stdin
|
||||
|
||||
${BASH_SOURCE%/*}/publish-docker.sh
|
23
scripts/antithesis/publish-docker.sh
Executable file
23
scripts/antithesis/publish-docker.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$DOCKER_REPO_URL" ]; then
|
||||
echo "Error: DOCKER_REPO_URL is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$IMAGE_NAME" ]; then
|
||||
echo "Error: IMAGE_NAME is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$DOCKER_IMAGE_VERSION" ]; then
|
||||
DOCKER_IMAGE_VERSION=$(git rev-parse HEAD)
|
||||
fi
|
||||
|
||||
DOCKER_IMAGE=$DOCKER_REPO_URL/$IMAGE_NAME:$DOCKER_IMAGE_VERSION
|
||||
|
||||
docker build -f $DOCKERFILE -t $DOCKER_IMAGE $DOCKER_BUILD_ARGS $DOCKER_DIR
|
||||
|
||||
docker push $DOCKER_IMAGE
|
19
scripts/antithesis/publish-workload.sh
Executable file
19
scripts/antithesis/publish-workload.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
export DOCKER_REPO_URL=$ANTITHESIS_DOCKER_REPO
|
||||
|
||||
export IMAGE_NAME=limbo-workload
|
||||
|
||||
export DOCKER_IMAGE_VERSION=antithesis-latest
|
||||
|
||||
export DOCKER_BUILD_ARGS="--build-arg antithesis=true"
|
||||
|
||||
export DOCKERFILE=Dockerfile.antithesis
|
||||
|
||||
export DOCKER_DIR=.
|
||||
|
||||
cat turso.key.json | docker login -u _json_key https://$ANTITHESIS_DOCKER_HOST --password-stdin
|
||||
|
||||
${BASH_SOURCE%/*}/publish-docker.sh
|
Loading…
Add table
Add a link
Reference in a new issue