File tree 2 files changed +14
-5
lines changed
test/java/com/netflix/iep/config
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,10 @@ netflix.iep.env {
29
29
instance-id = ${?TITUS_TASK_INSTANCE_ID}
30
30
instance-id = ${?NETFLIX_INSTANCE_ID}
31
31
32
- local-ip = "127.0.0. 1"
33
- local-ip = ${?EC2_LOCAL_IPV4 }
32
+ local-ip = ":: 1"
33
+ local-ip = ${?NETFLIX_IPV6 }
34
34
35
- host = "localhost"
36
- host = ${?EC2_LOCAL_IPV4}
37
- host = ${?EC2_PUBLIC_HOSTNAME}
35
+ host = "["${netflix.iep.env.local-ip}"]"
38
36
39
37
account-id = "unknown"
40
38
account-id = ${?EC2_OWNER_ID}
Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .netflix .iep .config ;
17
17
18
+ import org .junit .Assert ;
18
19
import org .junit .Test ;
19
20
import org .junit .runner .RunWith ;
20
21
import org .junit .runners .JUnit4 ;
21
22
22
23
import java .lang .reflect .Method ;
23
24
import java .lang .reflect .Modifier ;
25
+ import java .net .Inet6Address ;
26
+ import java .net .InetAddress ;
24
27
25
28
@ RunWith (JUnit4 .class )
26
29
public class NetflixEnvironmentTest {
@@ -43,4 +46,12 @@ public void checkMethods() throws Exception {
43
46
Thread .currentThread ().setContextClassLoader (cl );
44
47
}
45
48
}
49
+
50
+ @ Test
51
+ public void hostAndIPv6 () throws Exception {
52
+ String host = ConfigManager .get ().getString ("netflix.iep.env.host" );
53
+ String ip = host .substring (1 , host .length () - 1 );
54
+ InetAddress addr = InetAddress .getByName (ip );
55
+ Assert .assertTrue (addr instanceof Inet6Address );
56
+ }
46
57
}
You can’t perform that action at this time.
0 commit comments