File tree 2 files changed +7
-1
lines changed
src/test/java/no/nav/vedtak/util/env
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 76
76
<artifactId >maven-surefire-plugin</artifactId >
77
77
<configuration >
78
78
<environmentVariables >
79
+ <VG >http://www.vg.no</VG >
79
80
<NAIS_CLUSTER_NAME >prod-fss</NAIS_CLUSTER_NAME >
80
81
<NAIS_NAMESPACE >jalla</NAIS_NAMESPACE >
81
82
</environmentVariables >
Original file line number Diff line number Diff line change 8
8
9
9
import java .io .ByteArrayOutputStream ;
10
10
import java .io .PrintStream ;
11
+ import java .net .URI ;
11
12
import java .time .Duration ;
12
13
13
14
import org .junit .Test ;
@@ -22,7 +23,7 @@ public class EnvironmentTest {
22
23
private static final Logger LOG = LoggerFactory .getLogger (EnvironmentTest .class );
23
24
private static Environment ENV = Environment .current ();
24
25
private static PrintStream SYSOUT = System .out ;
25
-
26
+
26
27
@ org .junit .After
27
28
public void after () throws Exception {
28
29
// reset
@@ -38,6 +39,10 @@ public void testEnvironment() {
38
39
assertTrue (ENV .isProd ());
39
40
}
40
41
42
+ public void testURI () {
43
+ assertEquals (ENV .getRequiredProperty ("VG" , URI .class ), URI .create ("http://www.vg.no" ));
44
+ }
45
+
41
46
public void testUppercase () {
42
47
assertEquals (PROD_FSS .clusterName (), ENV .getProperty ("nais.cluster.name" ));
43
48
}
You can’t perform that action at this time.
0 commit comments