2121from kubernetes .client .apis import core_v1_api
2222from kubernetes .e2e_test import base
2323from kubernetes .stream import stream
24+ from kubernetes .stream .ws_client import ERROR_CHANNEL
2425
2526
2627def short_uuid ():
@@ -35,7 +36,7 @@ def setUpClass(cls):
3536 cls .config = base .get_e2e_configuration ()
3637
3738 def test_pod_apis (self ):
38- client = api_client .ApiClient (config = self .config )
39+ client = api_client .ApiClient (configuration = self .config )
3940 api = core_v1_api .CoreV1Api (client )
4041
4142 name = 'busybox-test-' + short_uuid ()
@@ -105,7 +106,7 @@ def test_pod_apis(self):
105106 self .assertEqual ("test string 2" , line )
106107 resp .write_stdin ("exit\n " )
107108 resp .update (timeout = 5 )
108- line = resp .read_channel (api_client . ws_client . ERROR_CHANNEL )
109+ line = resp .read_channel (ERROR_CHANNEL )
109110 status = json .loads (line )
110111 self .assertEqual (status ['status' ], 'Success' )
111112 resp .update (timeout = 5 )
@@ -118,7 +119,7 @@ def test_pod_apis(self):
118119 namespace = 'default' )
119120
120121 def test_service_apis (self ):
121- client = api_client .ApiClient (config = self .config )
122+ client = api_client .ApiClient (configuration = self .config )
122123 api = core_v1_api .CoreV1Api (client )
123124
124125 name = 'frontend-' + short_uuid ()
@@ -157,7 +158,7 @@ def test_service_apis(self):
157158 namespace = 'default' )
158159
159160 def test_replication_controller_apis (self ):
160- client = api_client .ApiClient (config = self .config )
161+ client = api_client .ApiClient (configuration = self .config )
161162 api = core_v1_api .CoreV1Api (client )
162163
163164 name = 'frontend-' + short_uuid ()
@@ -190,7 +191,7 @@ def test_replication_controller_apis(self):
190191 name = name , body = {}, namespace = 'default' )
191192
192193 def test_configmap_apis (self ):
193- client = api_client .ApiClient (config = self .config )
194+ client = api_client .ApiClient (configuration = self .config )
194195 api = core_v1_api .CoreV1Api (client )
195196
196197 name = 'test-configmap-' + short_uuid ()
@@ -226,7 +227,7 @@ def test_configmap_apis(self):
226227 self .assertEqual ([], resp .items )
227228
228229 def test_node_apis (self ):
229- client = api_client .ApiClient (config = self .config )
230+ client = api_client .ApiClient (configuration = self .config )
230231 api = core_v1_api .CoreV1Api (client )
231232
232233 for item in api .list_node ().items :
0 commit comments