예제 #1
0
def test_list_service_instances(
    mock_list_services,
    mock_list_instances,
):
    mock_list_services.return_value = ['fake_service']
    mock_list_instances.return_value = ['canary', 'main']
    expected = ['fake_service.canary', 'fake_service.main']
    actual = utils.list_service_instances()
    assert actual == expected
예제 #2
0
파일: list.py 프로젝트: georgekola/paasta
def paasta_list(args):
    """Print a list of Yelp services currently running
    :param args: argparse.Namespace obj created from sys.args by paasta_cli"""
    if args.print_instances:
        services = list_service_instances()
    elif args.all:
        services = list_services()
    else:
        services = list_paasta_services()

    for service in services:
        print service
예제 #3
0
파일: list.py 프로젝트: ashwinaj/paasta
def paasta_list(args):
    """Print a list of Yelp services currently running
    :param args: argparse.Namespace obj created from sys.args by paasta_cli"""
    if args.print_instances:
        services = list_service_instances()
    elif args.all:
        services = list_services()
    else:
        services = list_paasta_services()

    for service in services:
        print service