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
0c1193f1
Commit
0c1193f1
authored
Jan 26, 2015
by
Conrado Buhrer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added: integration tests builddeps for apt module
parent
2f1fc3e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
test/integration/roles/test_apt/tasks/apt-builddep.yml
+67
-0
test/integration/roles/test_apt/tasks/main.yml
+2
-0
No files found.
test/integration/roles/test_apt/tasks/apt-builddep.yml
0 → 100644
View file @
0c1193f1
# test installing build-deps using netcat and quilt as test victims.
#
# Deps can be discovered like so (taken from ubuntu 12.04)
# ====
# root@localhost:~ # apt-rdepends --build-depends --follow=DEPENDS netcat
# Reading package lists... Done
# Building dependency tree
# Reading state information... Done
# netcat
# Build-Depends: debhelper (>= 8.0.0)
# Build-Depends: quilt
# root@localhost:~ #
# ====
# Since many things depend on debhelper, let's just uninstall quilt, then
# install build-dep for netcat to get it back. build-dep doesn't have an
# uninstall, so we don't need to test for reverse actions (eg, uninstall
# build-dep and ensure things are clean)
# uninstall quilt
-
name
:
check quilt with dpkg
shell
:
dpkg -s quilt
register
:
dpkg_result
ignore_errors
:
true
tags
:
[
'
test_apt_builddep'
]
-
name
:
uninstall quilt with apt
apt
:
pkg=quilt state=absent purge=yes
register
:
apt_result
when
:
dpkg_result|success
tags
:
[
'
test_apt_builddep'
]
# install build-dep for netcat
-
name
:
install netcat build-dep with apt
apt
:
pkg=netcat build_dep=yes
register
:
apt_result
tags
:
[
'
test_apt_builddep'
]
-
name
:
verify build_dep of netcat
assert
:
that
:
-
"
'changed'
in
apt_result"
tags
:
[
'
test_apt_builddep'
]
# ensure debhelper and qilt are installed
-
name
:
check build_deps with dpkg
shell
:
dpkg --get-selections | egrep '(debhelper|quilt)'
failed_when
:
False
register
:
dpkg_result
tags
:
[
'
test_apt_builddep'
]
-
name
:
verify build_deps are really there
assert
:
that
:
-
"
dpkg_result.rc
==
0"
tags
:
[
'
test_apt_builddep'
]
# ensure running build-dep again doesn't yield changes
-
name
:
install netcat build-dep with apt again
apt
:
pkg=netcat build_dep=yes
register
:
apt_result
tags
:
[
'
test_apt_builddep'
]
-
name
:
verify build_dep of netcat did not change
assert
:
that
:
-
"
not
apt_result.changed"
tags
:
[
'
test_apt_builddep'
]
test/integration/roles/test_apt/tasks/main.yml
View file @
0c1193f1
...
@@ -19,3 +19,5 @@
...
@@ -19,3 +19,5 @@
-
include
:
'
apt.yml'
-
include
:
'
apt.yml'
when
:
ansible_distribution in ('Ubuntu', 'Debian')
when
:
ansible_distribution in ('Ubuntu', 'Debian')
-
include
:
'
apt-builddep.yml'
when
:
ansible_distribution in ('Ubuntu', 'Debian')
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