Skip to content

Commit 1b63a05

Browse files
authored
Remove @pytest.mark.db_test for cncf (apache#52153)
1 parent 54f9bff commit 1b63a05

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

providers/cncf/kubernetes/tests/unit/cncf/kubernetes/executors/test_kubernetes_executor.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def test_execution_date_serialize_deserialize(self):
157157

158158
assert datetime_obj == new_datetime_obj
159159

160-
@pytest.mark.db_test
161160
@pytest.mark.skipif(
162161
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
163162
)
@@ -180,7 +179,6 @@ def test_delete_pod_successfully(self, mock_watcher, mock_client, mock_kube_clie
180179
finally:
181180
kube_executor.end()
182181

183-
@pytest.mark.db_test
184182
@pytest.mark.skipif(
185183
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
186184
)
@@ -204,7 +202,6 @@ def test_delete_pod_raises_404(self, mock_watcher, mock_client, mock_kube_client
204202
kube_executor.kube_scheduler.delete_pod(pod_name, namespace)
205203
mock_delete_namespace.assert_called_with(pod_name, namespace, body=mock_client.V1DeleteOptions())
206204

207-
@pytest.mark.db_test
208205
@pytest.mark.skipif(
209206
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
210207
)
@@ -253,7 +250,6 @@ def setup_method(self) -> None:
253250
self.kubernetes_executor = KubernetesExecutor()
254251
self.kubernetes_executor.job_id = 5
255252

256-
@pytest.mark.db_test
257253
@pytest.mark.skipif(
258254
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
259255
)
@@ -455,7 +451,6 @@ def test_run_next_exception_requeue(
455451
finally:
456452
kubernetes_executor.end()
457453

458-
@pytest.mark.db_test
459454
@pytest.mark.skipif(
460455
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
461456
)
@@ -495,7 +490,6 @@ def test_run_next_pmh_error(self, mock_get_kube_client, mock_pmh):
495490
finally:
496491
kubernetes_executor.end()
497492

498-
@pytest.mark.db_test
499493
@pytest.mark.skipif(
500494
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
501495
)
@@ -561,7 +555,6 @@ def test_gauge_executor_metrics(self, mock_stats_gauge, mock_trigger_tasks, mock
561555
]
562556
mock_stats_gauge.assert_has_calls(calls)
563557

564-
@pytest.mark.db_test
565558
@mock.patch("airflow.providers.cncf.kubernetes.executors.kubernetes_executor_utils.KubernetesJobWatcher")
566559
@mock.patch("airflow.providers.cncf.kubernetes.kube_client.get_kube_client")
567560
def test_invalid_executor_config(self, mock_get_kube_client, mock_kubernetes_job_watcher):
@@ -584,7 +577,6 @@ def test_invalid_executor_config(self, mock_get_kube_client, mock_kubernetes_job
584577
finally:
585578
executor.end()
586579

587-
@pytest.mark.db_test
588580
@pytest.mark.execution_timeout(10)
589581
@pytest.mark.skipif(
590582
AirflowKubernetesScheduler is None, reason="kubernetes python package is not installed"
@@ -801,7 +793,6 @@ def test_change_state_key_not_in_running(self, mock_get_kube_client, mock_kubern
801793
finally:
802794
executor.end()
803795

804-
@pytest.mark.db_test
805796
@pytest.mark.parametrize(
806797
"multi_namespace_mode_namespace_list, watchers_keys",
807798
[

providers/cncf/kubernetes/tests/unit/cncf/kubernetes/operators/test_spark_kubernetes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ def create_context(task):
222222
}
223223

224224

225-
@pytest.mark.db_test
226225
@patch("airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager.fetch_requested_container_logs")
227226
@patch("airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager.await_pod_completion")
228227
@patch("airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager.create_pod")
@@ -473,7 +472,6 @@ def test_template_spec(
473472
)
474473

475474

476-
@pytest.mark.db_test
477475
@patch("airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager.fetch_requested_container_logs")
478476
@patch("airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager.await_pod_completion")
479477
@patch("airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager.create_pod")

0 commit comments

Comments
 (0)