Skip to content

Commit 27f1d3f

Browse files
committed
Refactor sapcontrol command validation to enhance test case detail aggregation and improve readability
1 parent dd044ce commit 27f1d3f

3 files changed

Lines changed: 21 additions & 19 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ FodyWeavers.xsd
403403
.vscode
404404

405405
# System configuration files
406+
WORKSPACES/*
406407
.ppk
407408
VMWPASSWORD
408409
.coverage.*

requirements.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ attrs==25.3.0
2323
# referencing
2424
azure-common==1.1.28
2525
# via azure-mgmt-network
26-
azure-core==1.33.0
26+
azure-core==1.34.0
2727
# via
2828
# azure-identity
2929
# azure-kusto-data
@@ -34,17 +34,17 @@ azure-identity==1.21.0
3434
# via
3535
# -r requirements.in
3636
# azure-kusto-data
37-
azure-kusto-data==5.0.2
37+
azure-kusto-data==5.0.3
3838
# via
3939
# -r requirements.in
4040
# azure-kusto-ingest
41-
azure-kusto-ingest==5.0.2
41+
azure-kusto-ingest==5.0.3
4242
# via -r requirements.in
4343
azure-mgmt-core==1.5.0
4444
# via azure-mgmt-network
4545
azure-mgmt-network==28.1.0
4646
# via -r requirements.in
47-
azure-storage-blob==12.25.1
47+
azure-storage-blob==12.23.0
4848
# via
4949
# -r requirements.in
5050
# azure-kusto-ingest
@@ -62,7 +62,7 @@ certifi==2025.4.26
6262
# via requests
6363
cffi==1.17.1
6464
# via cryptography
65-
charset-normalizer==3.4.1
65+
charset-normalizer==3.4.2
6666
# via requests
6767
click==8.1.8
6868
# via
@@ -72,7 +72,7 @@ coverage[toml]==7.8.0
7272
# via
7373
# -r requirements.in
7474
# pytest-cov
75-
cryptography==44.0.2
75+
cryptography==44.0.3
7676
# via
7777
# ansible-core
7878
# azure-identity
@@ -169,7 +169,7 @@ pyjwt[crypto]==2.10.1
169169
# via
170170
# msal
171171
# pyjwt
172-
pylint==3.3.6
172+
pylint==3.3.7
173173
# via -r requirements.in
174174
pytest==8.3.5
175175
# via
@@ -254,7 +254,7 @@ urllib3==2.4.0
254254
# via requests
255255
wcmatch==10.0
256256
# via ansible-lint
257-
yamllint==1.37.0
257+
yamllint==1.37.1
258258
# via ansible-lint
259259
zipp==3.21.0
260260
# via importlib-metadata

src/roles/ha_scs/tasks/sapcontrol-config.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,19 @@
5757
{% for res in sapcontrol_results.results %}
5858
- {{ res.sapcontrol_method }}: {{ 'Success' if res.rc == 0 else 'Failed' }}
5959
{% endfor %}
60+
61+
- name: "Test Execution: Validate sapcontrol commands"
62+
ansible.builtin.set_fact:
6063
test_case_details_from_test_case: >-
61-
{{
62-
[
63-
{
64-
'command': item.cmd,
65-
'returnCode': item.rc,
66-
'stdout': item.stdout_lines,
67-
'stderr': item.stderr_lines
68-
}
69-
for item in sapcontrol_results.results
70-
]
71-
}}
64+
{{ test_case_details_from_test_case + [{
65+
'command': sapcontrol_result.cmd,
66+
'returnCode': sapcontrol_result.rc,
67+
'stdout': sapcontrol_result.stdout_lines,
68+
'stderr': sapcontrol_result.stderr_lines
69+
}] }}
70+
loop: "{{ sapcontrol_results.results }}"
71+
loop_control:
72+
loop_var: sapcontrol_result
7273

7374
# /*---------------------------------------------------------------------------
7475
# | Post Validations |

0 commit comments

Comments
 (0)