|
@@ -4,7 +4,7 @@ import unittest
|
|
|
from os import write
|
|
|
from aliyunsdkecs.request.v20140526.RunInstancesRequest import RunInstancesRequest
|
|
|
|
|
|
-from gateway import gateway_config, alb_utils, alb_gateway_scaling_j_count
|
|
|
+from gateway import gateway_config, alb_utils, alb_gateway_scaling_j_count, alb_gateway_update_cluster
|
|
|
from longvideoapi.longvideoapi_config import server_group_id_list
|
|
|
|
|
|
|
|
@@ -90,5 +90,16 @@ class MyTestCase(unittest.TestCase):
|
|
|
logging.info(ess_instance_ids)
|
|
|
|
|
|
|
|
|
+ def test_remove_container_image(self):
|
|
|
+ ecs_client = alb_utils.connect_client(access_key_id=gateway_config.ecs_client_params['access_key_id'],
|
|
|
+ access_key_secret=gateway_config.ecs_client_params['access_key_secret'],
|
|
|
+ region_id=gateway_config.ecs_client_params['region_id'])
|
|
|
+ instance_id = 'i-bp1933o7phjzrwg1x3kd'
|
|
|
+ container_name_list = ['piaoquan-gateway', 'gateway']
|
|
|
+ alb_gateway_update_cluster.remove_container_image(ecs_client, instance_id, container_name_list)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if __name__ == '__main__':
|
|
|
unittest.main()
|