From 67decc69b49fdefd1759b0f36f0853d7de84870b Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Tue, 13 Sep 2016 14:46:08 -0700 Subject: [PATCH] doc fixes --- .../configuration/cluster_manager/cluster.rst | 6 +-- docs/intro/real_world_deployments.rst | 2 +- test/common/upstream/upstream_impl_test.cc | 46 ++----------------- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/docs/configuration/cluster_manager/cluster.rst b/docs/configuration/cluster_manager/cluster.rst index 18af25662aac5..b8c35fa518969 100644 --- a/docs/configuration/cluster_manager/cluster.rst +++ b/docs/configuration/cluster_manager/cluster.rst @@ -58,7 +58,7 @@ hosts .. code-block:: json - ["tcp://10.0.0.2:1234", "tcp://10.0.0.3:5678"] + [{"url": "tcp://10.0.0.2:1234"}, {"url": "tcp://10.0.0.3:5678"}] strict_dns Strict DNS clusters can specify any number of DNS/port combinations. All DNS addresses will be @@ -66,7 +66,7 @@ hosts .. code-block:: json - ["tcp://foo1.bar.com:1234", "tcp://foo2.bar.com:5678"] + [{"url": "tcp://foo1.bar.com:1234"}, {"url": "tcp://foo2.bar.com:5678"}] logical_dns Logical DNS clusters specify a host much like strict DNS, however only the first host will be @@ -74,7 +74,7 @@ hosts .. code-block:: json - ["tcp://foo1.bar.com:1234"] + [{"url": "tcp://foo1.bar.com:1234"}] .. _config_cluster_manager_cluster_service_name: diff --git a/docs/intro/real_world_deployments.rst b/docs/intro/real_world_deployments.rst index 4d151ed7b85e7..278ddd2023e99 100644 --- a/docs/intro/real_world_deployments.rst +++ b/docs/intro/real_world_deployments.rst @@ -4,4 +4,4 @@ Real world deployments Lyft Envoy was initially developed for use at Lyft as the primary edge and service to service networking layer. Lyft's deployment is currently across thousands of hosts and processes over - 1 million requests per second at peak. + 2 million requests per second at peak. diff --git a/test/common/upstream/upstream_impl_test.cc b/test/common/upstream/upstream_impl_test.cc index 6f0d8a43d9492..1569cf508beb1 100644 --- a/test/common/upstream/upstream_impl_test.cc +++ b/test/common/upstream/upstream_impl_test.cc @@ -217,44 +217,6 @@ TEST(StaticClusterImplTest, UrlConfig) { EXPECT_EQ(0UL, cluster.localZoneHealthyHosts().size()); } -TEST(StaticClusterImplTest, BothAddressPortAndURLConfig) { - Stats::IsolatedStoreImpl stats; - Ssl::MockContextManager ssl_context_manager; - std::string json = R"EOF( - { - "name": "addressportconfig", - "connect_timeout_ms": 250, - "type": "static", - "lb_type": "round_robin", - "hosts": [{"address": "1.2.3.4", "port": 99, "url": "tcp://192.168.1.1:22"}, - {"address":"5.6.7.8", "port": 63, "url": "tcp://192.168.1.2:44"}] - } - )EOF"; - - Json::StringLoader config(json); - StaticClusterImpl cluster(config, stats, ssl_context_manager); - EXPECT_THAT(std::list({"tcp://192.168.1.1:22", "tcp://192.168.1.2:44"}), - ContainerEq(hostListToURLs(cluster.hosts()))); -} - -TEST(StaticClusterImplTest, AddressMissingPortConfig) { - Stats::IsolatedStoreImpl stats; - Ssl::MockContextManager ssl_context_manager; - std::string json = R"EOF( - { - "name": "addressportconfig", - "connect_timeout_ms": 250, - "type": "static", - "lb_type": "round_robin", - "hosts": [{"address": "1.2.3.4"}, - {"address":"5.6.7.8"}] - } - )EOF"; - - Json::StringLoader config(json); - EXPECT_THROW(StaticClusterImpl(config, stats, ssl_context_manager), EnvoyException); -} - TEST(StaticClusterImplTest, UnsupportedLBType) { Stats::IsolatedStoreImpl stats; Ssl::MockContextManager ssl_context_manager; @@ -264,8 +226,8 @@ TEST(StaticClusterImplTest, UnsupportedLBType) { "connect_timeout_ms": 250, "type": "static", "lb_type": "fakelbtype", - "hosts": [{"address": "1.2.3.4", "port": 99, "url": "tcp://192.168.1.1:22"}, - {"address":"5.6.7.8", "port": 63, "url": "tcp://192.168.1.2:44"}] + "hosts": [{"url": "tcp://192.168.1.1:22"}, + {"url": "tcp://192.168.1.2:44"}] } )EOF"; @@ -283,8 +245,8 @@ TEST(StaticClusterImplTest, UnsupportedFeature) { "type": "static", "lb_type": "round_robin", "features": "fake", - "hosts": [{"address": "1.2.3.4", "port": 99, "url": "tcp://192.168.1.1:22"}, - {"address":"5.6.7.8", "port": 63, "url": "tcp://192.168.1.2:44"}] + "hosts": [{"url": "tcp://192.168.1.1:22"}, + {"url": "tcp://192.168.1.2:44"}] } )EOF";