Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct test path of interest #1347

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions compute_endpoint/tests/unit/test_endpointmanager_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,15 @@ def test_no_cached_args_means_no_restart(epmanager, mocker):

mock_os = mocker.patch(f"{_MOCK_BASE}os")
mock_os.waitpid.side_effect = [(child_pid, -1), (0, -1)]
mock_os.waitstatus_to_exitcode.return_value = -127
mock_os.waitstatus_to_exitcode.return_value = 0
em.cmd_start_endpoint = mocker.Mock()

em.wait_for_children()
with mock.patch(f"{_MOCK_BASE}log") as mock_log:
em.wait_for_children()
a, _k = mock_log.info.call_args
assert "stopped normally" in a[0], "Verify happy path"

assert em.cmd_start_endpoint.call_count == 0
assert not em.cmd_start_endpoint.called


def test_emits_endpoint_id_if_isatty(mocker, epmanager):
Expand Down
Loading