Skip to content

Commit c58e68f

Browse files
committed
Merge branch 'master' into bugfix/synt-vedtakshistorikk
2 parents a1d67d5 + b3b1af9 commit c58e68f

File tree

388 files changed

+10117
-1140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+10117
-1140
lines changed

.github/workflows/all.workflows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ jobs:
5959
if: inputs.workflow == 'frontend'
6060
uses: ./.github/workflows/common.workflow.frontend.yml
6161
permissions:
62+
id-token: write
6263
packages: write
63-
6464
with:
6565
cluster: ${{ inputs.cluster }}
6666
working-directory: "${{ inputs.type }}/${{ inputs.name }}"

.github/workflows/app.dolly-frontend.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@ on:
1414
- "libs/security-core/**"
1515
- "apps/dolly-frontend/**"
1616
- ".github/workflows/app.dolly-frontend.yml"
17-
- ".github/workflows/common.playwright-vitest.yml"
17+
- ".github/workflows/common.playwright.yml"
18+
- ".github/workflows/common.vitest.yml"
1819

1920
jobs:
2021
playwright:
21-
uses: ./.github/workflows/common.playwright-vitest.yml
22+
uses: ./.github/workflows/common.playwright.yml
23+
permissions:
24+
packages: write
25+
id-token: write
26+
contents: read
27+
with:
28+
working-directory: "apps/dolly-frontend"
29+
secrets:
30+
READER_TOKEN: ${{ secrets.READER_TOKEN }}
31+
vitest:
32+
uses: ./.github/workflows/common.vitest.yml
2233
permissions:
2334
packages: write
2435
id-token: write
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: tps-messaging-frontend
2+
3+
on:
4+
push:
5+
paths:
6+
- "plugins/**"
7+
- "libs/reactive-core/**"
8+
- "libs/reactive-frontend/**"
9+
- "libs/reactive-session-security/**"
10+
- "libs/security-core/**"
11+
- "apps/tps-messaging-frontend/**"
12+
- ".github/workflows/app.tps-messaging-frontend.yml"
13+
- ".github/workflows/common.vitest.yml"
14+
15+
jobs:
16+
vitest:
17+
uses: ./.github/workflows/common.vitest.yml
18+
permissions:
19+
packages: write
20+
id-token: write
21+
contents: read
22+
with:
23+
working-directory: "apps/tps-messaging-frontend"
24+
secrets:
25+
READER_TOKEN: ${{ secrets.READER_TOKEN }}
26+
workflow:
27+
uses: ./.github/workflows/common.workflow.frontend.yml
28+
with:
29+
working-directory: "apps/tps-messaging-frontend"
30+
deploy-tag: "#deploy-tps-messaging-frontend"
31+
permissions:
32+
contents: read
33+
id-token: write
34+
secrets: inherit

.github/workflows/common.playwright-vitest.yml .github/workflows/common.playwright.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Playwright/Vitest Tests
1+
name: Playwright Tests
22
on:
33
workflow_call:
44
inputs:
@@ -44,11 +44,6 @@ jobs:
4444
name: blob-report-${{ matrix.shardIndex }}
4545
path: ${{ inputs.working-directory }}/src/main/js/blob-report
4646
retention-days: 1
47-
48-
- name: Run Vitest/RTL tests
49-
if: ${{ matrix.shardIndex == 1 }}
50-
working-directory: ${{ inputs.working-directory }}/src/main/js
51-
run: npm run test:vitest-run
5247

5348
merge-reports:
5449
if: ${{ !cancelled() }}
@@ -85,7 +80,6 @@ jobs:
8580
source: ${{ inputs.working-directory }}/src/main/js/playwright-report
8681
destination: /${{ github.repository }}/${{ github.run_number }}
8782
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
88-
# project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
8983

9084
- name: Merge to json report
9185
working-directory: ${{ inputs.working-directory }}/src/main/js

.github/workflows/common.vitest.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Vitest Tests
2+
on:
3+
workflow_call:
4+
inputs:
5+
working-directory:
6+
type: string
7+
description: "The working directory for the job, e.g. apps/dolly-frontend (without leading/trailing slash)."
8+
required: true
9+
secrets:
10+
READER_TOKEN:
11+
required: true
12+
13+
jobs:
14+
vitest:
15+
runs-on: ubuntu-latest
16+
env:
17+
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
registry-url: https://npm.pkg.github.com/
24+
scope: "@navikt"
25+
- name: Install dependencies
26+
working-directory: ${{ inputs.working-directory }}/src/main/js
27+
run: npm ci
28+
- name: Install Playwright Browsers
29+
working-directory: ${{ inputs.working-directory }}/src/main/js
30+
run: npx playwright install --with-deps
31+
- name: Run Vitest/RTL tests
32+
working-directory: ${{ inputs.working-directory }}/src/main/js
33+
run: npm run test:vitest-run
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy Valkey (valkey-dolly-dev-session)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
name: Deploy Valkey
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: nais/deploy/actions/deploy@v2
16+
env:
17+
CLUSTER: dev-gcp
18+
RESOURCE: ".nais/valkey-dolly-dev-session.yml"
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy Valkey (valkey-dolly-session)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
name: Deploy Valkey
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: nais/deploy/actions/deploy@v2
16+
env:
17+
CLUSTER: dev-gcp
18+
RESOURCE: ".nais/valkey-dolly-session.yml"

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
77

8+
# testing
9+
*vitest-result.json
10+
*__screenshots__/
11+
812
# dependencies
913
*node_modules/
1014

.nais/valkey-dolly-dev-session.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: aiven.io/v1alpha1
2+
kind: Valkey
3+
metadata:
4+
labels:
5+
app: valkey-dolly-dev-session
6+
team: dolly
7+
name: valkey-dolly-dev-session
8+
namespace: dolly
9+
spec:
10+
plan: startup-4
11+
project: nav-dev
12+
---
13+
apiVersion: aiven.io/v1alpha1
14+
kind: ServiceIntegration
15+
metadata:
16+
labels:
17+
team: dolly
18+
name: valkey-dolly-dev-session
19+
namespace: dolly
20+
spec:
21+
project: nav-dev
22+
integrationType: prometheus
23+
destinationEndpointId: f20f5b48-18f4-4e2a-8e5f-4ab3edb19733
24+
sourceServiceName: valkey-dolly-dev-session

.nais/valkey-dolly-session.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: aiven.io/v1alpha1
2+
kind: Valkey
3+
metadata:
4+
labels:
5+
app: valkey-dolly-session
6+
team: dolly
7+
name: valkey-dolly-session
8+
namespace: dolly
9+
spec:
10+
plan: startup-4
11+
project: nav-dev
12+
---
13+
apiVersion: aiven.io/v1alpha1
14+
kind: ServiceIntegration
15+
metadata:
16+
labels:
17+
team: dolly
18+
name: valkey-dolly-session
19+
namespace: dolly
20+
spec:
21+
project: nav-dev
22+
integrationType: prometheus
23+
destinationEndpointId: f20f5b48-18f4-4e2a-8e5f-4ab3edb19733
24+
sourceServiceName: valkey-dolly-session

apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/consumer/command/PdlAdresseSoekCommand.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import no.nav.testnav.apps.adresseservice.exception.BadRequestException;
88
import no.nav.testnav.apps.adresseservice.exception.NotFoundException;
99
import no.nav.testnav.libs.reactivecore.web.WebClientError;
10+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
1011
import org.springframework.http.HttpHeaders;
1112
import org.springframework.http.MediaType;
1213
import org.springframework.web.reactive.function.BodyInserters;
@@ -33,7 +34,7 @@ public Mono<PdlAdresseResponse> call() {
3334
.uri(builder -> builder.path("/pdl-api/graphql").build())
3435
.body(BodyInserters.fromValue(query))
3536
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
36-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
37+
.headers(WebClientHeader.bearer(token))
3738
.header(TEMA, TemaGrunnlag.GEN.name())
3839
.retrieve()
3940
.bodyToMono(PdlAdresseResponse.class)

apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/altinn/command/CreateAccessListeMemberCommand.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AltinnAccessListResponseDTO;
77
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.OrganisasjonCreateDTO;
88
import no.nav.testnav.libs.reactivecore.web.WebClientError;
9+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
910
import org.springframework.http.HttpHeaders;
1011
import org.springframework.http.MediaType;
1112
import org.springframework.web.reactive.function.client.WebClient;
@@ -34,7 +35,7 @@ public Mono<AltinnAccessListResponseDTO> call() {
3435
.uri(builder -> builder.path(ALTINN_URL)
3536
.build(altinnConfig.getOwner(), altinnConfig.getIdentifier()))
3637
.bodyValue(organisasjon)
37-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
38+
.headers(WebClientHeader.bearer(token))
3839
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
3940
.retrieve()
4041
.bodyToMono(AltinnAccessListResponseDTO.class)

apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/altinn/command/DeleteAccessListMemberCommand.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AltinnAccessListResponseDTO;
77
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.OrganisasjonDeleteDTO;
88
import no.nav.testnav.libs.reactivecore.web.WebClientError;
9+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
910
import org.springframework.http.HttpHeaders;
1011
import org.springframework.http.HttpMethod;
1112
import org.springframework.http.MediaType;
@@ -37,7 +38,7 @@ public Mono<AltinnAccessListResponseDTO> call() {
3738
.uri(builder -> builder.path(ALTINN_URL)
3839
.build(altinnConfig.getOwner(), altinnConfig.getIdentifier())
3940
)
40-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
41+
.headers(WebClientHeader.bearer(token))
4142
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
4243
.bodyValue(identifiers)
4344
.retrieve()

apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/altinn/command/GetAccessListMembersCommand.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import no.nav.testnav.altinn3tilgangservice.config.AltinnConfig;
66
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AltinnAccessListResponseDTO;
77
import no.nav.testnav.libs.reactivecore.web.WebClientError;
8+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
89
import org.springframework.http.HttpHeaders;
910
import org.springframework.http.MediaType;
1011
import org.springframework.web.reactive.function.client.WebClient;
@@ -29,7 +30,7 @@ public Mono<AltinnAccessListResponseDTO> call() {
2930
.get()
3031
.uri(builder -> builder.path(ALTINN_URL)
3132
.build(altinnConfig.getOwner(), altinnConfig.getIdentifier()))
32-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
33+
.headers(WebClientHeader.bearer(token))
3334
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
3435
.retrieve()
3536
.bodyToMono(AltinnAccessListResponseDTO.class)

apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/altinn/command/GetAuthorizedPartiesCommand.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AltinnAuthorizedPartiesRequestDTO;
66
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AuthorizedPartyDTO;
77
import no.nav.testnav.libs.reactivecore.web.WebClientError;
8+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
89
import org.springframework.http.HttpHeaders;
910
import org.springframework.http.MediaType;
1011
import org.springframework.web.reactive.function.client.WebClient;
@@ -30,7 +31,7 @@ public Mono<AuthorizedPartyDTO[]> call() {
3031
.post()
3132
.uri(builder -> builder.path(ALTINN_URL)
3233
.build())
33-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
34+
.headers(WebClientHeader.bearer(token))
3435
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
3536
.bodyValue(request)
3637
.retrieve()

apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/altinn/command/GetExchangeTokenCommand.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import lombok.RequiredArgsConstructor;
44
import lombok.extern.slf4j.Slf4j;
55
import no.nav.testnav.libs.reactivecore.web.WebClientError;
6+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
67
import org.springframework.http.HttpHeaders;
78
import org.springframework.http.MediaType;
89
import org.springframework.web.reactive.function.client.WebClient;
@@ -27,7 +28,7 @@ public Mono<String> call() {
2728
.uri(builder -> builder.path(ALTINN_URL)
2829
.build()
2930
)
30-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
31+
.headers(WebClientHeader.bearer(token))
3132
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
3233
.retrieve()
3334
.bodyToMono(String.class)

apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/command/GetAktiveBestillingerCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import lombok.RequiredArgsConstructor;
44
import lombok.extern.slf4j.Slf4j;
55
import no.nav.testnav.libs.reactivecore.web.WebClientError;
6-
import org.springframework.http.HttpHeaders;
6+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
77
import org.springframework.web.reactive.function.client.WebClient;
88
import org.springframework.web.reactive.function.client.WebClientResponseException;
99
import reactor.core.publisher.Flux;
@@ -28,7 +28,7 @@ public Flux<Object> call() {
2828
.path("/api/v1/bestilling/gruppe/{gruppeId}/ikkeferdig")
2929
.build(gruppeId)
3030
)
31-
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
31+
.headers(WebClientHeader.bearer(token))
3232
.retrieve()
3333
.bodyToFlux(Object.class)
3434
.onErrorResume(throwable -> throwable instanceof WebClientResponseException.NotFound,

apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/command/PostBestillingCommand.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
import lombok.extern.slf4j.Slf4j;
55
import no.nav.registre.testnorge.batchbestillingservice.request.RsDollyBestillingRequest;
66
import no.nav.testnav.libs.reactivecore.web.WebClientError;
7+
import no.nav.testnav.libs.reactivecore.web.WebClientHeader;
78
import org.springframework.web.reactive.function.client.WebClient;
89
import org.springframework.web.reactive.function.client.WebClientResponseException;
910
import reactor.core.Disposable;
1011
import reactor.core.publisher.Mono;
1112

1213
import java.util.concurrent.Callable;
1314

14-
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
15-
1615
@Slf4j
1716
@RequiredArgsConstructor
1817
public class PostBestillingCommand implements Callable<Disposable> {
@@ -28,7 +27,7 @@ public Disposable call() {
2827
return webClient.post()
2928
.uri(builder -> builder
3029
.path("/api/v1/gruppe/{gruppeId}/bestilling").build(gruppeId))
31-
.header(AUTHORIZATION, "Bearer " + token)
30+
.headers(WebClientHeader.bearer(token))
3231
.bodyValue(request)
3332
.retrieve()
3433
.toBodilessEntity()

apps/bruker-service/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
- application: dolly-backend
2424
- application: dolly-frontend
2525
- application: dolly-idporten
26+
- application: testnav-tps-messaging-frontend
2627
- application: testnav-oversikt-frontend
2728
outbound:
2829
rules:

apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/BrukerServiceApplicationStarter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ public static void main(String[] args) {
2222
.initializers(new NaisEnvironmentApplicationContextInitializer())
2323
.run(args);
2424
}
25-
}
25+
}

0 commit comments

Comments
 (0)