Skip to content

Commit

Permalink
Merge pull request #1682 from globus/add_diag_base_msg
Browse files Browse the repository at this point in the history
add diagnostic ack message with file name
  • Loading branch information
LeiGlobus authored Oct 16, 2024
2 parents 6dbf835 + 30bb693 commit 2b0bf22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions compute_sdk/globus_compute_sdk/sdk/diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ def run_all_diags_wrapper(
out_bytes = "".join(diagnostic_output).encode()
f_out.write(out_bytes)

print(f"Compressed diagnostic output successfully writen to {zip_filename}")


def do_diagnostic_base(diagnostic_args):
"""
Expand Down
9 changes: 7 additions & 2 deletions compute_sdk/tests/unit/test_diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,13 @@ def test_diagnostic_gzip(
diagnostic_heading_count += 1
assert diagnostic_heading_count >= 5
else:
# Should be an empty ''
assert len(captured_stdout) == 1 and not captured_stdout[0]
assert len(captured_stdout) == 2

assert captured_stdout[-2].startswith(
"Compressed diagnostic output successfully writen to globus_compute_diagnostic_"
)
# Ends with line break
assert not captured_stdout[-1]

for random_file_data in mock_endpoint_config_dir_data.values():
assert random_file_data in contents
Expand Down

0 comments on commit 2b0bf22

Please sign in to comment.