4fe08441be
* Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
106 lines
2.5 KiB
YAML
106 lines
2.5 KiB
YAML
- name: Warn user
|
|
win_toast:
|
|
expire: 10
|
|
msg: Keep calm and carry on.
|
|
register: msg_result
|
|
ignore_errors: True
|
|
|
|
- name: Test msg_result when can_toast is true (normal mode, users)
|
|
assert:
|
|
that:
|
|
- msg_result is not failed
|
|
- msg_result.time_taken > 10
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == False
|
|
- user_count.stdout|int > 0
|
|
|
|
- name: Test msg_result when can_toast is true (normal mode, no users)
|
|
assert:
|
|
that:
|
|
- msg_result is not failed
|
|
- msg_result.time_taken > 0.1
|
|
- msg_result.toast_sent == False
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == False
|
|
- user_count.stdout|int == 0
|
|
|
|
- name: Test msg_result when can_toast is true (check mode, users)
|
|
assert:
|
|
that:
|
|
- msg_result is not failed
|
|
- msg_result.time_taken > 0.1
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == True
|
|
|
|
- name: Test msg_result when can_toast is true (check mode, no users)
|
|
assert:
|
|
that:
|
|
- msg_result is not failed
|
|
- msg_result.time_taken > 0.1
|
|
- msg_result.toast_sent == False
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == True
|
|
- user_count.stdout|int == 0
|
|
|
|
- name: Test msg_result when can_toast is false
|
|
assert:
|
|
that:
|
|
- msg_result is failed
|
|
when: can_toast == False
|
|
|
|
- name: Warn user again
|
|
win_toast:
|
|
expire: 10
|
|
msg: Keep calm and carry on.
|
|
register: msg_result2
|
|
ignore_errors: True
|
|
|
|
- name: Test msg_result2 when can_toast is true (normal mode, users)
|
|
assert:
|
|
that:
|
|
- msg_result2 is not failed
|
|
- msg_result2.time_taken > 10
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == False
|
|
- user_count.stdout|int > 0
|
|
|
|
- name: Test msg_result2 when can_toast is true (normal mode, no users)
|
|
assert:
|
|
that:
|
|
- msg_result2 is not failed
|
|
- msg_result2.time_taken > 0.1
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == False
|
|
- user_count.stdout|int == 0
|
|
|
|
- name: Test msg_result2 when can_toast is true (check mode, users)
|
|
assert:
|
|
that:
|
|
- msg_result2 is not failed
|
|
- msg_result2.time_taken > 0.1
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == False
|
|
- user_count.stdout|int > 0
|
|
|
|
- name: Test msg_result2 when can_toast is true (check mode, no users)
|
|
assert:
|
|
that:
|
|
- msg_result2 is not failed
|
|
- msg_result2.time_taken > 0.1
|
|
when:
|
|
- can_toast == True
|
|
- in_check_mode == False
|
|
- user_count.stdout|int == 0
|
|
|
|
- name: Test msg_result2 when can_toast is false
|
|
assert:
|
|
that:
|
|
- msg_result2 is failed
|
|
when: can_toast == False
|