Missing app.auth-token-file in application.yaml would not default to an empty string.
Formatting
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-743
Change-Id: Ic30d29b5720d4e2a81664712526ec1fdea6e512d
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<exec.skip>true</exec.skip>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.springdoc</groupId>
- <artifactId>springdoc-openapi-ui</artifactId>
- <version>1.6.6</version>
- </dependency>
+ <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<optional>true</optional>
</dependency>
<!-- TEST -->
+ <dependency>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-ui</artifactId>
+ <version>1.6.6</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
@Setter
private Path authTokenFilePath;
- public SecurityContext(@Value("${app.auth-token-file:\"\"}") String authTokenFilename) {
+ public SecurityContext(@Value("${app.auth-token-file:}") String authTokenFilename) {
if (!authTokenFilename.isEmpty()) {
this.authTokenFilePath = Path.of(authTokenFilename);
}
}
try {
long lastModified = authTokenFilePath.toFile().lastModified();
- if (lastModified != this.tokenTimestamp) {
+ if (tokenTimestamp == 0 || lastModified != this.tokenTimestamp) {
this.authToken = Files.readString(authTokenFilePath);
this.tokenTimestamp = lastModified;
}
@Value("${app.webclient.trust-store}")
private String sslTrustStore = "";
- @Value("${app.webclient.http.proxy-host:\"\"}")
+ @Value("${app.webclient.http.proxy-host:}")
private String httpProxyHost = "";
@Value("${app.webclient.http.proxy-port:0}")
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "Void", description = "Void/empty ")
public class VoidResponse {
private VoidResponse() {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "EiJobStatusObject", description = "Status for an EI job")
public class A1eEiJobStatus {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "EiTypeObject", description = "Information for an EI type")
public class A1eEiTypeInfo {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "consumer_information_type", description = "Information for an Information type")
public class ConsumerInfoTypeInfo {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "consumer_job", description = "Information for an Information Job")
public class ConsumerJobInfo {
import java.util.Collection;
-
@Schema(name = "consumer_job_status", description = "Status for an Information Job")
public class ConsumerJobStatus {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "consumer_type_registration_info", description = "Information for an Information type")
public class ConsumerTypeRegistrationInfo {
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
-
@EqualsAndHashCode
@Schema(name = "consumer_type_subscription_info", description = "Information for an information type subscription")
public class ConsumerTypeSubscriptionInfo {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "producer_info_type_info", description = "Information for an Information Type")
public class ProducerInfoTypeInfo {
import java.util.Collection;
-
@Schema(name = "producer_registration_info", description = "Information for an Information Producer")
public class ProducerRegistrationInfo {
import io.swagger.v3.oas.annotations.media.Schema;
-
@Schema(name = "producer_status", description = "Status for an Info Producer")
public class ProducerStatusInfo {
package org.oransc.ics;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
@TestPropertySource(
properties = { //