Blame SOURCES/0046-test-zone-detect-same-source-interface-in-zones.patch

b8221b
From 63754e688baba56c7e625b53d39aa7380a754094 Mon Sep 17 00:00:00 2001
b8221b
From: Eric Garver <eric@garver.life>
b8221b
Date: Mon, 25 Oct 2021 09:35:51 -0400
b8221b
Subject: [PATCH 46/50] test(zone): detect same source/interface in zones
b8221b
b8221b
Coverage: rhbz2014383
b8221b
(cherry picked from commit 6f68d295ac5edcdb10c062e2fba7b810ce2db58c)
b8221b
(cherry picked from commit a15069d5542c2af391266f2da5f4137766d11a57)
b8221b
---
b8221b
 src/tests/regression/regression.at  |  1 +
b8221b
 src/tests/regression/rhbz2014383.at | 56 +++++++++++++++++++++++++++++
b8221b
 2 files changed, 57 insertions(+)
b8221b
 create mode 100644 src/tests/regression/rhbz2014383.at
b8221b
b8221b
diff --git a/src/tests/regression/regression.at b/src/tests/regression/regression.at
b8221b
index f9d42d6e2765..a20b913fbe59 100644
b8221b
--- a/src/tests/regression/regression.at
b8221b
+++ b/src/tests/regression/regression.at
b8221b
@@ -44,3 +44,4 @@ m4_include([regression/rhbz1936896.at])
b8221b
 m4_include([regression/rhbz1914935.at])
b8221b
 m4_include([regression/gh696.at])
b8221b
 m4_include([regression/rhbz1917766.at])
b8221b
+m4_include([regression/rhbz2014383.at])
b8221b
diff --git a/src/tests/regression/rhbz2014383.at b/src/tests/regression/rhbz2014383.at
b8221b
new file mode 100644
b8221b
index 000000000000..f2ef766dc1b2
b8221b
--- /dev/null
b8221b
+++ b/src/tests/regression/rhbz2014383.at
b8221b
@@ -0,0 +1,56 @@
b8221b
+FWD_START_TEST([same source in two zone xml])
b8221b
+AT_KEYWORDS(zone rhbz2014383)
b8221b
+
b8221b
+AT_CHECK([mkdir -p ./zones])
b8221b
+
b8221b
+AT_DATA([./zones/foobar.xml], [dnl
b8221b
+
b8221b
+<zone>
b8221b
+  <short>foobar</short>
b8221b
+  <description>foobar</description>
b8221b
+  <service name="ssh"/>
b8221b
+  <source address="10.10.10.10"/>
b8221b
+  <forward/>
b8221b
+</zone>
b8221b
+])
b8221b
+
b8221b
+AT_DATA([./zones/foobar2.xml], [dnl
b8221b
+
b8221b
+<zone>
b8221b
+  <short>foobar2</short>
b8221b
+  <description>foobar2</description>
b8221b
+  <service name="ssh"/>
b8221b
+  <source address="10.10.10.10"/>
b8221b
+  <forward/>
b8221b
+</zone>
b8221b
+])
b8221b
+
b8221b
+FWD_CHECK([--check-config], 105, [ignore], [ignore])
b8221b
+
b8221b
+dnl Do the same thing, but with interfaces
b8221b
+
b8221b
+AT_DATA([./zones/foobar.xml], [dnl
b8221b
+
b8221b
+<zone>
b8221b
+  <short>foobar</short>
b8221b
+  <description>foobar</description>
b8221b
+  <service name="ssh"/>
b8221b
+  <interface name="foobar0"/>
b8221b
+  <forward/>
b8221b
+</zone>
b8221b
+])
b8221b
+
b8221b
+AT_DATA([./zones/foobar2.xml], [dnl
b8221b
+
b8221b
+<zone>
b8221b
+  <short>foobar2</short>
b8221b
+  <description>foobar2</description>
b8221b
+  <service name="ssh"/>
b8221b
+  <interface name="foobar0"/>
b8221b
+  <forward/>
b8221b
+</zone>
b8221b
+])
b8221b
+
b8221b
+FWD_CHECK([--check-config], 104, [ignore], [ignore])
b8221b
+
b8221b
+FWD_END_TEST([ignore])
b8221b
-- 
b8221b
2.27.0
b8221b