diff options
author | nitzmahone <mdavis@ansible.com> | 2016-09-11 20:45:00 -0700 |
---|---|---|
committer | nitzmahone <mdavis@ansible.com> | 2016-09-11 20:47:40 -0700 |
commit | 2e06f0b427e82b7b9a2984ab9c081e4b1043325f (patch) | |
tree | 1452d1fc5e22f2e14c1452bbb994c78ff5dc08a1 /test | |
parent | a900a0b4e3220eec4919b323e39ea08b71f463d2 (diff) | |
download | ansible-2e06f0b427e82b7b9a2984ab9c081e4b1043325f.tar.gz |
add win_user regression tests
Ensure https://github.com/ansible/ansible-modules-core/issues/4369 doesn't occur again, also adds tests for password set when expired.
(cherry picked from commit 69880f16404caac69c0d86c895e8ec3e233c556b)
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/roles/test_win_user/tasks/main.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/integration/roles/test_win_user/tasks/main.yml b/test/integration/roles/test_win_user/tasks/main.yml index 7df5c242dd..d8f237fea8 100644 --- a/test/integration/roles/test_win_user/tasks/main.yml +++ b/test/integration/roles/test_win_user/tasks/main.yml @@ -148,6 +148,25 @@ - "win_user_password_expired_result|changed" - "win_user_password_expired_result.password_expired" +- name: set password when expired + win_user: name="{{ test_win_user_name }}" password={{ test_win_user_password2 }} update_password=always + register: win_user_can_set_password_on_expired + +- name: check set password on expired result + assert: + that: + - win_user_can_set_password_on_expired|changed + +- name: set password expired flag again + win_user: name="{{ test_win_user_name }}" password_expired=yes + register: win_user_password_expired_result + +- name: check password expired result + assert: + that: + - "win_user_password_expired_result|changed" + - "win_user_password_expired_result.password_expired" + - name: clear password expired flag win_user: name="{{ test_win_user_name }}" password_expired=no register: win_user_clear_password_expired_result @@ -208,6 +227,16 @@ - "win_user_account_disabled_result|changed" - "win_user_account_disabled_result.account_disabled" +- name: set password on disabled account + win_user: name="{{ test_win_user_name }}" password={{ test_win_user_password2 }} update_password=always + register: win_user_can_set_password_on_disabled + +- name: check set password on disabled result + assert: + that: + - win_user_can_set_password_on_disabled|changed + - win_user_can_set_password_on_disabled.account_disabled + - name: clear account disabled flag win_user: name="{{ test_win_user_name }}" account_disabled=false register: win_user_clear_account_disabled_result |