-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5ff490
commit 46935f6
Showing
8 changed files
with
61 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
...l-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/GroupsOperations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 24 additions & 17 deletions
41
...y-control-core/src/test/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/TestData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
package pl.allegro.tech.servicemesh.envoycontrol.utils | ||
|
||
object TestData { | ||
const val INGRESS_HOST = "ingress-host" | ||
const val INGRESS_PORT = 3380 | ||
const val EGRESS_HOST = "egress-host" | ||
const val EGRESS_PORT = 3380 | ||
const val DEFAULT_IDLE_TIMEOUT = 100L | ||
const val DEFAULT_SERVICE_NAME = "service-name" | ||
const val DEFAULT_DISCOVERY_SERVICE_NAME = "discovery-service-name" | ||
const val CLUSTER_NAME = "cluster-name" | ||
const val CLUSTER_NAME1 = "cluster-1" | ||
const val CLUSTER_NAME2 = "cluster-2" | ||
const val MAIN_CLUSTER_NAME = "cluster-1" | ||
const val SECONDARY_CLUSTER_NAME = "cluster-1-secondary" | ||
const val AGGREGATE_CLUSTER_NAME = "cluster-1-aggregate" | ||
const val TRAFFIC_SPLITTING_FORCE_TRAFFIC_ZONE = "dc2" | ||
const val CURRENT_ZONE = "dc1" | ||
import pl.allegro.tech.servicemesh.envoycontrol.snapshot.ZoneWeights | ||
|
||
val DEFAULT_CLUSTER_WEIGHTS = mapOf("main" to 50, "secondary" to 50) | ||
|
||
const val INGRESS_HOST = "ingress-host" | ||
const val INGRESS_PORT = 3380 | ||
const val EGRESS_HOST = "egress-host" | ||
const val EGRESS_PORT = 3380 | ||
const val DEFAULT_IDLE_TIMEOUT = 100L | ||
const val DEFAULT_SERVICE_NAME = "service-name" | ||
const val DEFAULT_DISCOVERY_SERVICE_NAME = "discovery-service-name" | ||
const val CLUSTER_NAME = "cluster-name" | ||
const val CLUSTER_NAME1 = "cluster-1" | ||
const val CLUSTER_NAME2 = "cluster-2" | ||
const val MAIN_CLUSTER_NAME = "cluster-1" | ||
const val SECONDARY_CLUSTER_NAME = "cluster-1-secondary" | ||
const val AGGREGATE_CLUSTER_NAME = "cluster-1-aggregate" | ||
const val TRAFFIC_SPLITTING_FORCE_TRAFFIC_ZONE = "dc2" | ||
const val CURRENT_ZONE = "dc1" | ||
|
||
val DEFAULT_CLUSTER_WEIGHTS = zoneWeights(50, 50) | ||
|
||
fun zoneWeights(main: Int, secondary: Int) = ZoneWeights().also { | ||
it.main = main | ||
it.secondary = secondary | ||
} | ||
|