#!/bin/sh
set -eu

. "$(dirname "$0")/ferm-lib.sh"

echo "=== BASIC FERM BINARY TEST ==="

setup_config
ferm --flush /etc/ferm/ferm.conf
check_absent


# run ferm directly (no systemd)
ferm /etc/ferm/ferm.conf

check_present

# cleanup via explicit flush through ferm (not systemd)
ferm --flush /etc/ferm/ferm.conf 2>/dev/null || true

check_absent
