summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
18fddb8)
Fixed some sonar issues.
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-597
Change-Id: I5b7bffba9375a6e89dd3756366faeecd695ff74e
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
import com.google.gson.JsonParser;
import java.io.FileOutputStream;
import com.google.gson.JsonParser;
import java.io.FileOutputStream;
import org.oran.dmaapadapter.repository.InfoTypes;
import org.oran.dmaapadapter.repository.Jobs;
import org.oran.dmaapadapter.tasks.ProducerRegstrationTask;
import org.oran.dmaapadapter.repository.InfoTypes;
import org.oran.dmaapadapter.repository.Jobs;
import org.oran.dmaapadapter.tasks.ProducerRegstrationTask;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
"app.configuration-filepath=./src/test/resources/test_application_configuration.json"//
})
class ApplicationTest {
"app.configuration-filepath=./src/test/resources/test_application_configuration.json"//
})
class ApplicationTest {
- private static final Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
@Autowired
private ApplicationConfig applicationConfig;
@Autowired
private ApplicationConfig applicationConfig;
@LocalServerPort
int localServerHttpPort;
@LocalServerPort
int localServerHttpPort;
- private static Gson gson = new GsonBuilder().create();
-
static class TestApplicationConfig extends ApplicationConfig {
@Override
public String getEcsBaseUrl() {
static class TestApplicationConfig extends ApplicationConfig {
@Override
public String getEcsBaseUrl() {
return ErrorResponse.create("", HttpStatus.NOT_FOUND);
} else {
String resp = dmaapResponses.remove(0);
return ErrorResponse.create("", HttpStatus.NOT_FOUND);
} else {
String resp = dmaapResponses.remove(0);
+ logger.info("DMAAP simulator returned: {}", resp);
return new ResponseEntity<>(resp, HttpStatus.OK);
}
return new ResponseEntity<>(resp, HttpStatus.OK);
}
ProducerJobInfo request =
new ProducerJobInfo(job.jobDefinition, "ID", job.infoTypeId, job.jobResultUri, job.owner, "TIMESTAMP");
String body = gson.toJson(request);
ProducerJobInfo request =
new ProducerJobInfo(job.jobDefinition, "ID", job.infoTypeId, job.jobResultUri, job.owner, "TIMESTAMP");
String body = gson.toJson(request);
+ logger.info("ECS Simulator PUT job: {}", body);
restClient.post(url, body).block();
}
restClient.post(url, body).block();
}
import org.oran.dmaapadapter.repository.InfoTypes;
import org.oran.dmaapadapter.repository.Jobs;
import org.oran.dmaapadapter.tasks.ProducerRegstrationTask;
import org.oran.dmaapadapter.repository.InfoTypes;
import org.oran.dmaapadapter.repository.Jobs;
import org.oran.dmaapadapter.tasks.ProducerRegstrationTask;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
"app.ecs-base-url=https://localhost:8434" //
})
class IntegrationWithEcs {
"app.ecs-base-url=https://localhost:8434" //
})
class IntegrationWithEcs {
- private static final Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
@Autowired
private ApplicationConfig applicationConfig;
@Autowired
private ApplicationConfig applicationConfig;