Exemplo n.º 1
0
def test_endpoints():
    endpoint_names = sdk_networks.get_endpoint_names(config.PACKAGE_NAME,
                                                     config.SERVICE_NAME)
    assert set(endpoint_names) == set(["native-client"])

    sdk_networks.check_endpoint_on_overlay(config.PACKAGE_NAME,
                                           config.SERVICE_NAME,
                                           "native-client",
                                           config.DEFAULT_TASK_COUNT)
Exemplo n.º 2
0
def test_overlay_network_deployment_and_endpoints():
    endpoint_names = sdk_networks.get_endpoint_names(config.PACKAGE_NAME, config.SERVICE_NAME)
    assert set(["broker", "zookeeper"]) == set(endpoint_names)

    sdk_networks.check_endpoint_on_overlay(config.PACKAGE_NAME, config.SERVICE_NAME, "broker", config.DEFAULT_BROKER_COUNT)

    zookeeper = sdk_networks.get_endpoint_string(
        config.PACKAGE_NAME, config.SERVICE_NAME, "zookeeper"
    )
    assert zookeeper == "master.mesos:2181/{}".format(sdk_utils.get_zk_path(config.SERVICE_NAME))
Exemplo n.º 3
0
def test_endpoints_on_overlay():
    endpoints_on_overlay_to_count = {
        "coordinator-http": 1,
        "coordinator-transport": 1,
        "data-http": 2,
        "data-transport": 2,
        "master-http": 3,
        "master-transport": 3,
    }

    endpoint_names = sdk_networks.get_endpoint_names(config.PACKAGE_NAME, config.SERVICE_NAME)
    assert set(endpoints_on_overlay_to_count.keys()) == set(endpoint_names)

    for endpoint_name, expected_count in endpoints_on_overlay_to_count.items():
        sdk_networks.check_endpoint_on_overlay(config.PACKAGE_NAME, config.SERVICE_NAME, endpoint_name, expected_count)
Exemplo n.º 4
0
def test_endpoints_on_overlay() -> None:
    endpoints_on_overlay_to_count = {
        "coordinator-http": 1,
        "coordinator-transport": 1,
        "data-http": 2,
        "data-transport": 2,
        "master-http": 3,
        "master-transport": 3,
    }

    endpoint_names = sdk_networks.get_endpoint_names(config.PACKAGE_NAME, config.SERVICE_NAME)
    assert set(endpoints_on_overlay_to_count.keys()) == set(endpoint_names)

    for endpoint_name, expected_count in endpoints_on_overlay_to_count.items():
        sdk_networks.check_endpoint_on_overlay(config.PACKAGE_NAME, config.SERVICE_NAME, endpoint_name, expected_count)
Exemplo n.º 5
0
def test_endpoints() -> None:
    endpoint_names = sdk_networks.get_endpoint_names(config.PACKAGE_NAME, config.SERVICE_NAME)
    assert set(endpoint_names) == set(["native-client"])

    sdk_networks.check_endpoint_on_overlay(config.PACKAGE_NAME, config.SERVICE_NAME, "native-client", config.DEFAULT_TASK_COUNT)