1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/apt/tasks/apt-builddep.yml
Matt Martz 4fe08441be Deprecate tests used as filters (#32361)
* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
2017-11-27 17:58:08 -05:00

55 lines
1.6 KiB
YAML

# 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 is successful
tags: ['test_apt_builddep']
# install build-dep for netcat
- name: install netcat build-dep with apt
apt: pkg=netcat state=build-dep
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']