Skip to content

Commit

Permalink
Run KubernetesPodOperator tests on any executor (#19810)
Browse files Browse the repository at this point in the history
Previously these tests were restricted to run only on KubernetesExecutor. But there is no reason
we cannot run them on other executors.
  • Loading branch information
dstandish authored Nov 29, 2021
1 parent e4c849e commit 68f13f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions kubernetes_tests/test_kubernetes_pod_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
from airflow.providers.cncf.kubernetes.utils.xcom_sidecar import PodDefaults
from airflow.utils import timezone
from airflow.version import version as airflow_version
from kubernetes_tests.test_base import EXECUTOR


def create_context(task):
Expand All @@ -65,7 +64,6 @@ def get_kubeconfig_path():
return kubeconfig_path if kubeconfig_path else os.path.expanduser('~/.kube/config')


@pytest.mark.skipif(EXECUTOR != 'KubernetesExecutor', reason="Only runs on KubernetesExecutor")
class TestKubernetesPodOperatorSystem(unittest.TestCase):
def get_current_task_name(self):
# reverse test name to make pod name unique (it has limited length)
Expand Down
2 changes: 0 additions & 2 deletions kubernetes_tests/test_kubernetes_pod_operator_backcompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
from airflow.utils import timezone
from airflow.utils.state import State
from airflow.version import version as airflow_version
from kubernetes_tests.test_base import EXECUTOR

# noinspection DuplicatedCode

Expand All @@ -64,7 +63,6 @@ def create_context(task):


# noinspection DuplicatedCode,PyUnusedLocal
@pytest.mark.skipif(EXECUTOR != 'KubernetesExecutor', reason="Only runs on KubernetesExecutor")
class TestKubernetesPodOperatorSystem(unittest.TestCase):
def get_current_task_name(self):
# reverse test name to make pod name unique (it has limited length)
Expand Down

0 comments on commit 68f13f0

Please sign in to comment.