File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
domenetjenester/iay/src/test/java/no/nav/foreldrepenger/abakus/registerdata/inntekt/sigrun
web/src/main/java/no/nav/foreldrepenger/abakus/app/metrics Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ class SigrunTjenesteTest {
24
24
private static final String FNR = "12345678910" ;
25
25
private static final PersonIdent PERSONIDENT = new PersonIdent (FNR );
26
26
27
- private static final Year IFJOR = MonthDay .now ().isBefore (MonthDay .of (Month .MAY , 1 )) ?
27
+ private static final MonthDay TIDLIGSTE_SJEKK_FJOR = MonthDay .of (Month .MAY , 1 );
28
+
29
+ private static final Year IFJOR = MonthDay .now ().isBefore (TIDLIGSTE_SJEKK_FJOR ) ?
28
30
Year .now ().minusYears (2 ) : Year .now ().minusYears (1 );
29
31
30
32
private static final SigrunRestClient CONSUMER = Mockito .mock (SigrunRestClient .class );
@@ -61,7 +63,11 @@ void skal_hente_og_mappe_om_data_fra_sigrun() {
61
63
62
64
63
65
var inntekter = TJENESTE .hentPensjonsgivende (PERSONIDENT , null );
64
- assertThat (inntekter .keySet ()).hasSize (2 );
66
+ if (MonthDay .now ().isBefore (TIDLIGSTE_SJEKK_FJOR )) {
67
+ assertThat (inntekter .keySet ()).hasSize (2 );
68
+ } else {
69
+ assertThat (inntekter .keySet ()).hasSize (3 );
70
+ }
65
71
assertThat (inntekter .get (intervallFor (IFJOR ))).isNull ();
66
72
assertThat (inntekter .get (intervallFor (IFJOR .minusYears (1 ))).get (InntektspostType .LØNN ).compareTo (new BigDecimal (1000L ))).isZero ();
67
73
assertThat (inntekter .get (intervallFor (IFJOR .minusYears (2 ))).get (InntektspostType .SELVSTENDIG_NÆRINGSDRIVENDE ).compareTo (new BigDecimal (500L ))).isZero ();
Original file line number Diff line number Diff line change 1
1
package no .nav .foreldrepenger .abakus .app .metrics ;
2
2
3
3
4
+ import static jakarta .ws .rs .core .MediaType .TEXT_PLAIN ;
4
5
import static no .nav .vedtak .log .metrics .MetricsUtil .REGISTRY ;
5
6
6
7
import io .swagger .v3 .oas .annotations .Operation ;
7
8
import jakarta .enterprise .context .ApplicationScoped ;
8
9
import jakarta .ws .rs .GET ;
9
10
import jakarta .ws .rs .Path ;
11
+ import jakarta .ws .rs .Produces ;
10
12
11
13
@ Path ("/metrics" )
14
+ @ Produces (TEXT_PLAIN )
12
15
@ ApplicationScoped
13
16
public class PrometheusRestService {
14
17
You can’t perform that action at this time.
0 commit comments