Skip to content
Snippets Groups Projects
Commit f8dca410 authored by Luis Araujo's avatar Luis Araujo
Browse files

Automate iptables-nmap test case


This commit automates the iptables-nmap test case to run from LAVA.

Signed-off-by: default avatarLuis Araujo <luis.araujo@collabora.co.uk>
parent 933871cf
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ metadata:
- APT
- OSTree
type: functional
exec-type: manual
exec-type: automated
priority: high
maintainer: "Apertis Project"
description: "Test the firewall using nmap from another computer."
......@@ -19,11 +19,14 @@ metadata:
- "The external computer must be connected to the same network as the target."
expected:
- "All ports are filtered, except port 80/tcp (http) which is closed."
- "All ports are filtered, except port 80/tcp (http) which is closed. The
script should report 'pass'"
- |
>Not shown: 999 filtered ports
PORT STATE SERVICE
80/tcp closed http
....
TEST_RESULT:only_http_80_closed:pass
notes:
- "Make sure that you have disconnect the ethernet connection to the target
......@@ -32,8 +35,19 @@ metadata:
a network attached to Bridged adaptor. The test cannot be run if the
network is configured as NAT."
install:
git-repos:
- url: https://gitlab.apertis.org/pkg/development/apertis-tests.git
branch: 'apertis/v2021dev2'
run:
steps:
- "From the external computer, check filtered/open/closed ports (the nmap
command can take some time):"
- "$ nmap <sac_ip>"
- "# From the external computer where the apertis-tests repository was
cloned, run the following script to check filtered/open/closed ports
(the nmap command can take some time). Replace 'lava-target-ip' by the
DUT_IP:"
- cd apertis-tests
- iptables-nmap/run-iptables-nmap.py `lava-target-ip`
parse:
pattern: 'TEST_RESULT:(?P<test_case_id>[^:]+):(?P<result>\w+)'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment