pg_rewind: Avoid need for empty callback test function.
Melanie suggested usage of
`declare -F <function_name> > /dev/null && <function_name>` in pg_rewind test.
-F will return only the name of the function and then the error code will be
non-zero if it is not defined and then by and-ing it with the function
definition alone, that function will only run in run_test if it is defined. So,
this helps to avoid coding empty functions if the test doesn't wish to have any
implementation for the same.
Co-authored-by: NMelanie Plageman <mplageman@pivotal.io>
Showing
想要评论请 注册 或 登录