Skip to content

Commit e748341

Browse files
committed
Add exit code validation to test_pod_apis
1 parent 1e57cd4 commit e748341

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

kubernetes/e2e_test/test_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414

15+
import json
1516
import time
1617
import unittest
1718
import uuid
@@ -103,6 +104,10 @@ def test_pod_apis(self):
103104
self.assertEqual("test string 2", line)
104105
resp.write_stdin("exit\n")
105106
resp.update(timeout=5)
107+
line = resp.read_channel(api_client.ws_client.ERROR_CHANNEL)
108+
status = json.loads(line)
109+
self.assertEqual(status['status'], 'Success')
110+
resp.update(timeout=5)
106111
self.assertFalse(resp.is_open())
107112

108113
number_of_pods = len(api.list_pod_for_all_namespaces().items)
@@ -226,4 +231,4 @@ def test_node_apis(self):
226231
for item in api.list_node().items:
227232
node = api.read_node(name=item.metadata.name)
228233
self.assertTrue(len(node.metadata.labels) > 0)
229-
self.assertTrue(isinstance(node.metadata.labels, dict))
234+
self.assertTrue(isinstance(node.metadata.labels, dict))

0 commit comments

Comments
 (0)