From: John Mulligan Date: Thu, 26 Jan 2023 20:11:47 +0000 (-0500) Subject: cephadm/tests: add test coverage for find_program X-Git-Tag: v18.1.0~405^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5da930411e15459e619db2c9baaa41d80c4d967f;p=ceph.git cephadm/tests: add test coverage for find_program Signed-off-by: John Mulligan --- diff --git a/src/cephadm/tests/test_util_funcs.py b/src/cephadm/tests/test_util_funcs.py index 7a922bcdd48c..df444deb99e4 100644 --- a/src/cephadm/tests/test_util_funcs.py +++ b/src/cephadm/tests/test_util_funcs.py @@ -328,3 +328,11 @@ class TestFindExecutable: def test_no_such_exe(self): exe = _cephadm.find_executable("foo_bar-baz.noway") assert exe is None + + +def test_find_program(): + exe = _cephadm.find_program("true") + assert exe.endswith("true") + + with pytest.raises(ValueError): + _cephadm.find_program("foo_bar-baz.noway")