|
|
8072fb |
From cd284a0cacb0e9c1b75a7651b83848dd51e52ffd Mon Sep 17 00:00:00 2001
|
|
|
8072fb |
From: Eric Garver <eric@garver.life>
|
|
|
8072fb |
Date: Fri, 7 Aug 2020 07:42:00 -0400
|
|
|
8072fb |
Subject: [PATCH] test(dbus): zone: add nm-shared to expected output if it
|
|
|
8072fb |
exists
|
|
|
8072fb |
|
|
|
8072fb |
newer networkmanager ships with this zone. as such, if nm is installed
|
|
|
8072fb |
the expected "get zones" output changes.
|
|
|
8072fb |
|
|
|
8072fb |
(cherry picked from commit a609c15657e68bacbc05d87cb71f366148cb8ced)
|
|
|
8072fb |
(cherry picked from commit 9f8f9390ef0a1631c07cae37be2ab27f29d0f34d)
|
|
|
8072fb |
---
|
|
|
8072fb |
src/tests/dbus/zone_permanent_functional.at | 6 +++++-
|
|
|
8072fb |
src/tests/dbus/zone_runtime_functional.at | 6 +++++-
|
|
|
8072fb |
2 files changed, 10 insertions(+), 2 deletions(-)
|
|
|
8072fb |
|
|
|
8072fb |
diff --git a/src/tests/dbus/zone_permanent_functional.at b/src/tests/dbus/zone_permanent_functional.at
|
|
|
8072fb |
index 2261832e00a8..75645983dbf7 100644
|
|
|
8072fb |
--- a/src/tests/dbus/zone_permanent_functional.at
|
|
|
8072fb |
+++ b/src/tests/dbus/zone_permanent_functional.at
|
|
|
8072fb |
@@ -30,8 +30,12 @@ export DBUS_FOOBAR_ZONE_OBJ
|
|
|
8072fb |
|
|
|
8072fb |
dnl Get Zones
|
|
|
8072fb |
dnl
|
|
|
8072fb |
+if NS_CMD([firewall-cmd --get-zones |grep "nm-shared" >/dev/null]); then
|
|
|
8072fb |
+ NM_SHARED="'nm-shared', "
|
|
|
8072fb |
+ export NM_SHARED
|
|
|
8072fb |
+fi
|
|
|
8072fb |
DBUS_CHECK([config], [config.getZoneNames], [], 0, [dnl
|
|
|
8072fb |
- [(['block', 'dmz', 'drop', 'external', 'foobar', 'home', 'internal', 'public', 'trusted', 'work'],)]
|
|
|
8072fb |
+ (@<:@'block', 'dmz', 'drop', 'external', 'foobar', 'home', 'internal', m4_escape([${NM_SHARED}])'public', 'trusted', 'work'@:>@,)
|
|
|
8072fb |
])
|
|
|
8072fb |
DBUS_CHECK([config], [config.listZones], [], 0, [stdout])
|
|
|
8072fb |
NS_CHECK([sed -e ["s/['][,]/'\n/g"] ./stdout |dnl
|
|
|
8072fb |
diff --git a/src/tests/dbus/zone_runtime_functional.at b/src/tests/dbus/zone_runtime_functional.at
|
|
|
8072fb |
index bb0798abe7da..b5799b9b1ca3 100644
|
|
|
8072fb |
--- a/src/tests/dbus/zone_runtime_functional.at
|
|
|
8072fb |
+++ b/src/tests/dbus/zone_runtime_functional.at
|
|
|
8072fb |
@@ -36,8 +36,12 @@ DBUS_CHECK([], [getDefaultZone], [], 0, [dnl
|
|
|
8072fb |
])
|
|
|
8072fb |
|
|
|
8072fb |
dnl Fetching Zones
|
|
|
8072fb |
+if NS_CMD([firewall-cmd --get-zones |grep "nm-shared" >/dev/null]); then
|
|
|
8072fb |
+ NM_SHARED="'nm-shared', "
|
|
|
8072fb |
+ export NM_SHARED
|
|
|
8072fb |
+fi
|
|
|
8072fb |
DBUS_CHECK([], [zone.getZones], [], 0, [dnl
|
|
|
8072fb |
- [(['block', 'dmz', 'drop', 'external', 'home', 'internal', 'public', 'trusted', 'work'],)]
|
|
|
8072fb |
+ (@<:@'block', 'dmz', 'drop', 'external', 'home', 'internal', m4_escape([${NM_SHARED}])'public', 'trusted', 'work'@:>@,)
|
|
|
8072fb |
])
|
|
|
8072fb |
FWD_CHECK([-q --zone public --add-interface dummy0])
|
|
|
8072fb |
FWD_CHECK([-q --zone public --add-source 10.1.1.1])
|
|
|
8072fb |
--
|
|
|
8072fb |
2.27.0
|
|
|
8072fb |
|