Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import annotations

import json
from unittest.mock import patch
from unittest.mock import call, patch

import pytest
from kubernetes.client.rest import ApiException
Expand Down Expand Up @@ -841,9 +841,7 @@ def test_driver_logging_completed(
mock_log_call.assert_called_once_with(
"spark-pi-2020-02-24-1-driver", namespace="default", container="spark-kubernetes-driver"
)
log_info_call = info_log_call.mock_calls[2]
log_value = log_info_call[1][0]
assert log_value == TEST_POD_LOG_RESULT
assert call(TEST_POD_LOG_RESULT) in info_log_call.mock_calls

@patch(
"kubernetes.client.api.custom_objects_api.CustomObjectsApi.get_namespaced_custom_object",
Expand Down Expand Up @@ -888,6 +886,4 @@ def test_sidecar_driver_logging_completed(
mock_log_call.assert_called_once_with(
"spark-pi-2020-02-24-1-driver", namespace="default", container="spark-kubernetes-driver"
)
log_info_call = info_log_call.mock_calls[2]
log_value = log_info_call[1][0]
assert log_value == TEST_POD_LOG_RESULT
assert call(TEST_POD_LOG_RESULT) in info_log_call.mock_calls