|
|
|
@ -1,11 +1,23 @@
@@ -1,11 +1,23 @@
|
|
|
|
|
package org.springframework.cloud.netflix.eureka.server; |
|
|
|
|
|
|
|
|
|
import static org.junit.Assert.*; |
|
|
|
|
import static org.mockito.Mockito.mock; |
|
|
|
|
import static org.mockito.Mockito.when; |
|
|
|
|
import static org.springframework.cloud.netflix.eureka.server.EurekaControllerTest.setInstance; |
|
|
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.netflix.appinfo.ApplicationInfoManager; |
|
|
|
|
import com.netflix.appinfo.DataCenterInfo; |
|
|
|
|
import com.netflix.appinfo.InstanceInfo; |
|
|
|
|
import com.netflix.appinfo.MyDataCenterInfo; |
|
|
|
|
import com.netflix.eureka.cluster.PeerEurekaNode; |
|
|
|
|
import com.netflix.eureka.cluster.PeerEurekaNodes; |
|
|
|
|
import org.junit.After; |
|
|
|
|
import org.junit.Before; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
import com.netflix.eureka.util.StatusInfo; |
|
|
|
@ -20,6 +32,19 @@ public class EurekaControllerReplicasTest {
@@ -20,6 +32,19 @@ public class EurekaControllerReplicasTest {
|
|
|
|
|
String authList2 = authList1+",http://user2:pwd2@test2.com"; |
|
|
|
|
|
|
|
|
|
String empty = new String(); |
|
|
|
|
|
|
|
|
|
private ApplicationInfoManager original; |
|
|
|
|
|
|
|
|
|
@Before |
|
|
|
|
public void setup() throws Exception { |
|
|
|
|
this.original = ApplicationInfoManager.getInstance(); |
|
|
|
|
setInstance(mock(ApplicationInfoManager.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@After |
|
|
|
|
public void teardown() throws Exception { |
|
|
|
|
setInstance(this.original); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testFilterReplicasNoAuth() throws Exception { |
|
|
|
|