Skip to content

Commit

Permalink
fixup! Remove RefreshConfiguration workaround for K8s token refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Mar 9, 2022
1 parent d73279d commit e860745
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/kubernetes/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@

class TestClient(unittest.TestCase):
@mock.patch('airflow.kubernetes.kube_client.config')
def test_load_cluster_config(self, _):
client = get_kube_client(in_cluster=True)
assert not isinstance(client.api_client.configuration, Configuration)
def test_load_cluster_config(self, config):
get_kube_client(in_cluster=True)
assert config.load_incluster_config.called
assert config.load_kube_config.not_called

@mock.patch('airflow.kubernetes.kube_client.config')
def test_load_file_config(self, _):
client = get_kube_client(in_cluster=False)
assert isinstance(client.api_client.configuration, Configuration)
def test_load_file_config(self, config):
get_kube_client(in_cluster=False)
assert config.load_incluster_config.not_called
assert config.load_kube_config.called

def test_enable_tcp_keepalive(self):
socket_options = [
Expand Down

0 comments on commit e860745

Please sign in to comment.