mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
windows: fix for checking locked system files (#30665)
* fix for checking locked system files * moved functions to share module util and created tests * fixed windows-paths test based on win_stat changes
This commit is contained in:
@@ -77,6 +77,18 @@
|
||||
- cmdout|skipped
|
||||
- cmdout.msg is search('exists')
|
||||
|
||||
- name: test creates with hidden system file, should skip
|
||||
win_command: echo no
|
||||
args:
|
||||
creates: C:\pagefile.sys
|
||||
register: cmdout
|
||||
|
||||
- name: validate result
|
||||
assert:
|
||||
that:
|
||||
- cmdout|skipped
|
||||
- cmdout.msg is search('exists')
|
||||
|
||||
- name: ensure testfile is still present
|
||||
win_stat:
|
||||
path: c:\testfile.txt
|
||||
|
||||
Reference in New Issue
Block a user