Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

@Tag("integration-opentsdb-only")
@Tag("integration")
@ExtendWith(DatabaseContextProvider.class)
final class OdcsapiResourceIT extends BaseIT
{
Expand Down Expand Up @@ -231,11 +231,34 @@ private Long storePlatform() throws Exception
ApiPlatform platform = getDtoFromResource("odcsapi_platform_dto.json", ApiPlatform.class);

siteId = storeSite();

String configJson = getJsonFromResource("config_input_data.json");

ExtractableResponse<Response> response = given()
.log().ifValidationFails(LogDetail.ALL, true)
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON)
.header("Authorization", authHeader)
.filter(sessionFilter)
.body(configJson)
.when()
.redirects().follow(true)
.redirects().max(3)
.post("config")
.then()
.log().ifValidationFails(LogDetail.ALL, true)
.assertThat()
.statusCode(is(HttpServletResponse.SC_CREATED))
.extract()
;

long configId = response.body().jsonPath().getLong("configId");
platform.setConfigId(configId);
platform.setSiteId(siteId);

String platformJson = MAPPER.writeValueAsString(platform);

ExtractableResponse<Response> response = given()
response = given()
.log().ifValidationFails(LogDetail.ALL, true)
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON)
Expand Down