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
a0def30c
Commit
a0def30c
authored
Apr 15, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add integration test for unarchive filelist feature
parent
7462e7e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
lib/ansible/modules/core
+1
-1
test/integration/roles/test_unarchive/tasks/main.yml
+17
-1
No files found.
core
@
a19fa6ba
Subproject commit
761fc8d277e64e0d63eb2cff8c72c3fa3ec70dd2
Subproject commit
a19fa6ba48bf092b574eb6ee40f38f06500d767d
test/integration/roles/test_unarchive/tasks/main.yml
View file @
a0def30c
...
...
@@ -75,6 +75,8 @@
assert
:
that
:
-
"
unarchive02.changed
==
true"
# Verify that no file list is generated
-
"
'files'
not
in
unarchive02"
-
name
:
verify that the file was unarchived
file
:
path={{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt state=file
...
...
@@ -126,13 +128,17 @@
file
:
path={{output_dir}}/test-unarchive-zip state=directory
-
name
:
unarchive a zip file
unarchive
:
src={{output_dir}}/test-unarchive.zip dest={{output_dir | expanduser}}/test-unarchive-zip copy=no
unarchive
:
src={{output_dir}}/test-unarchive.zip dest={{output_dir | expanduser}}/test-unarchive-zip copy=no
list_files=True
register
:
unarchive03
-
name
:
verify that the file was marked as changed
assert
:
that
:
-
"
unarchive03.changed
==
true"
# Verify that file list is generated
-
"
'files'
in
unarchive03"
-
"
{{unarchive03['files']|
length}}
==
1"
-
"
'foo-unarchive.txt'
in
unarchive03['files']"
-
name
:
verify that the file was unarchived
file
:
path={{output_dir}}/test-unarchive-zip/foo-unarchive.txt state=file
...
...
@@ -176,6 +182,7 @@
dest
:
"
{{
output_dir
|
expanduser
}}/test-unarchive-tar-gz"
copy
:
no
mode
:
"
u+rwX,g-rwx,o-rwx"
list_files
:
True
register
:
unarchive06
-
name
:
Test that the file modes were changed
...
...
@@ -188,6 +195,10 @@
that
:
-
"
unarchive06.changed
==
true"
-
"
unarchive06_stat.stat.mode
==
'0600'"
# Verify that file list is generated
-
"
'files'
in
unarchive06"
-
"
{{unarchive06['files']|
length}}
==
1"
-
"
'foo-unarchive.txt'
in
unarchive06['files']"
-
name
:
remove our tar.gz unarchive destination
file
:
path={{ output_dir }}/test-unarchive-tar-gz state=absent
...
...
@@ -222,12 +233,17 @@
dest
:
"
{{
output_dir
|
expanduser
}}/test-unarchive-tar-gz"
copy
:
no
mode
:
"
u+rwX,g-wx,o-wx,g+r,o+r"
list_files
:
True
register
:
unarchive07
-
name
:
Test that the files were not changed
assert
:
that
:
-
"
unarchive07.changed
==
false"
# Verify that file list is generated
-
"
'files'
in
unarchive07"
-
"
{{unarchive07['files']|
length}}
==
1"
-
"
'foo-unarchive.txt'
in
unarchive07['files']"
-
name
:
remove our tar.gz unarchive destination
file
:
path={{ output_dir }}/test-unarchive-tar-gz 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