ci: make ali test more robust
@@ -14,6 +14,8 @@ def test_ali_instances(ali_client):
response = ali_client.do_action_with_exception(request)
instances_dict = json.loads(response.decode())
assert(len(instances_dict) > 0)
+ if 'Instances' in instances_dict and 'Instance' in instances_dict['Instances'] \
+ and len(instances_dict['Instances']['Instance']) > 0:
inst = instances_dict['Instances']['Instance'][0]
assert(inst)
assert(inst['RegionId'] == region_id)
\ No newline at end of file
