Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix win_user_right ansible module integration test assertions #666

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions tests/integration/targets/win_user_right/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
---
- name: get current entries for right
- name: Get current entries for right
test_get_right:
name: '{{test_win_user_right_name}}'
name: '{{ test_win_user_right_name }}'
register: actual_users

- name: get facts
setup:
- name: Get facts
ansible.builtin.setup:

- block:
- name: ensure right is empty before test
win_user_right:
name: '{{test_win_user_right_name}}'
users: []
action: set
- name: Ensure rights
block:
- name: Ensure right is empty before test
ansible.windows.win_user_right:
name: '{{ test_win_user_right_name }}'
users: []
action: set

- name: run tests
include_tasks: tests.yml
- name: Run tests
ansible.builtin.include_tasks: tests.yml

always:
- name: reset entries for test right
win_user_right:
name: '{{test_win_user_right_name}}'
users: '{{actual_users.users}}'
action: set
- name: Reset entries for test right
ansible.windows.win_user_right:
name: '{{ test_win_user_right_name }}'
users: '{{ actual_users.users }}'
action: set
Loading