Disable login for the test-runner's tests, as the cluster is not needed
@@ -3,6 +3,13 @@ import pytest
from kopf.testing import KopfRunner
+@pytest.fixture(autouse=True)
+def no_config_needed(mocker):
+ mocker.patch('kubernetes.config.load_incluster_config')
+ mocker.patch('kubernetes.config.load_kube_config')
+ mocker.patch('kubernetes.client.CoreApi') # for login self-check
+
+
def test_command_invocation_works():
with KopfRunner(['--help']) as runner:
pass
