Skip to content

Commit

Permalink
Oppdatert tester
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum committed Jan 9, 2024
1 parent 544c5e6 commit ed332ab
Show file tree
Hide file tree
Showing 110 changed files with 137 additions and 205 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN_X_ISSUER=dummy
2 changes: 1 addition & 1 deletion apps/amelding-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-amelding-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
spring.cloud.vault.token=dummy
azure.app.client.id=dummy
azure.app.client.secret=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-app-tilgang-analyse-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ spring:
flyway:
url: jdbc:h2:mem:testdb
username: sa
password:
password:

TOKEN_X_ISSUER: dummy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-arbeidsforhold-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
spring.cloud.vault.enabled=false

azure.app.client.id=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-batch-bestilling-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
spring.cloud.vault.token=dummy
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER= dummy
5 changes: 1 addition & 4 deletions apps/dolly-backend/src/test/resources/application-test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
APP_NAME: dolly
APP_VERSION: ${application.version}
environment: localhost
CLIENT_ID: dummy
CLIENT_SECRET: dummy

TOKEN_X_CLIENT_ID: test
TOKEN_X_ISSUER: dummy

jira:
host: http://localhost:${wiremock.server.port:0}/jira
Expand Down
5 changes: 1 addition & 4 deletions apps/dolly-frontend/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
spring.cloud.vault.token: dummy

azure.app.client.id: dummy
azure.app.client.secret: dummy
TOKEN_X_ISSUER: dummy

IDPORTEN_CLIENT_ID: dummy
IDPORTEN_CLIENT_JWK: "{}"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-endringsmelding-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
spring.cloud.vault.token=dummy
azure.app.client.id=dummy
azure.app.client.secret=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-fss:dolly:ereg-batch-status-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-generer-arbeidsforhold-populasjon-service
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:generer-navn-service
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-generer-organisasjon-populasjon-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
KAFKA_KEYSTORE_PATH=""

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-generer-synt-amelding-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ consumers:


AAD_ISSUER_URI: http://localhost:${wiremock.server.port:0}/token
TOKEN_X_ISSUER: dummy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-geografiske-kodeverk-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
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;

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

@MockBean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
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.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
Expand All @@ -17,10 +18,10 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;


@SpringBootTest
@ActiveProfiles("test")
@AutoConfigureMockMvc(addFilters = false)
class KodeverkControllerTest {

Expand Down Expand Up @@ -265,7 +266,7 @@ void should_return_bad_request_when_embetenavn_is_not_alphabetical() throws Exce

private List<Kodeverk> readResponse(MvcResult result) throws Exception {
Kodeverk[] array = objectMapper.readValue(result.getResponse().getContentAsString(), Kodeverk[].class);
return Arrays.stream(array).collect(Collectors.toUnmodifiableList());
return Arrays.stream(array).toList();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN_X_ISSUER=DUMMY
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-helsepersonell-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-inntektsmelding-generator-service
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
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;

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=DUMMY
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-inntektsmelding-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
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;

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

@MockBean
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-jenkins-batch-status-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
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;

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

@MockBean
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-joark-dokument-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
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;

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
spring.cloud.vault.token=dummy
azure.app.client.id=dummy
TOKEN_X_ISSUER= dummy
2 changes: 1 addition & 1 deletion apps/miljoer-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-miljoer-service
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
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;

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:oppsummeringsdokument-service
accepted-audience: ${TOKEN_X_CLIENT_ID}
application:
name: oppsummeringsdokument-service
version: application.version.todo #TODO Finn ut hvordan denne kan settes fra gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:organisasjon-bestilling-service
accepted-audience: ${TOKEN_X_CLIENT_ID}

springdoc:
swagger-ui:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.cloud.vault.token=dummy
TOKEN_X_ISSUER=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spring:
tokenx:
issuer-uri: ${TOKEN_X_ISSUER}
jwk-set-uri: ${TOKEN_X_JWKS_URI}
accepted-audience: dev-gcp:dolly:testnav-organisasjon-faste-data-service
accepted-audience: ${TOKEN_X_CLIENT_ID}
cloud:
vault:
enabled: false
Expand Down
Loading

0 comments on commit ed332ab

Please sign in to comment.