Ejemplo n.º 1
0
def test_endpoints_on_overlay():
    observed_endpoints = networks.get_and_test_endpoints("", PACKAGE_NAME, 4)
    expected_endpoints = ("coordinator", "data", "ingest", "master")
    for endpoint in expected_endpoints:
        assert endpoint in observed_endpoints, "missing {} endpoint".format(
            endpoint)
        specific_endpoint = networks.get_and_test_endpoints(
            endpoint, PACKAGE_NAME, 4)
        networks.check_endpoints_on_overlay(specific_endpoint)
Ejemplo n.º 2
0
def test_endpoints_on_overlay():
    observed_endpoints = sdk_networks.get_and_test_endpoints(
        "", PACKAGE_NAME, 8)
    for endpoint in ENDPOINT_TYPES:
        assert endpoint in observed_endpoints, "missing {} endpoint".format(
            endpoint)
        specific_endpoint = sdk_networks.get_and_test_endpoints(
            endpoint, PACKAGE_NAME, 3)
        sdk_networks.check_endpoints_on_overlay(specific_endpoint)
Ejemplo n.º 3
0
def test_endpoints():
    endpoints = networks.get_and_test_endpoints(
        "", PACKAGE_NAME, 1
    )  # tests that the correct number of endpoints are found, should just be "node"
    assert "node" in endpoints, "Cassandra endpoints should contain only 'node', got {}".format(
        endpoints)
    endpoints = networks.get_and_test_endpoints("node", PACKAGE_NAME, 4)
    assert "address" in endpoints, "Endpoints missing address key"
    networks.check_endpoints_on_overlay(endpoints)
Ejemplo n.º 4
0
def test_endpoints():
    # tests that the correct number of endpoints are found, should just be "native-client":
    endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME,
                                                    config.SERVICE_NAME, "", 1)
    assert "native-client" in endpoints, "Cassandra endpoints should contain only 'native-client', got {}".format(
        endpoints)
    endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME,
                                                    config.SERVICE_NAME,
                                                    "native-client", 2)
    sdk_networks.check_endpoints_on_overlay(endpoints)
Ejemplo n.º 5
0
def test_overlay_network_deployment_and_endpoints():
    # double check
    sdk_tasks.check_running(config.SERVICE_NAME, config.DEFAULT_BROKER_COUNT)
    endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME, config.SERVICE_NAME, "", 2)
    assert "broker" in endpoints, "broker is missing from endpoints {}".format(endpoints)
    assert "zookeeper" in endpoints, "zookeeper missing from endpoints {}".format(endpoints)
    broker_endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME, config.SERVICE_NAME, "broker", 3)
    sdk_networks.check_endpoints_on_overlay(broker_endpoints)

    zookeeper = sdk_cmd.svc_cli(config.PACKAGE_NAME, config.SERVICE_NAME, 'endpoints zookeeper')
    assert zookeeper.rstrip() == 'master.mesos:2181/{}'.format(sdk_utils.get_zk_path(config.SERVICE_NAME))
Ejemplo n.º 6
0
def test_endpoints_on_overlay():
    endpoint_types_without_ingest = (
        'coordinator-http', 'coordinator-transport',
        'data-http', 'data-transport',
        'master-http', 'master-transport')

    observed_endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME, config.SERVICE_NAME, "",
                                                             len(endpoint_types_without_ingest))
    for endpoint in endpoint_types_without_ingest:
        assert endpoint in observed_endpoints, "missing {} endpoint".format(endpoint)
        specific_endpoint = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME, config.SERVICE_NAME, endpoint, 3)
        sdk_networks.check_endpoints_on_overlay(specific_endpoint)
Ejemplo n.º 7
0
def test_endpoints_on_overlay():
    endpoint_types_without_ingest = (
        'coordinator-http', 'coordinator-transport',
        'data-http', 'data-transport',
        'master-http', 'master-transport')

    observed_endpoints = sdk_networks.get_and_test_endpoints("", config.PACKAGE_NAME,
                                                             len(endpoint_types_without_ingest))
    for endpoint in endpoint_types_without_ingest:
        assert endpoint in observed_endpoints, "missing {} endpoint".format(endpoint)
        specific_endpoint = sdk_networks.get_and_test_endpoints(endpoint, config.PACKAGE_NAME, 3)
        sdk_networks.check_endpoints_on_overlay(specific_endpoint)
Ejemplo n.º 8
0
def test_overlay_network_deployment_and_endpoints():
    # double check
    tasks.check_running(SERVICE_NAME, DEFAULT_BROKER_COUNT)
    endpoints = networks.get_and_test_endpoints("", PACKAGE_NAME, 2)
    assert "broker" in endpoints, "broker is missing from endpoints {}".format(
        endpoints)
    assert "zookeeper" in endpoints, "zookeeper missing from endpoints {}".format(
        endpoints)
    broker_endpoints = networks.get_and_test_endpoints("broker", PACKAGE_NAME,
                                                       4)
    networks.check_endpoints_on_overlay(broker_endpoints)

    zookeeper = service_cli('endpoints zookeeper', get_json=False)
    assert zookeeper.rstrip() == 'master.mesos:2181/dcos-service-{}'.format(
        PACKAGE_NAME)
Ejemplo n.º 9
0
def test_overlay_network_deployment_and_endpoints():
    # double check
    sdk_tasks.check_running(config.SERVICE_NAME, config.DEFAULT_BROKER_COUNT)
    endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME,
                                                    config.SERVICE_NAME, "", 2)
    assert "broker" in endpoints, "broker is missing from endpoints {}".format(
        endpoints)
    assert "zookeeper" in endpoints, "zookeeper missing from endpoints {}".format(
        endpoints)
    broker_endpoints = sdk_networks.get_and_test_endpoints(
        config.PACKAGE_NAME, config.SERVICE_NAME, "broker", 3)
    sdk_networks.check_endpoints_on_overlay(broker_endpoints)

    zookeeper = sdk_cmd.svc_cli(config.PACKAGE_NAME, config.SERVICE_NAME,
                                'endpoints zookeeper')
    assert zookeeper.rstrip() == 'master.mesos:2181/{}'.format(
        sdk_utils.get_zk_path(config.SERVICE_NAME))
Ejemplo n.º 10
0
def test_endpoints():
    # tests that the correct number of endpoints are found, should just be "native-client":
    endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME, config.SERVICE_NAME, "", 1)
    assert "native-client" in endpoints, "Cassandra endpoints should contain only 'native-client', got {}".format(endpoints)
    endpoints = sdk_networks.get_and_test_endpoints(config.PACKAGE_NAME, config.SERVICE_NAME, "native-client", 2)
    sdk_networks.check_endpoints_on_overlay(endpoints)