I have problem with bats. For example I get output:
1..3
ok 1 test1
ok 2 test2
not ok 3 test3
# (in test file test.bats, line 36)
# `echo $servers | grep $server' failed
Yes, I have in line 36 following code:
echo $servers | grep $server
servers has value ""
server has value "172.24.101.1"
I don't now why bats sees there assertion. Possibly it's tricky part of this tool. Can you explain to me what code should I avoid to prevent unexpected checks?
EDIT: Oh, right. Every line is checked. Grep returns non-zero value so test fails...
I have problem with bats. For example I get output:
Yes, I have in line 36 following code:
echo $servers | grep $server
servers has value "" server has value "172.24.101.1"
I don't now why bats sees there assertion. Possibly it's tricky part of this tool. Can you explain to me what code should I avoid to prevent unexpected checks?
EDIT: Oh, right. Every line is checked. Grep returns non-zero value so test fails...