Skip to content

fix(tests): make missing-file test self-contained - #315

Open
speriaswamy-amd wants to merge 3 commits into
speriaswamy/xdit-01-packaging-initfrom
speriaswamy/xdit-02-test-and-log-fixes
Open

fix(tests): make missing-file test self-contained#315
speriaswamy-amd wants to merge 3 commits into
speriaswamy/xdit-01-packaging-initfrom
speriaswamy/xdit-02-test-and-log-fixes

Conversation

@speriaswamy-amd

Copy link
Copy Markdown
Contributor

Part 2 of 12 in a stack that replaces #184. Base: #314.

Why

test_missing_file_raises asserted FileNotFoundError against the hardcoded absolute path /nonexistent/path/cluster.json. That is environment-dependent (AGENTS.md forbids it) and would stop testing what it claims to test if such a path ever existed.

What changed

  • cvs/monitors/unittests/test_check_cluster_health.py — build the missing path inside a TemporaryDirectory, matching the sibling test_invalid_json_raises_value_error.
  • cvs/tests/ibperf/ib_perf_bw_test.py — one log separator %%%%%%%%%=========.

The ibperf line is unrelated drive-by cleanup. The same %%% style appears elsewhere in ib_perf_bw_test.py, rccl_lib.py and mori_lib.py and is untouched, so this leaves the file internally inconsistent — happy to drop that hunk if reviewers prefer.

…ator

test_missing_file_raises asserted FileNotFoundError against the hardcoded
absolute path /nonexistent/path/cluster.json. That is environment-dependent
(AGENTS.md forbids it) and would silently stop testing what it claims to test
if such a path ever existed. It now builds the missing path inside a
TemporaryDirectory, matching the sibling test_invalid_json_raises_value_error.

Also replaces the '%%%%%%%%%' separator in one ibperf log line with '======='.
Note: the same '%%%' separator style appears elsewhere in ibperf, rccl_lib and
mori_lib and is left alone here; this single line is drive-by cleanup and can
be dropped if reviewers prefer the file stay consistent with its neighbours.

Co-Authored-By: Claude <noreply@anthropic.com>

@amd-droy amd-droy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants