From 22f04125d6969f4760a2599e93160d10827461eb Mon Sep 17 00:00:00 2001 From: Patrice Brend'amour Date: Wed, 22 Sep 2021 00:02:49 +0200 Subject: [PATCH] added missing test --- test/ufw-docker.test.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/ufw-docker.test.sh b/test/ufw-docker.test.sh index b99a402..3253994 100755 --- a/test/ufw-docker.test.sh +++ b/test/ufw-docker.test.sh @@ -333,12 +333,22 @@ test-ufw-docker--allow-instance-all-published-port-multinetwork-select-network-a } test-ufw-docker--add-rule-a-non-existing-rule() { + @mockfalse ufw-docker--list webapp 5000 tcp "" + + load-ufw-docker-function ufw-docker--add-rule + ufw-docker--add-rule webapp 172.18.0.4 5000 tcp +} +test-ufw-docker--add-rule-a-non-existing-rule-assert() { + ufw route allow proto tcp from any to 172.18.0.4 port 5000 comment "allow webapp 5000/tcp" +} + +test-ufw-docker--add-rule-a-non-existing-rule-with-network() { @mockfalse ufw-docker--list webapp 5000 tcp default load-ufw-docker-function ufw-docker--add-rule ufw-docker--add-rule webapp 172.18.0.4 5000 tcp default } -test-ufw-docker--add-rule-a-non-existing-rule-assert() { +test-ufw-docker--add-rule-a-non-existing-rule-with-network-assert() { ufw route allow proto tcp from any to 172.18.0.4 port 5000 comment "allow webapp 5000/tcp default" }