1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

7 commits

Author SHA1 Message Date
Ross Williams
68a1332a3f pkgng: use hand-generated test package
Instead of relying on a broken-ish installation
of an older package from FreeBSD 11, hand-generate
a package named `zsh` with no contents and a version
number of `0`. It can be installed on any architecture
and any revision of FreeBSD sucessfully, and it will
always be eligible for upgrade.
2021-10-11 02:11:26 +00:00
Ross Williams
7f30ac8a5b pkgng: add state=latest test
Including small filesize out-of-date package from
FreeBSD 11 package repository, because FreeBSD 11 is
currently EOL. This test might fail at some point in the
future if the pkg utility in a FreeBSD version > 14
makes breaking changes that prevents it from installing
older package formats.

If that occurs, the fix is to replace
`files/freebsd-release-manifests-20210413__FreeBSD_11.pkg`
with the version of freebsd-release-manifests from the oldest
non-breaking release of FreeBSD, and update the
references to it in tasks/main.yml accordingly.
2021-10-11 02:11:26 +00:00
Ross Williams
1654a70825 pkgng: add state=latest idemptency test
Add test between state=present and
state=absent that ensures state=latest runs
successfully on an already up-to-date package
with changed=false.
2021-10-11 02:11:26 +00:00
Ross Williams
9a867a38ee pkgng: add state=absent test
Also renumber `jail=...` test to make diffs less
noisy when adding more non-jailed tests.
2021-10-11 02:11:26 +00:00
Ross Williams
840cb8f408 pkgng: remove redundant test for docker container
These tests should be skip/docker, but the test
playbook also redundantly checked whether it was
running in a docker container.

Checking whether `ansible_facts.distribution` is
`FreeBSD` is really sufficient to be sure whether
the test is running in an environment that supports
the `pkgng` module.
2021-10-11 02:11:26 +00:00
Ross Williams
867b7d5bee pkgng: test with zsh not bash package
Had been using bash package, because it's not
likely to disappear from the package repository
any time soon. Turns out that bash is already
installed on the Ansible community.general
FreeBSD CI VM image, which makes the test fail.

Zsh probably isn't going away any time soon,
either, and likely won't be installed on the
CI image.
2021-10-11 02:11:26 +00:00
Ross Williams
bfdaed0ce5 pkgng: add basic integration tests
Test installing a package
Test installing a package into a jail
2021-10-11 02:11:26 +00:00