21
21
from kubernetes .client .apis import core_v1_api
22
22
from kubernetes .e2e_test import base
23
23
from kubernetes .stream import stream
24
+ from kubernetes .stream .ws_client import ERROR_CHANNEL
24
25
25
26
26
27
def short_uuid ():
@@ -35,7 +36,7 @@ def setUpClass(cls):
35
36
cls .config = base .get_e2e_configuration ()
36
37
37
38
def test_pod_apis (self ):
38
- client = api_client .ApiClient (config = self .config )
39
+ client = api_client .ApiClient (configuration = self .config )
39
40
api = core_v1_api .CoreV1Api (client )
40
41
41
42
name = 'busybox-test-' + short_uuid ()
@@ -105,7 +106,7 @@ def test_pod_apis(self):
105
106
self .assertEqual ("test string 2" , line )
106
107
resp .write_stdin ("exit\n " )
107
108
resp .update (timeout = 5 )
108
- line = resp .read_channel (api_client . ws_client . ERROR_CHANNEL )
109
+ line = resp .read_channel (ERROR_CHANNEL )
109
110
status = json .loads (line )
110
111
self .assertEqual (status ['status' ], 'Success' )
111
112
resp .update (timeout = 5 )
@@ -118,7 +119,7 @@ def test_pod_apis(self):
118
119
namespace = 'default' )
119
120
120
121
def test_service_apis (self ):
121
- client = api_client .ApiClient (config = self .config )
122
+ client = api_client .ApiClient (configuration = self .config )
122
123
api = core_v1_api .CoreV1Api (client )
123
124
124
125
name = 'frontend-' + short_uuid ()
@@ -157,7 +158,7 @@ def test_service_apis(self):
157
158
namespace = 'default' )
158
159
159
160
def test_replication_controller_apis (self ):
160
- client = api_client .ApiClient (config = self .config )
161
+ client = api_client .ApiClient (configuration = self .config )
161
162
api = core_v1_api .CoreV1Api (client )
162
163
163
164
name = 'frontend-' + short_uuid ()
@@ -190,7 +191,7 @@ def test_replication_controller_apis(self):
190
191
name = name , body = {}, namespace = 'default' )
191
192
192
193
def test_configmap_apis (self ):
193
- client = api_client .ApiClient (config = self .config )
194
+ client = api_client .ApiClient (configuration = self .config )
194
195
api = core_v1_api .CoreV1Api (client )
195
196
196
197
name = 'test-configmap-' + short_uuid ()
@@ -226,7 +227,7 @@ def test_configmap_apis(self):
226
227
self .assertEqual ([], resp .items )
227
228
228
229
def test_node_apis (self ):
229
- client = api_client .ApiClient (config = self .config )
230
+ client = api_client .ApiClient (configuration = self .config )
230
231
api = core_v1_api .CoreV1Api (client )
231
232
232
233
for item in api .list_node ().items :
0 commit comments