[Fuego] [PATCH 32/33] Add test case of service vsftpd to check the process of it.

Wang Mingyu wangmy at cn.fujitsu.com
Wed May 8 08:00:40 UTC 2019


Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
---
 tests/Functional.misc/tests/vsftpd.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 tests/Functional.misc/tests/vsftpd.sh

diff --git a/tests/Functional.misc/tests/vsftpd.sh b/tests/Functional.misc/tests/vsftpd.sh
new file mode 100644
index 0000000..315e3aa
--- /dev/null
+++ b/tests/Functional.misc/tests/vsftpd.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+#  In target, run comannd vsftpd.
+
+test="vsftpd"
+
+. ./fuego_board_function_lib.sh
+
+set_init_manager
+
+service_status=$(get_service_status vsftpd)
+exec_service_on_target vsftpd stop
+if exec_service_on_target vsftpd start
+then
+    echo " -> start of vsftpd succeeded."
+else
+    echo " -> start of vsftpd failed."
+    echo " -> $test: TEST-FAIL"
+    exit
+fi
+
+sleep 3
+
+if ps aux | grep "[/]usr/sbin/vsftpd"
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi
+if [ "$service_status" = "inactive" ]
+then
+    exec_service_on_target vsftpd stop
+fi
-- 
1.8.3.1





More information about the Fuego mailing list