Skip to content

Commit

Permalink
Refactor: Update application configuration and test setup; remove unu…
Browse files Browse the repository at this point in the history
…sed properties and switch to MockitoBean for better test isolation #deploy-dolly-search-service
  • Loading branch information
krharum committed Feb 18, 2025
1 parent f911fc9 commit 75438da
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
8 changes: 0 additions & 8 deletions apps/dolly-search-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ spring:
application:
name: testnav-dolly-search-service
description: Tjeneste for å søke etter Dolly-personer.
autoconfigure:
exclude:
org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticSearchReactiveHealthContributorAutoConfiguration,
org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRepositoriesAutoConfiguration,
org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRestClientAutoConfiguration
security:
oauth2:
resourceserver:
Expand All @@ -34,9 +29,6 @@ consumers:
cluster: dev-fss

management:
health:
elasticsearch:
enabled: false
endpoints:
enabled-by-default: true
web:
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.security.oauth2.jwt.JwtDecoder;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;

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

@MockBean
@MockitoBean
public JwtDecoder jwtDecoder;

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
TOKEN_X_ISSUER: https://tokenx.dev-gcp.nav.cloud.nais.io

open:
search:
uri: http://localhost:9200
username: dummy
password: dummy
index: local

0 comments on commit 75438da

Please sign in to comment.