You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Test] Do not rely on MockZenPing for Azure tests (#27945)
This commit changes some Azure tests so that they do not rely on
MockZenPing and TestZenDiscovery anymore, but instead use a mocked
AzureComputeService that exposes internal test cluster nodes as if
they were real Azure nodes.
Related to #27859Closes#27917, #11533
Copy file name to clipboardExpand all lines: plugins/discovery-azure-classic/src/main/java/org/elasticsearch/discovery/azure/classic/AzureUnicastHostsProvider.java
+25-37Lines changed: 25 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,10 @@ public enum HostType {
62
62
this.type = type ;
63
63
}
64
64
65
+
publicStringgetType() {
66
+
returntype;
67
+
}
68
+
65
69
publicstaticHostTypefromString(Stringtype) {
66
70
for (HostTypehostType : values()) {
67
71
if (hostType.type.equalsIgnoreCase(type)) {
@@ -196,43 +200,7 @@ public List<DiscoveryNode> buildDynamicNodes() {
196
200
// In other case, it should be the right deployment so we can add it to the list of instances
197
201
198
202
for (RoleInstanceinstance : deployment.getRoleInstances()) {
199
-
StringnetworkAddress = null;
200
-
// Let's detect if we want to use public or private IP
Copy file name to clipboardExpand all lines: plugins/discovery-azure-classic/src/main/java/org/elasticsearch/plugin/discovery/azure/classic/AzureDiscoveryPlugin.java
Copy file name to clipboardExpand all lines: plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AbstractAzureComputeServiceTestCase.java
Copy file name to clipboardExpand all lines: plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceSimpleMock.java
0 commit comments