From patchwork Sun Jul 1 04:01:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 1858 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id D487A6095C for ; Sat, 30 Jun 2018 20:03:33 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [127.0.0.1]) by mail01.ipfire.org (Postfix) with ESMTP id B5CD610910C5; Sat, 30 Jun 2018 19:03:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381813; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:list-id:list-unsubscribe:list-subscribe:list-post; bh=L93Huky1O4DV4Wipn4CEka7VHbddZ72WTLXJQSEMp+c=; b=LJHux3q4D2bvSO4a608lK8eh4FmmCIc6ahOmh5Pv0UFwBfDGU46BJV/YOyT0Y/rEQOKU7t XKJPtF7frTvWdzklezsO9UTND5V8aW84gTR296HavbEjesFdOAWBypirNPIOKbBJrNTj2i pjoZ4+ScgcUzW7IWUnIb5JbITejkNAmYzl8fIHI6s6mZ5Y+mUIINmoKrfQFuvA/CB1Rkrg 3iheQPP45NhS39sp7294XiJ5MeUSuy2HtTJbZG3G02Vu+v78KD/dU4GR88y9MlcqdSWv5c JX/aNTQ99Pbulq9ot1b/xc0GYRTgxo9gQVW7k0i6etNEOqBDQATkUL163tgt/Q== Received: from bockland.local.familyschlag (unknown [46.183.103.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id E1AF6106CEFA; Sat, 30 Jun 2018 19:03:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381811; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=L93Huky1O4DV4Wipn4CEka7VHbddZ72WTLXJQSEMp+c=; b=09EYbrv4yeQ08du9TrmPjGPlwrqGh30dYeTnrGQXK3MlKcejacHSFvM2aUni+2EDlCn4Iv G9Ux3RaKubnuFzuNIUF/EBnqu8ronLPNsw7JU6aF8VcmK7f/XPOs9RwtWRCFNy/bcZMinB BoQy7qzP+pvhNU0aJmKRLfxeBPvT93OZnsV90zPzpnXo/DQ1bwmXP9FPsbLiTmw/kjRTMR SYqLehmLPs0F4LHNh8m0anVFxUrni0ai9m/LoijfS6zApn7ThwWUBlH4NRFuCSnIgeB1M9 ZvbcpMnMg3AdYdPfbUxZQrkncRBEFL9M1xX4aktYWWtcTePP1LkCWuxEeWP2TA== From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 3/3] Add zone-new-bridge test Date: Sat, 30 Jun 2018 20:01:42 +0200 Message-Id: <20180630180142.10382-3-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180630180142.10382-1-jonatan.schlag@ipfire.org> References: <20180630180142.10382-1-jonatan.schlag@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=jschlag smtp.mailfrom=jonatan.schlag@ipfire.org X-Spamd-Result: default: False [-9.00 / 11.00]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; NEURAL_HAM(-2.90)[-0.968,0]; FROM_HAS_DN(0.00)[]; BAYES_HAM(-3.00)[100.00%]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_CONTAINS_FROM(1.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[]; ASN(0.00)[asn:34953, ipnet:46.183.96.0/21, country:DE]; REPLY(-4.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_ZERO(0.00)[0] X-Spam-Status: No, score=-9.00 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: network@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List for the network package List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: network-bounces@lists.ipfire.org Sender: "network" This test if we can execute 'network zone new upl0 bridge' Signed-off-by: Jonatan Schlag --- Makefile.am | 10 +++++++--- test/nitsi/test/zone-new-bridge/recipe | 9 +++++++++ test/nitsi/test/zone-new-bridge/settings.in | 9 +++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 test/nitsi/test/zone-new-bridge/recipe create mode 100644 test/nitsi/test/zone-new-bridge/settings.in diff --git a/Makefile.am b/Makefile.am index e56d0fb..e717133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -596,17 +596,21 @@ CLEANFILES += \ NITSI_TESTS = \ test/nitsi/test/hello-world \ - test/nitsi/test/make-check + test/nitsi/test/make-check \ + test/nitsi/test/zone-new-bridge EXTRA_DIST += \ test/nitsi/test/hello-world/recipe \ test/nitsi/test/hello-world/settings \ test/nitsi/test/make-check/recipe.in \ - test/nitsi/test/make-check/settings.in + test/nitsi/test/make-check/settings.in \ + test/nitsi/test/zone-new-bridge/recipe \ + test/nitsi/test/zone-new-bridge/settings.in CLEANFILES += \ test/nitsi/test/make-check/recipe \ - test/nitsi/test/make-check/settings + test/nitsi/test/make-check/settings \ + test/nitsi/test/zone-new-bridge/settings NITSI_ENVIRONMENT = diff --git a/test/nitsi/test/zone-new-bridge/recipe b/test/nitsi/test/zone-new-bridge/recipe new file mode 100644 index 0000000..6c054df --- /dev/null +++ b/test/nitsi/test/zone-new-bridge/recipe @@ -0,0 +1,9 @@ +include: ../../include/make-install +include: ../../include/network-settings +include: ../../include/network-reset +all: network zone new upl0 bridge +# this returns zero if the device exists +all: ip link show upl0 +all: ls /sys/class/net/upl0 +# check that the config dir exists +all: ls /etc/network/zones/upl0 diff --git a/test/nitsi/test/zone-new-bridge/settings.in b/test/nitsi/test/zone-new-bridge/settings.in new file mode 100644 index 0000000..207cfa0 --- /dev/null +++ b/test/nitsi/test/zone-new-bridge/settings.in @@ -0,0 +1,9 @@ +[GENERAL] +name = zone-new-bridge +description = This test checks if we can create a new zone of the type 'bridge' + +copy_from = ../../../../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz +copy_to = /root/ + +[VIRTUAL_ENVIRONMENT] +path = ../../virtual-environment/basic