Blame SOURCES/0047-test-dbus-zone-add-nm-shared-to-expected-output-if-i.patch

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