def test_start_marathon_job():
    client = mock.create_autospec(marathon.MarathonClient)
    cluster = 'my_cluster'
    service = 'my_service'
    instance = 'my_instance'
    app_id = 'mock_app_id'
    normal_instance_count = 5
    marathon_serviceinit.start_marathon_job(service, instance, app_id, normal_instance_count, client, cluster)
    client.scale_app.assert_called_once_with(app_id, instances=normal_instance_count, force=True)
Ejemplo n.º 2
0
def test_start_marathon_job():
    client = mock.create_autospec(marathon.MarathonClient)
    cluster = 'my_cluster'
    service = 'my_service'
    instance = 'my_instance'
    app_id = 'mock_app_id'
    normal_instance_count = 5
    marathon_serviceinit.start_marathon_job(service, instance, app_id, normal_instance_count, client, cluster)
    client.scale_app.assert_called_once_with(app_id, instances=normal_instance_count, force=True)