From a453ac31f3428614cceb99027f8efbdb9258a40b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 22:03:01 +0200 Subject: Adding upstream version 2.10.7+merged+base+2.10.8+dfsg. Signed-off-by: Daniel Baumann --- .../integration/targets/throttle/test_throttle.yml | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 test/integration/targets/throttle/test_throttle.yml (limited to 'test/integration/targets/throttle/test_throttle.yml') diff --git a/test/integration/targets/throttle/test_throttle.yml b/test/integration/targets/throttle/test_throttle.yml new file mode 100644 index 00000000..8990ea2f --- /dev/null +++ b/test/integration/targets/throttle/test_throttle.yml @@ -0,0 +1,84 @@ +--- +- hosts: localhosts + gather_facts: false + strategy: linear + run_once: yes + tasks: + - name: Clean base throttledir '{{ base_throttledir }}' + file: + state: absent + path: '{{ base_throttledir }}' + ignore_errors: yes + + - name: Create throttledir '{{ throttledir }}' + file: + state: directory + path: '{{ throttledir }}' + loop: "{{ range(1, test_count|int)|list }}" + loop_control: + loop_var: test_id + vars: + test_count: "{{ 9 if lookup('env', 'SELECTED_STRATEGY') in ['free', 'host_pinned'] else 2 }}" + +- hosts: localhosts + gather_facts: false + strategy: "{{ lookup('env', 'SELECTED_STRATEGY') }}" + tasks: + - block: + - name: "Test 1 (max throttle: 3)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 3" + vars: + test_id: 1 + throttle: 3 + - block: + - name: "Test 2 (max throttle: 5)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 5" + throttle: 5 + vars: + test_id: 2 + - block: + - name: "Test 3 (max throttle: 8)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 8" + throttle: 8 + throttle: 6 + vars: + test_id: 3 + - block: + - block: + - name: "Test 4 (max throttle: 8)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 8" + throttle: 8 + vars: + test_id: 4 + throttle: 6 + throttle: 12 + throttle: 15 + - block: + - name: "Teat 5 (max throttle: 3)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 3" + vars: + test_id: 5 + throttle: 3 + - block: + - name: "Test 6 (max throttle: 5)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 5" + throttle: 5 + vars: + test_id: 6 + - block: + - name: "Test 7 (max throttle: 6)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 6" + throttle: 6 + vars: + test_id: 7 + throttle: 3 + - block: + - block: + - name: "Test 8 (max throttle: 8)" + script: "test_throttle.py {{throttledir}} {{inventory_hostname}} 8" + throttle: 8 + vars: + test_id: 8 + throttle: 6 + throttle: 4 + throttle: 2 -- cgit v1.2.3