Files
ja4sentinel/packaging/test/test-rpm.sh
Jacquin Antoine 27eaa8aa4c
Some checks failed
Build DEB Package / Build DEB Package (Debian/Ubuntu) (push) Has been cancelled
Build RPM Package / Build RPM Package (Rocky Linux) (push) Has been cancelled
refactor: update packaging test scripts to use Docker directly
- Remove dependency on Dockerfile.deb and Dockerfile.rpm
- Use debian:latest and rockylinux:8 containers directly
- Simplify test scripts by removing intermediate image builds
- Remove obsolete test-install-deb.sh and test-install-rpm.sh

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-27 16:18:15 +01:00

35 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Test RPM package installation in Rocky Linux container
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$(dirname "$SCRIPT_DIR")")"
BUILD_DIR="${PROJECT_ROOT}/build/rpm"
echo "=========================================="
echo " Testing RPM Package Installation"
echo "=========================================="
# Find the RPM package
RPM_PACKAGE=$(ls -1 "${BUILD_DIR}"/*.rpm 2>/dev/null | head -1)
if [ -z "$RPM_PACKAGE" ]; then
echo "Error: No .rpm package found in ${BUILD_DIR}"
echo "Run 'make package-rpm' first"
exit 1
fi
echo "Found package: ${RPM_PACKAGE}"
# Test installation directly in Rocky Linux container
echo ""
echo "Running installation tests in Rocky Linux container..."
docker run --rm \
-v "${BUILD_DIR}:/packages:ro" \
rockylinux:8 \
sh -c "dnf install -y /packages/*.rpm && echo 'RPM installation successful'"
echo ""
echo "=========================================="
echo " RPM Package Test Complete"
echo "=========================================="