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
57fc86ec
Commit
57fc86ec
authored
11 years ago
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add yum tests
parent
021ae05f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
1 deletions
+74
-1
tests_new/integration/destructive.yml
+1
-0
tests_new/integration/roles/test_hg/tasks/main.yml
+1
-1
tests_new/integration/roles/test_yum/meta/main.yml
+2
-0
tests_new/integration/roles/test_yum/tasks/main.yml
+21
-0
tests_new/integration/roles/test_yum/tasks/yum.yml
+49
-0
No files found.
tests_new/integration/destructive.yml
View file @
57fc86ec
...
...
@@ -4,4 +4,5 @@
-
{
role
:
test_service
,
tags
:
test_service
}
-
{
role
:
test_pip
,
tags
:
test_pip
}
-
{
role
:
test_gem
,
tags
:
test_gem
}
-
{
role
:
test_yum
,
tags
:
test_yum
}
This diff is collapsed.
Click to expand it.
tests_new/integration/roles/test_hg/tasks/main.yml
View file @
57fc86ec
# test code for the
git
module
# test code for the
hg
module
# (c) 2014, James Tanner <tanner.jc@gmail.com>
# This file is part of Ansible
...
...
This diff is collapsed.
Click to expand it.
tests_new/integration/roles/test_yum/meta/main.yml
0 → 100644
View file @
57fc86ec
dependencies
:
-
prepare_tests
This diff is collapsed.
Click to expand it.
tests_new/integration/roles/test_yum/tasks/main.yml
0 → 100644
View file @
57fc86ec
# test code for the yum module
# (c) 2014, James Tanner <tanner.jc@gmail.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
include
:
'
yum.yml'
when
:
ansible_distribution in ('RHEL', 'CentOS', 'ScientificLinux', 'Fedora')
This diff is collapsed.
Click to expand it.
tests_new/integration/roles/test_yum/tasks/yum.yml
0 → 100644
View file @
57fc86ec
# UNINSTALL
-
name
:
uninstall sos
yum
:
name=sos state=removed
register
:
yum_result
-
name
:
check sos with rpm
shell
:
rpm -q sos
failed_when
:
False
register
:
rpm_result
-
debug
:
var=yum_result
-
debug
:
var=rpm_result
-
name
:
verify uninstalltion of sos
assert
:
that
:
-
"
yum_result.rc
==
0"
-
"
rpm_result.rc
==
1"
# INSTALL
-
name
:
install sos
yum
:
name=sos state=present
register
:
yum_result
-
name
:
check sos with rpm
shell
:
rpm -q sos
failed_when
:
False
register
:
rpm_result
-
debug
:
var=yum_result
-
debug
:
var=rpm_result
-
name
:
verify installation of sos
assert
:
that
:
-
"
yum_result.rc
==
0"
-
"
yum_result.changed"
-
"
rpm_result.rc
==
0"
-
name
:
verify yum module outputs
assert
:
that
:
-
"
'invocation'
in
yum_result"
-
"
'changed'
in
yum_result"
-
"
'item'
in
yum_result"
-
"
'msg'
in
yum_result"
-
"
'rc'
in
yum_result"
-
"
'results'
in
yum_result"
This diff is collapsed.
Click to expand it.
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