mock kube-config

This commit is contained in:
ming luo 2024-06-21 22:17:22 -04:00 committed by Gabriel Luiz Freitas Almeida
commit 20f7c6757f

View file

@ -8,7 +8,13 @@ from langflow.services.variable.kubernetes_secrets import KubernetesSecretManage
@pytest.fixture
def secret_manager():
def mock_kube_config(mocker):
mocker.patch("kubernetes.config.load_kube_config")
mocker.patch("kubernetes.config.load_incluster_config")
@pytest.fixture
def secret_manager(mock_kube_config):
return KubernetesSecretManager(namespace="test-namespace")