Skip to content

Commit

Permalink
tests: update scripts as adding deduplicate_tmpfiles_entries
Browse files Browse the repository at this point in the history
  • Loading branch information
HuijingHei committed Nov 29, 2023
1 parent a2e6860 commit f51e436
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tests/compose/test-basic-unified.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,24 @@ echo "ok no cachedir"
basic_test

# This one is done by postprocessing /var
ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-filesystem.conf > autovar.txt
ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-rpm-ostree-autovar.conf > autovar.txt
# Picked this one at random as an example of something that won't likely be
# converted to tmpfiles.d upstream. But if it is, we can change this test.
assert_file_has_content_literal autovar.txt 'd /var/cache 0755 root root - -'
ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-chrony.conf > autovar.txt
# duplication in var.conf
assert_not_file_has_content autovar.txt 'd /var/cache '
# And this one has a non-root uid
assert_file_has_content_literal autovar.txt 'd /var/lib/chrony 0750 chrony chrony - -'
# see rpmostree-importer.c
if ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-rpm.conf > rpm.txt 2>/dev/null; then
assert_not_file_has_content rpm.txt 'd /var/lib/rpm'
fi
ostree --repo="${repo}" cat "${treeref}" /usr/lib/tmpfiles.d/pkg-pam.conf > autovar.txt
# Verify translating /var/run -> /run
assert_file_has_content_literal autovar.txt 'd /run/console'
assert_not_file_has_content autovar.txt 'd /var/lib/rpm'
# duplication in pam.conf
assert_not_file_has_content autovar.txt 'd /run/console'
# duplication in tmp.conf
assert_not_file_has_content autovar.txt 'd /var/tmp'

# Verify pkg-filesystem.conf is removed
ostree --repo="${repo}" ls "${treeref}" /usr/lib/tmpfiles.d > autovar.txt
assert_not_file_has_content autovar.txt "pkg-filesystem.conf"

echo "ok autovar"

rpm-ostree db list --repo="${repo}" "${treeref}" --advisories > db-list-adv.txt
Expand Down

0 comments on commit f51e436

Please sign in to comment.