Bats Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * bats =Test= ==Run a Command and Check the Status and Output== <syntaxhighlight lang='bash'> some_command=.... [...] run ${some_command} ${...")
 
Line 11: Line 11:
run ${some_command}
run ${some_command}
[[ ${status} -eq 0 ]]
[[ ${status} -eq 0 ]]
[[ ${output} =~ .*Stack[[:space:]]c3[[:space:]]is[[:space:]]stable[[:space:]]and[[:space:]]running* ]]
[[ ${output} =~ .*Stack[[:space:]]test[[:space:]]is[[:space:]]stable[[:space:]]and[[:space:]]running* ]]
</syntaxhighlight>
</syntaxhighlight>


=Setup/Teardown=
=Setup/Teardown=

Revision as of 00:00, 2 October 2019

Internal

Test

Run a Command and Check the Status and Output

some_command=....
[...]
run ${some_command}
[[ ${status} -eq 0 ]]
[[ ${output} =~ .*Stack[[:space:]]test[[:space:]]is[[:space:]]stable[[:space:]]and[[:space:]]running* ]]

Setup/Teardown