Skip to content

Commit 40829ec

Browse files
committed
Adjust script for new expected rpm behaviour
1 parent f47fdd0 commit 40829ec

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/package-tests/package-tests.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ podman run --name "$container_name" --privileged -v /sys/fs/cgroup:/sys/fs/cgrou
8181

8282
install_pkg "$container_name" "$PKG_PATH"
8383

84+
if [[ "$pkg_type" == "rpm" ]]; then
85+
echo "Checking $SERVICE_NAME service state after install ..."
86+
if $container_exec systemctl is-active "$SERVICE_NAME"; then
87+
echo "$SERVICE_NAME service running after rpm install" >&2
88+
exit 1
89+
fi
90+
echo "$SERVICE_NAME service correctly not running after rpm install"
91+
92+
if $container_exec systemctl is-enabled "$SERVICE_NAME"; then
93+
echo "$SERVICE_NAME service enabled after rpm install" >&2
94+
exit 1
95+
fi
96+
echo "$SERVICE_NAME service correctly not enabled after rpm install"
97+
98+
$container_exec systemctl start "$SERVICE_NAME"
99+
fi
100+
84101
# If we got to this point, we might need to check the logs of the systemd service
85102
# when it's not properly active. This is added as a trap because the check
86103
# for service status below will return an error exitcode if the service is

0 commit comments

Comments
 (0)