Blob Blame History Raw
From 1a03a6f5c63fde715388d5afa0a80912860963c6 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Wed, 3 Jul 2019 10:41:07 -0400
Subject: [PATCH 69/73] test: service: coverage for import from file

(cherry picked from commit 40d8d6a105a7212db138e3afacf0f471676a8b78)
(cherry picked from commit f1919a7b3048a8d8c9cff0f442de31bb73f24ca0)
---
 src/tests/firewall-cmd.at | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/tests/firewall-cmd.at b/src/tests/firewall-cmd.at
index 0f9cac204ccd..28948636172d 100644
--- a/src/tests/firewall-cmd.at
+++ b/src/tests/firewall-cmd.at
@@ -305,6 +305,18 @@ FWD_START_TEST([user services])
     FWD_CHECK([--permanent --zone=public --list-services | grep foobar], 0, ignore)
     FWD_CHECK([--permanent --delete-service=foobar], 0, ignore)
     FWD_CHECK([--permanent --zone=public --list-services | grep foobar], 1, ignore)
+
+    AT_DATA([./foobar-to-be-renamed], [m4_strip([dnl
+        <?xml version="1.0" encoding="utf-8"?>
+        <service>
+        <protocol value="icmp" />
+        <port protocol="tcp" port="1234" />
+        </service>
+    ])
+    FWD_CHECK([--permanent --new-service-from-file="./foobar-to-be-renamed" --name="foobar-from-file"])
+    FWD_CHECK([--permanent --get-services | grep foobar-from-file], 0, [ignore])
+])
+
 FWD_END_TEST([-e '/ERROR: NAME_CONFLICT: new_service():/d' dnl
               -e '/ERROR: INVALID_ADDR:/d'])
 
-- 
2.20.1