|
|
@@ -7,7 +7,9 @@ import static org.junit.Assert.assertTrue; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
import com.jd.blockchain.utils.net.NetworkAddress; |
|
|
|
import org.junit.Test; |
|
|
|
import org.springframework.core.io.ClassPathResource; |
|
|
|
|
|
|
@@ -27,9 +29,14 @@ public class GatewayConfigPropertiesTest { |
|
|
|
assertEquals(8081, configProps.http().getPort()); |
|
|
|
assertNull(configProps.http().getContextPath()); |
|
|
|
|
|
|
|
assertEquals("127.0.0.1", configProps.masterPeerAddress().getHost()); |
|
|
|
assertEquals(12000, configProps.masterPeerAddress().getPort()); |
|
|
|
assertTrue(configProps.masterPeerAddress().isSecure()); |
|
|
|
Set<NetworkAddress> networkAddresses = configProps.masterPeerAddresses(); |
|
|
|
assertEquals(2, networkAddresses.size()); |
|
|
|
|
|
|
|
for(NetworkAddress networkAddress : networkAddresses) { |
|
|
|
assertEquals("127.0.0.1", networkAddress.getHost()); |
|
|
|
assertEquals(12000, networkAddress.getPort()); |
|
|
|
assertTrue(networkAddress.isSecure()); |
|
|
|
} |
|
|
|
|
|
|
|
assertEquals("http://127.0.0.1:10001", configProps.dataRetrievalUrl()); |
|
|
|
|
|
|
|