From cfb02f45edd7e9d8c43c28d8973f04902351eea4 Mon Sep 17 00:00:00 2001 From: cellarspoon Date: Fri, 24 Dec 2021 00:25:33 +0100 Subject: [PATCH] test: add test files --- tests/apps/works/compose.yml | 84 ++++++++++++++++++++++++++++++++++++ tests/default/works.env | 1 + 2 files changed, 85 insertions(+) create mode 100644 tests/apps/works/compose.yml create mode 100644 tests/default/works.env diff --git a/tests/apps/works/compose.yml b/tests/apps/works/compose.yml new file mode 100644 index 00000000..5dba3672 --- /dev/null +++ b/tests/apps/works/compose.yml @@ -0,0 +1,84 @@ +--- + +# The goal of this compose file is to have a testing ground for understanding +# what cases we need to handle to get stable deployments. For that, we need to +# work with healthchecks and deploy configurations quite closely. If you run +# the `make symlink` target then this will be loaded into a "fake" app on your +# local machine which you can deploy with `abra`. + +version: "3.8" +services: + r1_should_work: + image: redis:alpine + deploy: + update_config: + failure_action: rollback + order: start-first + rollback_config: + order: start-first + restart_policy: + max_attempts: 1 + healthcheck: + test: redis-cli ping + interval: 2s + retries: 3 + start_period: 1s + timeout: 3s + + r2_broken_health_check: + image: redis:alpine + deploy: + update_config: + failure_action: rollback + order: start-first + rollback_config: + order: start-first + restart_policy: + max_attempts: 3 + healthcheck: + test: foobar + interval: 2s + retries: 3 + start_period: 1s + timeout: 3s + + r3_no_health_check: + image: redis:alpine + deploy: + update_config: + failure_action: rollback + order: start-first + rollback_config: + order: start-first + restart_policy: + max_attempts: 3 + + r4_disabled_health_check: + image: redis:alpine + deploy: + update_config: + failure_action: rollback + order: start-first + rollback_config: + order: start-first + restart_policy: + max_attempts: 3 + healthcheck: + disable: true + + r5_should_also_work: + image: redis:alpine + deploy: + update_config: + failure_action: rollback + order: start-first + rollback_config: + order: start-first + restart_policy: + max_attempts: 1 + healthcheck: + test: redis-cli ping + interval: 2s + retries: 3 + start_period: 1s + timeout: 3s diff --git a/tests/default/works.env b/tests/default/works.env new file mode 100644 index 00000000..aa318fd7 --- /dev/null +++ b/tests/default/works.env @@ -0,0 +1 @@ +TYPE=works