diff options
Diffstat (limited to 'test/integration/targets/win_toast/tasks')
-rw-r--r-- | test/integration/targets/win_toast/tasks/main.yml | 13 | ||||
-rw-r--r-- | test/integration/targets/win_toast/tasks/setup.yml | 27 | ||||
-rw-r--r-- | test/integration/targets/win_toast/tasks/tests.yml | 106 |
3 files changed, 0 insertions, 146 deletions
diff --git a/test/integration/targets/win_toast/tasks/main.yml b/test/integration/targets/win_toast/tasks/main.yml deleted file mode 100644 index 735d55b1a9..0000000000 --- a/test/integration/targets/win_toast/tasks/main.yml +++ /dev/null @@ -1,13 +0,0 @@ -- name: Set up tests - import_tasks: setup.yml - -- name: Test in normal mode - import_tasks: tests.yml - vars: - in_check_mode: no - -- name: Test in check mode - import_tasks: tests.yml - vars: - in_check_mode: yes - check_mode: yes diff --git a/test/integration/targets/win_toast/tasks/setup.yml b/test/integration/targets/win_toast/tasks/setup.yml deleted file mode 100644 index 1fe3a22da1..0000000000 --- a/test/integration/targets/win_toast/tasks/setup.yml +++ /dev/null @@ -1,27 +0,0 @@ -- name: Get OS version - win_shell: '[Environment]::OSVersion.Version.Major' - register: os_version - -- name: Get logged in user count (using explorer exe as a proxy) - win_shell: (get-process -name explorer -EA silentlyContinue).Count - register: user_count - -- name: debug os_version - debug: - var: os_version - verbosity: 2 - -- name: debug user_count - debug: - var: user_count - verbosity: 2 - -- name: Set fact if toast cannot be made - set_fact: - can_toast: False - when: os_version.stdout|int < 10 - -- name: Set fact if toast can be made - set_fact: - can_toast: True - when: os_version.stdout|int >= 10 diff --git a/test/integration/targets/win_toast/tasks/tests.yml b/test/integration/targets/win_toast/tasks/tests.yml deleted file mode 100644 index d1d4ece107..0000000000 --- a/test/integration/targets/win_toast/tasks/tests.yml +++ /dev/null @@ -1,106 +0,0 @@ -- 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 |