From 8aa59dcf00d9f4b64f9f29e2451f7dc4578a40e6 Mon Sep 17 00:00:00 2001 From: Shreeya Patel Date: Mon, 21 Apr 2025 18:16:02 +0530 Subject: [PATCH] WIP Add fault injection template Add a basic template for fault injection which lets us override various default parameters if needed for the test. Signed-off-by: Shreeya Patel --- config/runtime/fault-injection.jinja2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 config/runtime/fault-injection.jinja2 diff --git a/config/runtime/fault-injection.jinja2 b/config/runtime/fault-injection.jinja2 new file mode 100644 index 000000000..5fcaa9d00 --- /dev/null +++ b/config/runtime/fault-injection.jinja2 @@ -0,0 +1,18 @@ +{% set test_method = 'fault-injection' %} +{% set base_template = 'base/' + runtime + '.jinja2' %} +{%- extends base_template %} + +{# Default parameters that can be overridden in job definitions #} +{% set iterations = iterations|default(5) %} +{% set fail_type = fail_type|default('failslab') %} + +{% block test_parameters %} + test_name: "{{ test_name }}", + test_command: "{{ test_command }}", + fail_type: "{{ fail_type }}", + probability: {{ probability|default(100) }}, + times: {{ times|default(100) }}, + interval: {{ interval|default(100) }}, + sleep_time: {{ sleep_time|default(10) }}, + iterations: {{ iterations }} +{% endblock %}