Normalize bools in tests (#5996)

* Normalize bools in tests.

* Fix typo.
This commit is contained in:
Felix Fontein 2023-02-15 22:55:23 +01:00 committed by GitHub
commit 24efe9ee9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
182 changed files with 770 additions and 770 deletions

View file

@ -31,7 +31,7 @@
- name: Find created package file
find:
path: '{{ pkgng_test_outofdate_pkg_tempdir.path }}'
use_regex: yes
use_regex: true
pattern: '.*\.(pkg|tzst|t[xbg]z|tar)'
register: pkgng_test_outofdate_pkg_tempfile
@ -42,7 +42,7 @@
- name: Copy the created package file to the expected location
copy:
remote_src: yes
remote_src: true
src: '{{ pkgng_test_outofdate_pkg_tempfile.files[0].path }}'
dest: '{{ pkgng_test_outofdate_pkg_path }}'

View file

@ -37,15 +37,15 @@
- name: Verify package sentinel file is present
stat:
path: '{{ pkgng_test_pkg_sentinelfile_path }}'
get_attributes: no
get_checksum: no
get_mime: no
get_attributes: false
get_checksum: false
get_mime: false
register: pkgng_example3_stat_before
- name: Install package (checkmode)
pkgng:
name: '{{ pkgng_test_pkg_name }}'
check_mode: yes
check_mode: true
register: pkgng_example3_checkmode
- name: Remove package
@ -63,9 +63,9 @@
- name: Verify package sentinel file is not present
stat:
path: '{{ pkgng_test_pkg_sentinelfile_path }}'
get_attributes: no
get_checksum: no
get_mime: no
get_attributes: false
get_checksum: false
get_mime: false
register: pkgng_example3_stat_after
- name: Ensure pkgng installs package correctly
@ -104,14 +104,14 @@
pkgng:
name: '*'
state: latest
check_mode: yes
check_mode: true
register: pkgng_example4_wildcard_checkmode
- name: Check for available package upgrade (checkmode)
pkgng:
name: '{{ pkgng_test_pkg_name }}'
state: latest
check_mode: yes
check_mode: true
register: pkgng_example4_checkmode
- name: Upgrade out-of-date package
@ -183,7 +183,7 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
state: absent
check_mode: yes
check_mode: true
register: pkgng_example5_prepare
- name: Install three packages
@ -219,7 +219,7 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
state: absent
check_mode: yes
check_mode: true
register: pkgng_example6_check
- name: Create out-of-date test package
@ -279,7 +279,7 @@
pkgng:
name: autotools
state: absent
autoremove: yes
autoremove: true
register: pkgng_example7
- name: Check if autoremove uninstalled known autotools dependencies
@ -290,7 +290,7 @@
- libtool
- m4
state: absent
check_mode: yes
check_mode: true
register: pkgng_example7_cleanup
- name: Ensure pkgng autoremove works correctly
@ -313,7 +313,7 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
annotation: '+ansibletest_example8=duplicate'
ignore_errors: yes
ignore_errors: true
register: pkgng_example8_add_annotation_failure
- name: Verify annotation is actually there
@ -324,14 +324,14 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
annotation: '+ansibletest_example8=added'
check_mode: yes
check_mode: true
register: pkgng_example8_add_annotation_checkmode_nochange
- name: Install and annotate single package (checkmode, changed)
pkgng:
name: '{{ pkgng_test_pkg_name }}'
annotation: '+ansibletest_example8_checkmode=added'
check_mode: yes
check_mode: true
register: pkgng_example8_add_annotation_checkmode_change
- name: Verify check_mode did not add an annotation
@ -348,7 +348,7 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
annotation: ':ansiblemissing=modified'
ignore_errors: yes
ignore_errors: true
register: pkgng_example8_modify_annotation_failure
- name: Verify annotation has been modified
@ -451,7 +451,7 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
annotation: '{{ item }}'
ignore_errors: yes
ignore_errors: true
register: pkgng_example8_invalid_annotation_failure
loop:
- 'naked_string'
@ -484,7 +484,7 @@
pkgng:
name: '{{ pkgng_test_pkg_name }}'
pkgsite: DoesNotExist
ignore_errors: yes
ignore_errors: true
register: pkgng_example10_invalid_pkgsite_failure
- name: Ensure invalid pkgsite fails as expected
@ -524,21 +524,21 @@
vars:
pkgng_test_rootdir: /usr/jails/testjail
pkgng_test_install_prefix: /usr/jails/testjail
pkgng_test_install_cleanup: yes
pkgng_test_install_cleanup: true
- name: Install package in jail
include_tasks: install_single_package.yml
vars:
pkgng_test_jail: testjail
pkgng_test_install_prefix: /usr/jails/testjail
pkgng_test_install_cleanup: yes
pkgng_test_install_cleanup: true
- name: Install package in jail as chroot
include_tasks: install_single_package.yml
vars:
pkgng_test_chroot: /usr/jails/testjail
pkgng_test_install_prefix: /usr/jails/testjail
pkgng_test_install_cleanup: yes
pkgng_test_install_cleanup: true
always:
- name: Stop and remove testjail
failed_when: false

View file

@ -6,9 +6,9 @@
- name: Verify package sentinel file is not present
stat:
path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}'
get_attributes: no
get_checksum: no
get_mime: no
get_attributes: false
get_checksum: false
get_mime: false
register: pkgng_install_stat_before
- name: Install package
@ -23,21 +23,21 @@
pkgng:
<<: *pkgng_install_params
state: absent
check_mode: yes
check_mode: true
register: pkgng_install_checkmode
- name: Install package (idempotent, cached)
pkgng:
<<: *pkgng_install_params
cached: yes
cached: true
register: pkgng_install_idempotent_cached
- name: Verify package sentinel file is present
stat:
path: '{{ pkgng_test_install_prefix | default("") }}{{ pkgng_test_pkg_sentinelfile_path }}'
get_attributes: no
get_checksum: no
get_mime: no
get_attributes: false
get_checksum: false
get_mime: false
register: pkgng_install_stat_after
- name: Remove test package (if requested)

View file

@ -28,7 +28,7 @@
service:
name: pf
state: started
enabled: yes
enabled: true
- name: Install ezjail
pkgng:
@ -49,11 +49,11 @@
line: ezjail_ftphost=http://ftp-archive.freebsd.org
- name: Start ezjail
ignore_errors: yes
ignore_errors: true
service:
name: ezjail
state: started
enabled: yes
enabled: true
- name: Redirect logs depending on verbosity
set_fact:
@ -84,7 +84,7 @@
dest: /usr/jails/testjail/etc/resolv.conf
regexp: "^nameserver[[:blank:]]+{{ item }}$"
line: "nameserver {{ item }}"
create: yes
create: true
loop:
- "1.1.1.1"
- "1.0.0.1"