Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/spring updates #3714

Merged
merged 35 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
093092b
Spring oppdatering for diverse apper, refaktorering vekk fra deprecat…
stigus Jan 8, 2025
91e89ac
- Backend spring oppdatering
stigus Jan 8, 2025
0ddcb33
- Backend spring oppdatering
stigus Jan 8, 2025
6cc6a95
- Fikset MalBestillingControllerTest
stigus Jan 8, 2025
299a251
Merge branch 'master' into feature/spring-updates
stigus Jan 9, 2025
e0227e0
Merge branch 'refs/heads/master' into feature/spring-updates
stigus Jan 9, 2025
1d33cc2
Merge branch 'master' into feature/spring-updates
stigus Jan 9, 2025
bbfae0e
Merge remote-tracking branch 'origin/feature/spring-updates' into fea…
stigus Jan 9, 2025
e6a2d40
Merge branch 'refs/heads/master' into feature/spring-updates
stigus Jan 9, 2025
a3330c5
- Mer testendringer og spring boot oppdateringer
stigus Jan 10, 2025
9f0f1ad
Merge branch 'master' into feature/spring-updates
stigus Jan 10, 2025
c405627
- Backend deploy
stigus Jan 10, 2025
ee4b875
Integration test path fix altinn3
stigus Jan 10, 2025
6cba3f8
- Integration test fix
stigus Jan 10, 2025
f8bcac3
- Mer test endringer
stigus Jan 10, 2025
bc3d8c1
- Test fix OrganisasjonMalBestillingServiceTest
stigus Jan 13, 2025
483a584
Merge branch 'master' into feature/spring-updates
stigus Jan 13, 2025
3cd2225
- Test fix OrganisasjonMalBestillingServiceTest
stigus Jan 13, 2025
3bf9001
- Deploy
stigus Jan 13, 2025
267b6fa
Merge branch 'master' into feature/spring-updates
stigus Jan 13, 2025
4e8d432
- Ny deploy
stigus Jan 13, 2025
7c7a28d
- Test
stigus Jan 13, 2025
6d0832e
Merge branch 'master' into feature/spring-updates
stigus Jan 14, 2025
a2c40d4
- Fjernet OrganisasjonMalBestillingServiceTest for å se om build fung…
stigus Jan 14, 2025
57fee6a
- Mindre test refactor
stigus Jan 14, 2025
4d9b1d5
Merge branch 'master' into feature/spring-updates
stigus Jan 14, 2025
cc7770d
Deployer diverse apper etter spring oppdatering for å se at ting fung…
stigus Jan 14, 2025
e992324
Merge remote-tracking branch 'origin/feature/spring-updates' into fea…
stigus Jan 14, 2025
b9c6ca2
Deployer diverse apper etter spring oppdatering for å se at ting fung…
stigus Jan 14, 2025
8f5b4f8
Develocity update
stigus Jan 14, 2025
1e8cac1
Fjernet disabled tester
stigus Jan 14, 2025
a70f2d6
Test fix statisk-data-forvalter
stigus Jan 14, 2025
0e0a6b6
Test fix statisk-data-forvalter
stigus Jan 14, 2025
7baad9f
Test fix statisk-data-forvalter
stigus Jan 14, 2025
08681a8
Test fix statisk-data-forvalter
stigus Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/adresse-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'adresse-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockBean
@MockitoBean
public JwtDecoder jwtDecoder;

@Test
Expand Down
2 changes: 1 addition & 1 deletion apps/altinn3-tilgang-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'altinn3-tilgang-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
import com.google.cloud.secretmanager.v1.SecretManagerServiceClient;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockBean
@MockitoBean
public ReactiveJwtDecoder jwtDecoder;

@MockBean
@MockitoBean
public SecretManagerServiceClient secretManagerClient;

@Test
Expand Down
2 changes: 1 addition & 1 deletion apps/amelding-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'amelding-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockBean
@MockitoBean
public ReactiveJwtDecoder reactiveJwtDecoder;

@Test
Expand Down
2 changes: 1 addition & 1 deletion apps/app-tilgang-analyse-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'app-tilgang-analyse-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockBean
@MockitoBean
public JwtDecoder jwtDecoder;

@Test
Expand Down
2 changes: 1 addition & 1 deletion apps/arbeidsforhold-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'arbeidsforhold-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.test.context.ActiveProfiles;

Expand All @@ -13,7 +13,7 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockBean
@MockitoBean
@SuppressWarnings("unused")
private JwtDecoder jwtDecoder;

Expand Down
2 changes: 1 addition & 1 deletion apps/batch-bestilling-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'batch-bestilling-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
@SpringBootTest
public class ApplicationContextTest {

@MockBean
@MockitoBean
public JwtDecoder jwtDecoder;

@Test
Expand Down
2 changes: 1 addition & 1 deletion apps/brreg-stub/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'brreg-stub'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
Expand All @@ -36,7 +36,7 @@ public class HentRolleoversiktControllerTest {
@Autowired
private TestRestTemplate restTemplate;

@MockBean
@MockitoBean
private RolleoversiktRepository repository;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
Expand All @@ -31,7 +31,7 @@ public class HentRollerControllerTest {
@Autowired
private TestRestTemplate restTemplate;

@MockBean
@MockitoBean
private HentRolleRepository repository;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
Expand All @@ -41,10 +41,10 @@ public class RolleoversiktControllerTest {
@Autowired
private TestRestTemplate restTemplate;

@MockBean
@MockitoBean
private RolleoversiktRepository rolleoversiktRepository;

@MockBean
@MockitoBean
private HentRolleRepository rolleRepository;

private RsRolleoversikt lagGyldigRsRolleoversikt(
Expand Down
2 changes: 1 addition & 1 deletion apps/bruker-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'bruker-service'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package no.nav.testnav.apps.brukerservice;

import no.nav.testnav.libs.reactivecore.config.CoreConfig;
import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.web.reactive.config.EnableWebFlux;

import no.nav.testnav.libs.reactivecore.config.CoreConfig;
import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration;


@Import({
CoreConfig.class,
Expand All @@ -20,4 +19,4 @@ public class BrukerServiceApplicationStarter {
public static void main(String[] args) {
SpringApplication.run(BrukerServiceApplicationStarter.class, args);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.security.oauth2.jwt.JwtDecoder;
Expand All @@ -29,7 +29,7 @@ class BrukerServiceIntegrationTest {
private static final String PID = "01810048413";
private static final String ORGNUMMER = "811306312";
public static MockWebServer mockBackEnd;
@MockBean
@MockitoBean
JwtDecoder jwtDecoder;

private ObjectMapper objectMapper;
Expand Down
2 changes: 1 addition & 1 deletion apps/budpro-service/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'budpro-service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
Expand All @@ -37,7 +37,7 @@ class BudproControllerTest {
@Autowired
private ObjectMapper objectMapper;

@MockBean
@MockitoBean
private GeneratedNameService generatedNameService;

private AutoCloseable closeable;
Expand Down
1 change: 1 addition & 0 deletions apps/dolly-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ trenger å ha noe forhold til under utfylling av bestilling. Noe data blir persi
av Dolly, bestillingskriterier, hvem som har sendt de inn og status på disse.

## Lokal kjøring

* [Generelt.](../../docs/local_general.md)
* [Secret Manager.](../../docs/local_secretmanager.md)
* [Database i GCP.](../../docs/gcp_db.md)
Expand Down
3 changes: 2 additions & 1 deletion apps/dolly-backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ dependencies {
implementation "org.apache.poi:poi:$versions.apachePoi"
implementation "org.apache.poi:poi-ooxml:$versions.apachePoi"

testImplementation 'org.opensearch:opensearch-testcontainers:2.0.1'
testImplementation 'org.opensearch:opensearch-testcontainers:2.1.2'

testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock'
testImplementation 'com.h2database:h2'
testImplementation "io.projectreactor:reactor-test:$versions.reactorTest"
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:postgresql'
testImplementation 'org.bitbucket.b_c:jose4j:0.9.6'

Expand Down
2 changes: 1 addition & 1 deletion apps/dolly-backend/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.4"
id "com.gradle.develocity" version "3.19"
}

rootProject.name = 'dolly-backend'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class Bruker implements Serializable {
private Bruker eidAv;

@Transient
@Builder.Default
private List<String> grupper = new ArrayList<>();

@OneToMany
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ private static JwtAuthenticationToken getToken() {
return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication())
.filter(JwtAuthenticationToken.class::isInstance)
.map(JwtAuthenticationToken.class::cast)
.orElseThrow(() -> new RuntimeException("Finner ikke Jwt Authentication Token"));
.orElseThrow(() -> new RuntimeException("CurrentAuth: Finner ikke Jwt Authentication Token"));
}
}

This file was deleted.

This file was deleted.

Loading
Loading