Skip to content

Commit

Permalink
Fix win_user_right ansible module integration test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahar Golshani committed Oct 14, 2024
1 parent 5f859d1 commit 499eac0
Show file tree
Hide file tree
Showing 2 changed files with 287 additions and 281 deletions.
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

0 comments on commit 499eac0

Please sign in to comment.