1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/vmware/govmomi/govc/test/firewall.bats
2017-10-25 20:52:40 +00:00

21 lines
670 B
Bash
Executable File

#!/usr/bin/env bats
load test_helper
@test "firewall.ruleset.find" {
# Assumes sshServer ruleset is enabled
run govc firewall.ruleset.find -direction inbound -port 22
assert_success
run govc firewall.ruleset.find -direction outbound -port 22
if [ "$status" -eq 1 ] ; then
# If outbound port 22 is blocked, we should be able to list disabled rules via:
run govc firewall.ruleset.find -direction outbound -port 22 -enabled=false
assert_success
# find disabled should include sshClient ruleset in output
result=$(govc firewall.ruleset.find -direction outbound -port 22 -enabled=false | grep sshClient | wc -l)
[ $result -eq 1 ]
fi
}