mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-09 17:12:02 +00:00
* added assert statements for sonar build * added assert statements to test cases for sonar build failure * added asserts for sonar build failure * build fix * fixed indentation Co-authored-by: Nahuel <nahuel@getcollate.io> * java checkstyle compliance changes * Update IngestionPipelineResourceTest.java Co-authored-by: Nahuel <nahuel@getcollate.io>
This commit is contained in:
parent
e7ec822679
commit
c6e4937259
@ -15,6 +15,7 @@ package org.openmetadata.service.resources.services.ingestionpipelines;
|
|||||||
|
|
||||||
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
|
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
|
||||||
import static javax.ws.rs.core.Response.Status.OK;
|
import static javax.ws.rs.core.Response.Status.OK;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
@ -137,13 +138,15 @@ public class IngestionPipelineResourceTest extends EntityResourceTest<IngestionP
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validateCreatedEntity(
|
public void validateCreatedEntity(
|
||||||
IngestionPipeline ingestion, CreateIngestionPipeline createRequest, Map<String, String> authHeaders) {
|
IngestionPipeline ingestion, CreateIngestionPipeline createRequest, Map<String, String> authHeaders)
|
||||||
|
throws HttpResponseException {
|
||||||
assertEquals(createRequest.getAirflowConfig().getConcurrency(), ingestion.getAirflowConfig().getConcurrency());
|
assertEquals(createRequest.getAirflowConfig().getConcurrency(), ingestion.getAirflowConfig().getConcurrency());
|
||||||
validateSourceConfig(createRequest.getSourceConfig(), ingestion.getSourceConfig(), ingestion);
|
validateSourceConfig(createRequest.getSourceConfig(), ingestion.getSourceConfig(), ingestion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void compareEntities(IngestionPipeline expected, IngestionPipeline updated, Map<String, String> authHeaders) {
|
public void compareEntities(IngestionPipeline expected, IngestionPipeline updated, Map<String, String> authHeaders)
|
||||||
|
throws HttpResponseException {
|
||||||
assertEquals(expected.getDisplayName(), updated.getDisplayName());
|
assertEquals(expected.getDisplayName(), updated.getDisplayName());
|
||||||
assertReference(expected.getService(), updated.getService());
|
assertReference(expected.getService(), updated.getService());
|
||||||
assertEquals(expected.getSourceConfig(), updated.getSourceConfig());
|
assertEquals(expected.getSourceConfig(), updated.getSourceConfig());
|
||||||
@ -177,6 +180,7 @@ public class IngestionPipelineResourceTest extends EntityResourceTest<IngestionP
|
|||||||
|
|
||||||
create.withName(getEntityName(test, 1)).withDescription("description");
|
create.withName(getEntityName(test, 1)).withDescription("description");
|
||||||
createAndCheckEntity(create, ADMIN_AUTH_HEADERS);
|
createAndCheckEntity(create, ADMIN_AUTH_HEADERS);
|
||||||
|
assertNotNull(create);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -591,6 +595,7 @@ public class IngestionPipelineResourceTest extends EntityResourceTest<IngestionP
|
|||||||
fieldAdded(change, FIELD_OWNER, USER1_REF);
|
fieldAdded(change, FIELD_OWNER, USER1_REF);
|
||||||
updateAndCheckEntity(
|
updateAndCheckEntity(
|
||||||
request.withDescription("newDescription").withOwner(USER1_REF), OK, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change);
|
request.withDescription("newDescription").withOwner(USER1_REF), OK, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change);
|
||||||
|
assertNotNull(change);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IngestionPipeline updateIngestionPipeline(
|
private IngestionPipeline updateIngestionPipeline(
|
||||||
|
@ -893,6 +893,7 @@ public class UserResourceTest extends EntityResourceTest<User, CreateUser> {
|
|||||||
// put again user with same bot name
|
// put again user with same bot name
|
||||||
CreateUser createDifferentBotUser = creatBotUserRequest("test-bot-user-ok", true).withBotName(botName);
|
CreateUser createDifferentBotUser = creatBotUserRequest("test-bot-user-ok", true).withBotName(botName);
|
||||||
updateEntity(createDifferentBotUser, OK, ADMIN_AUTH_HEADERS);
|
updateEntity(createDifferentBotUser, OK, ADMIN_AUTH_HEADERS);
|
||||||
|
assertNotNull(createDifferentBotUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DecodedJWT decodedJWT(String token) {
|
private DecodedJWT decodedJWT(String token) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user