Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
cb9f350c
Commit
cb9f350c
authored
Oct 14, 2015
by
Chris Church
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12720 from jhawkesworth/test_amc_2147
integration tests for ansible modules core 2147
parents
8c299105
e1411013
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
0 deletions
+73
-0
test/integration/roles/test_win_file/tasks/main.yml
+73
-0
No files found.
test/integration/roles/test_win_file/tasks/main.yml
View file @
cb9f350c
...
...
@@ -413,6 +413,79 @@
# that:
## - result.stat.mode == '0644'
-
name
:
create a directory
win_file
:
path={{win_output_dir}}/dirtest state=directory
register
:
file_result
-
name
:
stat the directory created
win_stat
:
path={{win_output_dir}}/dirtest
register
:
stat_result
-
name
:
assert the directory was created
assert
:
that
:
-
file_result.changed
-
stat_result.stat.exists
-
stat_result.stat.isdir
-
name
:
re run create directory (bug 2147)
win_file
:
path={{win_output_dir}}/dirtest state=directory
register
:
file_result
-
name
:
stat the directory created again
win_stat
:
path={{win_output_dir}}/dirtest
register
:
stat_result
-
name
:
assert the directory exists but was not changed
assert
:
that
:
-
file_result.changed == False
-
stat_result.stat.exists
-
stat_result.stat.isdir
-
name
:
remove empty dir we just created
win_file
:
path={{win_output_dir}}/dirtest state=absent
register
:
file_result
-
name
:
stat the removed directory
win_stat
:
path={{win_output_dir}}/dirtest
register
:
stat_result
-
name
:
assert the directory does not exist
assert
:
that
:
-
file_result.changed
-
"
stat_result.stat.exists
==
False"
-
name
:
create dir with spaces and parens in the dir name
win_file
:
path="{{win_output_dir}}/dir with spaces (and parens)" state=directory
register
:
file_result
-
name
:
stat the directory with spaces and parens
win_stat
:
path="{{win_output_dir}}/dir with spaces (and parens)"
register
:
stat_result
-
name
:
check dir with spaces and parens in the dir name has been created
assert
:
that
:
-
file_result.changed
-
stat_result.stat.exists
-
stat_result.stat.isdir
-
name
:
remove dir with spaces and parens in the dir name
win_file
:
path="{{win_output_dir}}/dir with spaces (and parens)" state=absent
register
:
file_result
-
name
:
stat the dir with spaces and parens in the dir name
win_stat
:
path="{{win_output_dir}}/dir with spaces (and parens)"
register
:
stat_result
-
name
:
assert dir with spaces and parens in the dir name was removed
assert
:
that
:
-
file_result.changed
-
"
stat_result.stat.exists
==
False"
-
name
:
clean up sub1
win_file
:
path={{win_output_dir}}/sub1 state=absent
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment