diff --git a/tests/integration/targets/pkgng/files/freebsd-release-manifests-20210413__FreeBSD_11.pkg b/tests/integration/targets/pkgng/files/freebsd-release-manifests-20210413__FreeBSD_11.pkg deleted file mode 100644 index 7fb291a8f5..0000000000 Binary files a/tests/integration/targets/pkgng/files/freebsd-release-manifests-20210413__FreeBSD_11.pkg and /dev/null differ diff --git a/tests/integration/targets/pkgng/files/zsh_test_package_manifests/+COMPACT_MANIFEST b/tests/integration/targets/pkgng/files/zsh_test_package_manifests/+COMPACT_MANIFEST new file mode 100644 index 0000000000..86613b56ed --- /dev/null +++ b/tests/integration/targets/pkgng/files/zsh_test_package_manifests/+COMPACT_MANIFEST @@ -0,0 +1 @@ +{"name":"zsh","origin":"shells/zsh","version":"0","comment":"The Z shell (bogus test package)","maintainer":"bapt@FreeBSD.org","www":"https://www.zsh.org/","abi":"FreeBSD:*:*","arch":"freebsd:*:*","prefix":"/usr/local","flatsize":0,"licenselogic":"single","licenses":["ZSH"],"desc":"Zsh is the Swiss Army knife of shells. It combines the most popular\nfeatures of every other shell, and then lets you customize every\ninch of it. Users of bourne-style and C-style shells will feel at\nhome in it.\n\nZsh does intelligent completion, spell-checking, has a rich syntax\nfor precise globbing, and is fully extensible through plugin\nsystems.\n\nTo fire up the zsh completion system, type the following commands:\n\n\t$ autoload -U compinstall\n\t$ compinstall\n\nWWW: https://www.zsh.org/","categories":["shells"]} diff --git a/tests/integration/targets/pkgng/files/zsh_test_package_manifests/+MANIFEST b/tests/integration/targets/pkgng/files/zsh_test_package_manifests/+MANIFEST new file mode 100644 index 0000000000..37ae7ed49d --- /dev/null +++ b/tests/integration/targets/pkgng/files/zsh_test_package_manifests/+MANIFEST @@ -0,0 +1 @@ +{"name":"zsh","origin":"shells/zsh","version":"0","comment":"The Z shell (bogus test package)","maintainer":"bapt@FreeBSD.org","www":"https://www.zsh.org/","abi":"FreeBSD:*:*","arch":"freebsd:*:*","prefix":"/usr/local","flatsize":0,"licenselogic":"single","licenses":["ZSH"],"desc":"Zsh is the Swiss Army knife of shells. It combines the most popular\nfeatures of every other shell, and then lets you customize every\ninch of it. Users of bourne-style and C-style shells will feel at\nhome in it.\n\nZsh does intelligent completion, spell-checking, has a rich syntax\nfor precise globbing, and is fully extensible through plugin\nsystems.\n\nTo fire up the zsh completion system, type the following commands:\n\n\t$ autoload -U compinstall\n\t$ compinstall\n\nWWW: https://www.zsh.org/","categories":["shells"],"files":{}} diff --git a/tests/integration/targets/pkgng/tasks/main.yml b/tests/integration/targets/pkgng/tasks/main.yml index 595433692c..36df68b9c5 100644 --- a/tests/integration/targets/pkgng/tasks/main.yml +++ b/tests/integration/targets/pkgng/tasks/main.yml @@ -114,33 +114,28 @@ ## - name: Install intentionally out-of-date package and upgrade it # - # NOTE: The out-of-date package provided is from the FreeBSD 11 package repo. - # FreeBSD 11 was EOL at the time of writing, 2021-10-08, so this test - # will only run on FreeBSD major versions > 11. + # NOTE: The out-of-date package provided is a minimal, + # no-contents test package that declares zsh with + # a version of 0, so it should always be upgraded. # # 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 + # future if the FreeBSD package format receives + # breaking changes that prevent pkg 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, update the - # references to it in tasks/main.yml accordingly, - # and update the minimum version number for the test, - # immediately below. - # when: ansible_distribution_version is version('12.0', '>=') block: - - name: Copy intentionally out-of-date package to testhost + - name: Copy intentionally out-of-date package manifest to testhost copy: - src: freebsd-release-manifests-20210413__FreeBSD_11.pkg + src: zsh_test_package_manifests dest: /tmp/ follow: yes - - name: Force-install out-of-date package - command: pkg add -f /tmp/freebsd-release-manifests-20210413__FreeBSD_11.pkg + - name: Create out-of-date test package + command: tar -C /tmp/zsh_test_package_manifests -cJf /tmp/zsh-0__test.pkg +COMPACT_MANIFEST +MANIFEST + + - name: Install out-of-date test package + command: pkg add /tmp/zsh-0__test.pkg register: pkgng_example4_prepare - name: Check for any available package upgrades (checkmode)