Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stathischaritos committed Jun 24, 2022
1 parent 994028e commit a9d9d2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/kubernetes_helpers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ def test_job_phase_stream(mocked_get_job_pods):
pod.status = MagicMock()
pod.status.phase = "Running"
mocked_get_job_pods.return_value = [pod]
phase, pod_with_changed_state = next(job_phase_stream(job))
phase, pods_with_changed_state, error_message = next(job_phase_stream(job))
assert phase == "Running"
assert pod.metadata.name == pod_with_changed_state.metadata.name
assert pod.metadata.name == pods_with_changed_state[0].metadata.name

pod.status.phase = "Succeeded"
mocked_get_job_pods.return_value = [pod]
phase, pod_with_changed_state = next(job_phase_stream(job))
phase, pods_with_changed_state, error_message = next(job_phase_stream(job))
assert phase == "Succeeded"
assert pod.metadata.name == pod_with_changed_state.metadata.name
assert pod.metadata.name == pods_with_changed_state[0].metadata.name


@patch("kubeluigi.k8s.get_job_pods")
Expand Down

0 comments on commit a9d9d2b

Please sign in to comment.