-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancing the logging framework for the check operator (#378)
* Enhancing the logging framework for the check operator * Enhancing the logging framework for the check operator
- Loading branch information
1 parent
f25ee17
commit e6a3238
Showing
9 changed files
with
667 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
hosts: | ||
- device: host | ||
# - device: 10.221.140.168 | ||
username: regress | ||
passwd: MaRtInI | ||
# port: 22 | ||
tests: | ||
# - test_is_equal.yml | ||
# - issue_377.yml | ||
# - issue_377_customer.yml | ||
- test_delta_op.py | ||
# - test_no_diff_op.py | ||
# - test_list_not_less_op.py | ||
# - test_list_not_more_op.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<summary> | ||
<count style="state"> | ||
<active>70663</active> | ||
<key>z</key> | ||
<style>4</style> | ||
<total>69772</total> | ||
</count> | ||
<count style="type"> | ||
<id>a</id> | ||
<session>24260</session> | ||
</count> | ||
<count style="type"> | ||
<id>2</id> | ||
<session>24512</session> | ||
</count> | ||
<count style="value"> | ||
<id>first</id> | ||
<session>24</session> | ||
</count> | ||
<count style="value"> | ||
<id>second</id> | ||
<session>512</session> | ||
</count> | ||
<system> | ||
<status>2</status> | ||
<count>125</count> | ||
</system> | ||
<system> | ||
<status>1</status> | ||
<count>25</count> | ||
</system> | ||
</summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<summary> | ||
<count style="state"> | ||
<active>70663</active> | ||
<key>z</key> | ||
<total>69775</total> | ||
<style>45</style> | ||
<status>34</status> | ||
</count> | ||
<count style="type"> | ||
<id>a</id> | ||
<session>24261</session> | ||
</count> | ||
<count style="type"> | ||
<id>2</id> | ||
<session>24543</session> | ||
</count> | ||
<count style="value"> | ||
<id>first</id> | ||
<session>24</session> | ||
</count> | ||
<count style="value"> | ||
<id>second</id> | ||
<session>512</session> | ||
</count> | ||
<system> | ||
<status>2</status> | ||
<count>125</count> | ||
</system> | ||
</summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
tests_include: | ||
- test_1_element_no_id_pass_1_value | ||
- test_1_element_with_id_same_node_name_pass_1_value | ||
- test_1_element_with_id_diff_node_name_pass_1_value | ||
- test_1_element_with_2_id_diff_node_name_pass_1_value | ||
- test_1_element_with_id_diff_node_name_fail_1_value | ||
- test_1_element_with_id_diff_node_name_fail_1_no_xpath | ||
- test_1_element_with_id_diff_node_name_diff_id_fail_2_value | ||
- test_1_element_with_id_diff_node_name_diff_id_pass_1_fail_1_value | ||
- test_2_element_with_id_diff_node_name_pass_2_value | ||
|
||
test_1_element_no_id_pass_1_value: | ||
- command: show summary | ||
- item: | ||
xpath: //summary/count[@style='state'] | ||
id: . | ||
tests: | ||
- delta: active, 10% | ||
# - delta: , 10% | ||
err: ' Failed!!change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["active"]}} and post <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_same_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active | ||
tests: | ||
- delta: active, 10% | ||
# - delta: , 10% | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["active"]}} and post <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active | ||
tests: | ||
- delta: total, 10% | ||
err: ' Failed!! change from {{pre["total"]}} to {{post["total"]}}' | ||
info: 'Details is 1st <{{id_0}}> : {{pre["total"]}} and 2nd <{{id_0}}> : {{post["total"]}}' | ||
|
||
test_1_element_with_2_id_diff_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active, key | ||
tests: | ||
- delta: total, 10% | ||
err: ' Failed!! change from {{pre["total"]}} to {{post["total"]}}' | ||
info: 'Details is 1st <{{id_0}}>,<{{id_1}}> : {{pre["total"]}} and 2nd <{{id_0}}>,<{{id_1}}> : {{post["total"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_fail_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: key | ||
tests: | ||
- delta: style, 10% | ||
err: 'Failed!! change from {{pre["style"]}} to {{post["style"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["style"]}} and pre <{{id_0}}> : {{post["style"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_fail_1_no_xpath: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/counting | ||
id: key | ||
tests: | ||
- delta: style, 10% | ||
err: 'Failed!! change from {{pre["style"]}} to {{post["style"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["style"]}} and pre <{{id_0}}> : {{post["style"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_diff_id_fail_2_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: style | ||
tests: | ||
- delta: total ,10% | ||
err: 'Failed!! change from pre <{{id_0}}> : {{pre["total"]}} to post <{{id_0}}> : {{post["total"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["total"]}} and post <{{id_0}}> : {{post["total"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_diff_id_pass_1_fail_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/system | ||
id: status | ||
tests: | ||
- delta: count ,10% | ||
err: 'Failed!! change from pre <{{id_0}}> : {{pre["count"]}} to post <{{id_0}}> : {{post["count"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["count"]}} and post <{{id_0}}> : {{post["count"]}}' | ||
|
||
test_2_element_with_id_diff_node_name_pass_2_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='type'] | ||
id: id | ||
tests: | ||
- delta: session, 10% | ||
err: ' Failed!! Total session change from {{pre["session"]}} to {{post["session"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["session"]}} and post <{{id_0}}> : {{post["session"]}}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
tests_include: | ||
- test_1_element_no_id_pass_1_value | ||
- test_1_element_with_id_same_node_name_pass_1_value | ||
- test_1_element_with_id_diff_node_name_pass_1_value | ||
- test_1_element_with_2_id_diff_node_name_pass_1_value | ||
- test_1_element_with_id_diff_node_name_fail_1_value | ||
- test_2_element_with_id_diff_node_name_pass_2_value | ||
|
||
test_1_element_no_id_pass_1_value: | ||
- command: show summary | ||
- item: | ||
xpath: //summary/count[@style='state'] | ||
id: . | ||
tests: | ||
- list-not-less: active | ||
err: ' Failed!!change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["active"]}} and post <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_same_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active | ||
tests: | ||
- list-not-less: active | ||
# - list-not-less: | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["active"]}} and post <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: key | ||
tests: | ||
- list-not-less: active | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is 1st <{{id_0}}> : {{pre["active"]}} and 2nd <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_2_id_diff_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active, key | ||
tests: | ||
- list-not-less: active | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is 1st <{{id_0}}>,<{{id_1}}> : {{pre["active"]}} and 2nd <{{id_0}}>,<{{id_1}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_fail_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active | ||
tests: | ||
- list-not-less: style | ||
err: 'Failed!! change from {{pre["style"]}} to {{post["style"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["style"]}} and pre <{{id_0}}> : {{post["style"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_diff_id_missing_fail_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: style | ||
tests: | ||
- list-not-less: total | ||
err: 'Failed!! change from pre <{{id_0}}> : {{pre["total"]}} to post <{{id_0}}> : {{post["total"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["total"]}} and post <{{id_0}}> : {{post["total"]}}' | ||
|
||
test_2_element_with_id_diff_node_name_pass_2_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='value'] | ||
id: id | ||
tests: | ||
- list-not-less: session | ||
err: ' Failed!! Total session change from {{pre["session"]}} to {{post["session"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["session"]}} and post <{{id_0}}> : {{post["session"]}}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
tests_include: | ||
- test_1_element_no_id_pass_1_value | ||
- test_1_element_with_id_same_node_name_pass_1_value | ||
- test_1_element_with_id_diff_node_name_pass_1_value | ||
- test_1_element_with_2_id_diff_node_name_pass_1_value | ||
- test_1_element_with_id_diff_node_name_fail_1_value | ||
- test_1_element_with_id_diff_node_name_diff_id_pass_1_fail_1_value | ||
- test_2_element_with_id_diff_node_name_pass_2_value | ||
|
||
test_1_element_no_id_pass_1_value: | ||
- command: show summary | ||
- item: | ||
xpath: //summary/count[@style='state'] | ||
id: . | ||
tests: | ||
- list-not-more: active | ||
err: ' Failed!!change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["active"]}} and post <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_same_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active | ||
tests: | ||
- list-not-more: active | ||
# - list-not-more: | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["active"]}} and post <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: key | ||
tests: | ||
- list-not-more: active | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is 1st <{{id_0}}> : {{pre["active"]}} and 2nd <{{id_0}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_2_id_diff_node_name_pass_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active, key | ||
tests: | ||
- list-not-more: active | ||
err: ' Failed!! change from {{pre["active"]}} to {{post["active"]}}' | ||
info: 'Details is 1st <{{id_0}}>,<{{id_1}}> : {{pre["active"]}} and 2nd <{{id_0}}>,<{{id_1}}> : {{post["active"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_fail_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='state'] | ||
id: active | ||
tests: | ||
- list-not-more: style | ||
err: 'Failed!! change from {{pre["style"]}} to {{post["style"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["style"]}} and pre <{{id_0}}> : {{post["style"]}}' | ||
|
||
test_1_element_with_id_diff_node_name_diff_id_pass_1_fail_1_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/system | ||
id: status | ||
tests: | ||
- list-not-more: count | ||
err: 'Failed!! change from pre <{{id_0}}> : {{pre["count"]}} to post <{{id_0}}> : {{post["count"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["count"]}} and post <{{id_0}}> : {{post["count"]}}' | ||
|
||
test_2_element_with_id_diff_node_name_pass_2_value: | ||
- command: show summary | ||
- iterate: | ||
xpath: //summary/count[@style='value'] | ||
id: id | ||
tests: | ||
- list-not-more: session | ||
err: ' Failed!! Total session change from {{pre["session"]}} to {{post["session"]}}' | ||
info: 'Details is pre <{{id_0}}> : {{pre["session"]}} and post <{{id_0}}> : {{post["session"]}}' | ||
|
Oops, something went wrong.