Skip to content

Commit 2fadd34

Browse files
committed
cephadm/tests: fix _dist_info function logic error
The _dist_info helper function had a logic error where it was checking if 'entry.startswith(entry)' instead of 'entry.startswith(name)'. This caused the function to always evaluate incorrectly when checking for .dist-info or .egg-info entries in the zipapp. This bug was preventing the test assertions from properly validating that package metadata directories are included in the built cephadm zipapp. Fixes a bug introduced in commit 31c8010. Signed-off-by: Kefu Chai <[email protected]>
1 parent 324c931 commit 2fadd34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cephadm/tests/build/test_cephadm_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,5 @@ def test_cephadm_build_from_rpms(env, source_dir, tmp_path):
195195

196196
def _dist_info(entry, name):
197197
return (
198-
entry.startswith(entry) or entry.startswith(entry.lower())
198+
entry.startswith(name) or entry.startswith(name.lower())
199199
) and (entry.endswith('.dist-info') or entry.endswith('.egg-info'))

0 commit comments

Comments
 (0)