Return-Path: From: Wang Mingyu Date: Mon, 25 Nov 2019 02:28:45 -0800 Message-ID: <1574677726-84865-2-git-send-email-wangmy@cn.fujitsu.com> In-Reply-To: <1574677726-84865-1-git-send-email-wangmy@cn.fujitsu.com> References: <1574677726-84865-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] openvpn: Add NEED_ROOT and modify testcli.conf List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Functional.openvpn does a lot of manipulation of system-wide configuration files, loading/unloading modules and starting/ stopping services. These all require root permissions. The specific ip address is written in testcli.conf, which does not apply to boards on other network segments. So change it to the variable set in the boad file. Signed-off-by: Wang Mingyu --- tests/Functional.openvpn/data/testcli.conf | 2 +- tests/Functional.openvpn/fuego_test.sh | 1 + tests/Functional.openvpn/test.yaml | 23 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/Functional.openvpn/test.yaml diff --git a/tests/Functional.openvpn/data/testcli.conf b/tests/Functional.openvpn/data/testcli.conf index 2fab877..db83f84 100644 --- a/tests/Functional.openvpn/data/testcli.conf +++ b/tests/Functional.openvpn/data/testcli.conf @@ -1,4 +1,4 @@ -remote 192.168.0.1 +remote remote_host port 5000 dev tap #dev tun diff --git a/tests/Functional.openvpn/fuego_test.sh b/tests/Functional.openvpn/fuego_test.sh index 285c008..275a63a 100644 --- a/tests/Functional.openvpn/fuego_test.sh +++ b/tests/Functional.openvpn/fuego_test.sh @@ -15,6 +15,7 @@ function test_deploy { function test_run { report "cd $BOARD_TESTDIR/fuego.$TESTDIR;\ + sed -i 's/remote_host/'"$SRV_IP"'/g' data/testcli.conf;\ ./openvpn_test.sh" } diff --git a/tests/Functional.openvpn/test.yaml b/tests/Functional.openvpn/test.yaml new file mode 100644 index 0000000..e1cbaa5 --- /dev/null +++ b/tests/Functional.openvpn/test.yaml @@ -0,0 +1,23 @@ +fuego_package_version: 1 +name: Functional.openvpn +description: | + OpenVPN is a robust and highly flexible VPN daemon. + This is a simple test to check the ps/pid/syslog, listening port + and device interface of openvpn. +license: BSD-3-Clause +author: Wang Mingyu +maintainer: Wang Mingyu +version: 2.00 +fuego_release: 1 +type: Functional +tags: ['openvpn'] +params: + SRV_IP: + description: the IP address of host - Defined in board file +data_files: + - openvpn_test.sh + - fuego_test.sh + - spec.json + - test.yaml + - data + - tests -- 2.17.1