f758b68708
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/freeradius#2898c9222beb70cb2dc4d5db7f5a37f6988530bc
50 lines
1.3 KiB
Bash
Executable File
50 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
# ~~~
|
|
# runtest.sh of freeradius
|
|
# Description: RADIUS server
|
|
#
|
|
# Author: Susant Sahani <susant@redhat.com>
|
|
# Copyright (c) 2018 Red Hat, Inc.
|
|
# ~~~
|
|
|
|
# Include Beaker environment
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
|
PACKAGE="freeradius"
|
|
|
|
RADIUS_CLIENT_CONF="/etc/raddb/clients.conf"
|
|
RADIUD_PALIN_TEXT_AUTH_FILE="/etc/raddb/mods-config/files/authorize"
|
|
|
|
rlJournalStart
|
|
rlPhaseStartSetup
|
|
rlAssertRpm $PACKAGE
|
|
rlRun "systemctl stop firewalld" 0,5
|
|
rlRun "systemctl stop radiusd.service"
|
|
rlRun "setenforce 0"
|
|
rlFileBackup "$RADIUS_CLIENT_CONF"
|
|
rlFileBackup "$RADIUD_PALIN_TEXT_AUTH_FILE"
|
|
|
|
rlRun "cp freeradius-tests.py /usr/bin/"
|
|
rlRun "cp clients.conf $RADIUS_CLIENT_CONF"
|
|
rlRun "cp authorize $RADIUD_PALIN_TEXT_AUTH_FILE"
|
|
rlRun "systemctl daemon-reload"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartTest
|
|
rlLog "Starting radius auth tests ..."
|
|
rlRun "/usr/bin/python3 /usr/bin/freeradius-tests.py"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartCleanup
|
|
rlRun "rm /usr/bin/freeradius-tests.py"
|
|
rlRun "systemctl start firewalld" 0,5
|
|
rlRun "setenforce 1"
|
|
rlFileRestore
|
|
rlLog "freeradius tests done"
|
|
rlPhaseEnd
|
|
rlJournalPrintText
|
|
rlJournalEnd
|
|
|
|
rlGetTestState
|