Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Commit 8bccad7

Browse files
author
Damir Hadiiev [FFW]
committed
Add useful submodules
1 parent db626d8 commit 8bccad7

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "tests/helpers/bats-support"]
2+
path = tests/helpers/bats-support
3+
url = https://github.com/ztombol/bats-support.git
4+
[submodule "tests/helpers/bats-assert"]
5+
path = tests/helpers/bats-assert
6+
url = https://github.com/ztombol/bats-assert.git

tests/functional_tests.bats

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bats
2+
3+
@test "1.1 - Remove all non-essential services from the host - Network" {
4+
# Check for listening network services.
5+
listening_services=$(netstat -na | grep -v tcp6 | grep -v unix | grep -c LISTEN)
6+
fail "jk" $BATS_TEST_NAME
7+
if [ "$listening_services" -eq 1 ]; then
8+
fail "Failed to get listening services for check: $BATS_TEST_NAME"
9+
else
10+
if [ "$listening_services" -gt 5 ]; then
11+
fail "Host listening on: $listening_services ports"
12+
fi
13+
fi
14+
}

tests/helpers/bats-assert

Submodule bats-assert added at 9f88b42

tests/helpers/bats-support

Submodule bats-support added at d0a1318

0 commit comments

Comments
 (0)