From 1b53536ed0a91e729abed3205d43907bc6c4d24a Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Mon, 18 Sep 2023 14:02:37 +0200 Subject: [PATCH] added service name to eds config #292 --- .../resource/clusters/EnvoyClustersFactoryTest.kt | 1 - .../servicemesh/envoycontrol/utils/ClusterOperations.kt | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactoryTest.kt b/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactoryTest.kt index bb5751acc..2a1d8917a 100644 --- a/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactoryTest.kt +++ b/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactoryTest.kt @@ -115,7 +115,6 @@ internal class EnvoyClustersFactoryTest { } .anySatisfy { assertThat(it.name).isEqualTo(SECONDARY_CLUSTER_NAME) - assertThat(it.edsClusterConfig).isEqualTo(cluster1.edsClusterConfig) } .anySatisfy { assertThat(it.name).isEqualTo(AGGREGATE_CLUSTER_NAME) diff --git a/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ClusterOperations.kt b/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ClusterOperations.kt index 05f0f4684..d261ed874 100644 --- a/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ClusterOperations.kt +++ b/envoy-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ClusterOperations.kt @@ -18,9 +18,12 @@ fun createCluster( .setType(Cluster.DiscoveryType.EDS) .setConnectTimeout(Durations.fromMillis(defaultProperties.edsConnectionTimeout.toMillis())) .setEdsClusterConfig( - Cluster.EdsClusterConfig.newBuilder().setEdsConfig( - ConfigSource.newBuilder().setAds(AggregatedConfigSource.newBuilder()) - ) + Cluster.EdsClusterConfig.newBuilder() + .setEdsConfig( + ConfigSource.newBuilder().setAds( + AggregatedConfigSource.newBuilder() + ) + ).setServiceName(clusterName) ) .setLbPolicy(defaultProperties.loadBalancing.policy) .setCommonHttpProtocolOptions(