diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf new file mode 100644 index 0000000..f76d348 --- /dev/null +++ b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf @@ -0,0 +1,20 @@ +summary: Replace NetworkManager patch in the current version +description: '' +contact: FrantiĊĦek Hrdina +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 diff --git a/Regression/replace-network-manager-patch-in-the-current-version/test.sh b/Regression/replace-network-manager-patch-in-the-current-version/test.sh new file mode 100755 index 0000000..5af602e --- /dev/null +++ b/Regression/replace-network-manager-patch-in-the-current-version/test.sh @@ -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