From e34b1005145d950382808b7f1d776511b2d710fa Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Wed, 3 Jul 2019 10:41:07 -0400
Subject: [PATCH 09/20] test: service: coverage for import from file
(cherry picked from commit 40d8d6a105a7212db138e3afacf0f471676a8b78)
---
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 6444b4566af5..7bb13aee0221 100644
--- a/src/tests/firewall-cmd.at
+++ b/src/tests/firewall-cmd.at
@@ -319,6 +319,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