Update tests, remove duplicated test

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-05-10 13:22:45 +02:00
parent 6ce1668d41
commit 5cc5b377f1

View File

@@ -483,7 +483,7 @@
printf "%s\n" "${lines[@]}" printf "%s\n" "${lines[@]}"
# Depending on the shell (x86_64-musl is built on busybox) there can be one or multiple spaces between user and group # Depending on the shell (x86_64-musl is built on busybox) there can be one or multiple spaces between user and group
[[ ${lines[0]} == *"pihole"?*"pihole"* ]] [[ ${lines[0]} == *"pihole"?*"pihole"* ]]
[[ ${lines[0]} == "-rw-rw-r--"* ]] [[ ${lines[0]} == "-rw-r-----"* ]]
run bash -c 'file /etc/pihole/pihole-FTL.db' run bash -c 'file /etc/pihole/pihole-FTL.db'
printf "%s\n" "${lines[@]}" printf "%s\n" "${lines[@]}"
[[ ${lines[0]} == "/etc/pihole/pihole-FTL.db: SQLite 3.x database"* ]] [[ ${lines[0]} == "/etc/pihole/pihole-FTL.db: SQLite 3.x database"* ]]
@@ -938,17 +938,6 @@
[[ "${api}" == "${domain_api}" ]] [[ "${api}" == "${domain_api}" ]]
} }
# x86_64-musl is built on busybox which has a slightly different
# variant of ls displaying three, instead of one, spaces between the
# user and group names.
@test "Ownership and permissions of pihole-FTL.db correct" {
run bash -c 'ls -l /etc/pihole/pihole-FTL.db'
printf "%s\n" "${lines[@]}"
[[ ${lines[0]} == *"pihole pihole"* || ${lines[0]} == *"pihole pihole"* ]]
[[ ${lines[0]} == "-rw-rw-r--"* ]]
}
# "ldd" prints library dependencies and the used interpreter for a given program # "ldd" prints library dependencies and the used interpreter for a given program
# #
# Dependencies on shared libraries are displayed like # Dependencies on shared libraries are displayed like