Add test for RHEL-59899

This commit is contained in:
František Hrdina 2024-10-10 16:32:18 +02:00
commit 81fe2bcf2a
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,20 @@
summary: Replace NetworkManager patch in the current version
description: ''
contact: František Hrdina <fhrdina@redhat.com>
component:
- frr
test: ./test.sh
framework: beakerlib
recommend:
- frr
duration: 5m
enabled: true
tag:
- Tier1
tier: '1'
link:
- verifies: https://issues.redhat.com/browse/RHEL-59899
adjust:
- enabled: false
when: distro < rhel-7
continue: false

View file

@ -0,0 +1,42 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlAssertRpm frr
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlRun "rlFileBackup --clean /etc/frr/"
rlRun "rlFileBackup --clean /etc/systemd/system/"
rlRun "rlFileBackup --clean /var/log/frr/"
rlRun "rlFileBackup --clean /var/log/audit/audit.log"
rlRun "rlFileBackup --clean /var/run/frr"
rlRun "rlFileBackup --clean /run/frr"
rlRun "rlFileBackup --clean /root/.history_frr"
#rlRun "systemctl start frr" 0 "Starting frr"
rlServiceStart "frr"
rlRun "nmcli connection add type dummy ifname dummy0 ipv4.method manual ipv4.method manual ipv4.addresses 192.168.44.1/24" 0 "Create dummy interface"
rlPhaseEnd
rlPhaseStartTest
rlRun "vtysh -c 'sh ip route' &> routes.log"
rlAssertGrep "C>\* 192.168.44.0/24" routes.log
if rlIsFedora || rlIsRHELLike '>=10'; then
rlAssertGrep "L>\* 192.168.44.1/32" routes.log
fi
rlPhaseEnd
rlPhaseStartCleanup
rlServiceRestore "frr"
rlFileRestore
rlRun "nmcli connection delete dummy-dummy0" 0 "Remove dummy interface"
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd