diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/EnumBackwardCompatibilityTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/EnumBackwardCompatibilityTest.java index c5def4dc342..d0463704744 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/EnumBackwardCompatibilityTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/EnumBackwardCompatibilityTest.java @@ -30,7 +30,7 @@ public class EnumBackwardCompatibilityTest { * number of the last enum. This will help catch new enum inadvertently being added in the middle. */ @Test - public void testRelationshipEnumBackwardCompatible() { + void testRelationshipEnumBackwardCompatible() { assertEquals(15, Relationship.values().length); assertEquals(14, Relationship.APPLIED_TO.ordinal()); } @@ -40,7 +40,7 @@ public class EnumBackwardCompatibilityTest { * number of the last enum. This will help catch new enum inadvertently being added in the middle. */ @Test - public void testTagLabelEnumBackwardCompatible() { + void testTagLabelEnumBackwardCompatible() { assertEquals(4, LabelType.values().length); assertEquals(3, LabelType.DERIVED.ordinal()); } @@ -50,7 +50,7 @@ public class EnumBackwardCompatibilityTest { * number of the last enum. This will help catch new enum inadvertently being added in the middle. */ @Test - public void testTagStateEnumBackwardCompatible() { + void testTagStateEnumBackwardCompatible() { assertEquals(2, TagLabel.State.values().length); assertEquals(1, State.CONFIRMED.ordinal()); } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/CollectionRegistryTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/CollectionRegistryTest.java index 7fa1fe1b248..9d96de7c26c 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/CollectionRegistryTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/CollectionRegistryTest.java @@ -21,7 +21,7 @@ import org.openmetadata.catalog.type.CollectionDescriptor; public class CollectionRegistryTest { @Test - public void testCollections() { + void testCollections() { CollectionRegistry.getInstance(); Map descriptors = CollectionRegistry.getInstance().getCollectionMap(); String path = "/v1"; diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/EntityResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/EntityResourceTest.java index 055218c2042..9ddda7152d3 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/EntityResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/EntityResourceTest.java @@ -314,7 +314,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { // Common entity tests for GET operations /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @Test - public void get_entityListWithPagination_200(TestInfo test) throws HttpResponseException, URISyntaxException { + void get_entityListWithPagination_200(TestInfo test) throws HttpResponseException, URISyntaxException { // Create a number of entities between 5 and 20 inclusive Random rand = new Random(); int maxEntities = rand.nextInt(16) + 5; @@ -399,7 +399,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void get_entityListWithInvalidLimit_4xx() { + void get_entityListWithInvalidLimit_4xx() { // Limit must be >= 1 and <= 1000,000 HttpResponseException exception = assertThrows(HttpResponseException.class, () -> listEntities(null, -1, null, null, adminAuthHeaders())); @@ -414,7 +414,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void get_entityListWithInvalidPaginationCursors_4xx() { + void get_entityListWithInvalidPaginationCursors_4xx() { // Passing both before and after cursors is invalid HttpResponseException exception = assertThrows(HttpResponseException.class, () -> listEntities(null, 1, "", "", adminAuthHeaders())); @@ -422,7 +422,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void get_entityWithDifferentFields_200_OK(TestInfo test) throws IOException, URISyntaxException { + void get_entityWithDifferentFields_200_OK(TestInfo test) throws IOException, URISyntaxException { Object create = createRequest(getEntityName(test), "description", "displayName", USER_OWNER1); T entity = createAndCheckEntity(create, adminAuthHeaders()); validateGetWithDifferentFields(entity, false); @@ -433,7 +433,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { // Common entity tests for POST operations /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @Test - public void post_entityCreateWithInvalidName_400() throws URISyntaxException { + void post_entityCreateWithInvalidName_400() throws URISyntaxException { // Create an entity with mandatory name field null final Object request = createRequest(null, "description", "displayName", null); HttpResponseException exception = @@ -452,7 +452,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void post_chartWithInvalidOwnerType_4xx(TestInfo test) throws URISyntaxException { + void post_chartWithInvalidOwnerType_4xx(TestInfo test) throws URISyntaxException { if (!supportsOwner) { return; } @@ -464,7 +464,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void post_entityWithNonExistentOwner_4xx(TestInfo test) throws URISyntaxException { + void post_entityWithNonExistentOwner_4xx(TestInfo test) throws URISyntaxException { if (!supportsOwner) { return; } @@ -476,7 +476,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void post_entityAlreadyExists_409_conflict(TestInfo test) throws HttpResponseException, URISyntaxException { + void post_entityAlreadyExists_409_conflict(TestInfo test) throws HttpResponseException, URISyntaxException { Object create = createRequest(getEntityName(test), "", "", null); // Create first time using POST createEntity(create, adminAuthHeaders()); @@ -488,14 +488,14 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { // Common entity tests for PUT operations /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @Test - public void put_entityCreate_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityCreate_200(TestInfo test) throws IOException, URISyntaxException { // Create a new entity with PUT Object request = createRequest(getEntityName(test), "description", "displayName", null); updateAndCheckEntity(request, CREATED, adminAuthHeaders(), UpdateType.CREATED, null); } @Test - public void put_entityUpdateWithNoChange_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityUpdateWithNoChange_200(TestInfo test) throws IOException, URISyntaxException { // Create a chart with POST Object request = createRequest(getEntityName(test), "description", "display", USER_OWNER1); T entity = createAndCheckEntity(request, adminAuthHeaders()); @@ -508,7 +508,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_entityCreate_as_owner_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityCreate_as_owner_200(TestInfo test) throws IOException, URISyntaxException { if (!supportsOwner) { return; // Entity doesn't support ownership } @@ -526,7 +526,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_entityUpdateOwner_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityUpdateOwner_200(TestInfo test) throws IOException, URISyntaxException { if (!supportsOwner) { return; // Entity doesn't support ownership } @@ -569,7 +569,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_entityNullDescriptionUpdate_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityNullDescriptionUpdate_200(TestInfo test) throws IOException, URISyntaxException { // Create entity with null description Object request = createRequest(getEntityName(test), null, "displayName", null); T entity = createAndCheckEntity(request, adminAuthHeaders()); @@ -584,7 +584,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_entityEmptyDescriptionUpdate_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityEmptyDescriptionUpdate_200(TestInfo test) throws IOException, URISyntaxException { // Create entity with empty description Object request = createRequest(getEntityName(test), "", "displayName", null); T entity = createAndCheckEntity(request, adminAuthHeaders()); @@ -600,7 +600,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_entityNonEmptyDescriptionUpdate_200(TestInfo test) throws IOException, URISyntaxException { + void put_entityNonEmptyDescriptionUpdate_200(TestInfo test) throws IOException, URISyntaxException { // Create entity with non-empty description Object request = createRequest(getEntityName(test), "description", "displayName", null); T entity = createAndCheckEntity(request, adminAuthHeaders()); @@ -616,7 +616,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_addDeleteFollower_200(TestInfo test) throws IOException, URISyntaxException { + void put_addDeleteFollower_200(TestInfo test) throws IOException, URISyntaxException { if (!supportsFollowers) { return; // Entity does not support following } @@ -643,7 +643,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { } @Test - public void put_addDeleteInvalidFollower_200(TestInfo test) throws IOException, URISyntaxException { + void put_addDeleteInvalidFollower_200(TestInfo test) throws IOException, URISyntaxException { if (!supportsFollowers) { return; // Entity does not support following } @@ -670,7 +670,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { // Common entity tests for PATCH operations /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @Test - public void patch_entityAttributes_200_ok(TestInfo test) throws IOException, URISyntaxException { + void patch_entityAttributes_200_ok(TestInfo test) throws IOException, URISyntaxException { if (!supportsPatch) { return; } @@ -772,7 +772,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { // Common entity tests for DELETE operations /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @Test - public void delete_nonExistentEntity_404() { + void delete_nonExistentEntity_404() { HttpResponseException exception = assertThrows(HttpResponseException.class, () -> deleteEntity(NON_EXISTENT_ENTITY, adminAuthHeaders())); assertResponse(exception, NOT_FOUND, entityNotFound(entityName, NON_EXISTENT_ENTITY)); @@ -782,7 +782,7 @@ public abstract class EntityResourceTest extends CatalogApplicationTest { // Other tests /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @Test - public void testInvalidEntityList() { + void testInvalidEntityList() { // Invalid entityCreated list HttpResponseException exception = assertThrows( diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/charts/ChartResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/charts/ChartResourceTest.java index 6c0d8f1a807..2f9f8a4d0f2 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/charts/ChartResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/charts/ChartResourceTest.java @@ -77,7 +77,7 @@ public class ChartResourceTest extends EntityResourceTest { } @Test - public void post_validCharts_as_admin_200_OK(TestInfo test) throws IOException { + void post_validCharts_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateChart create = create(test) @@ -92,17 +92,17 @@ public class ChartResourceTest extends EntityResourceTest { } @Test - public void post_chartWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_chartWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_chartWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_chartWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1).withDisplayName("chart1"), adminAuthHeaders()); } @Test - public void post_chart_as_non_admin_401(TestInfo test) { + void post_chart_as_non_admin_401(TestInfo test) { CreateChart create = create(test); assertResponse( () -> createEntity(create, authHeaders("test@open-metadata.org")), @@ -111,7 +111,7 @@ public class ChartResourceTest extends EntityResourceTest { } @Test - public void post_chartWithoutRequiredFields_4xx(TestInfo test) { + void post_chartWithoutRequiredFields_4xx(TestInfo test) { // Service is required field assertResponse( () -> createEntity(create(test).withService(null), adminAuthHeaders()), @@ -120,7 +120,7 @@ public class ChartResourceTest extends EntityResourceTest { } @Test - public void post_chartWithDifferentService_200_ok(TestInfo test) throws IOException { + void post_chartWithDifferentService_200_ok(TestInfo test) throws IOException { EntityReference[] differentServices = {SUPERSET_REFERENCE, LOOKER_REFERENCE}; // Create chart for each service and test APIs @@ -142,13 +142,13 @@ public class ChartResourceTest extends EntityResourceTest { } @Test - public void delete_emptyChart_200_ok(TestInfo test) throws HttpResponseException { + void delete_emptyChart_200_ok(TestInfo test) throws HttpResponseException { Chart chart = createEntity(create(test), adminAuthHeaders()); deleteEntity(chart.getId(), adminAuthHeaders()); } @Test - public void delete_nonEmptyChart_4xx() { + void delete_nonEmptyChart_4xx() { // TODO } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/dashboards/DashboardResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/dashboards/DashboardResourceTest.java index 60b3dfea639..45e37f98e3b 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/dashboards/DashboardResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/dashboards/DashboardResourceTest.java @@ -113,7 +113,7 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void post_validDashboards_as_admin_200_OK(TestInfo test) throws IOException { + void post_validDashboards_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateDashboard create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -123,22 +123,22 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void post_DashboardWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_DashboardWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_DashboardWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_DashboardWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1).withDisplayName("Dashboard1"), adminAuthHeaders()); } @Test - public void post_DashboardWithCharts_200_ok(TestInfo test) throws IOException { + void post_DashboardWithCharts_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withCharts(CHART_REFERENCES), adminAuthHeaders()); } @Test - public void post_Dashboard_as_non_admin_401(TestInfo test) { + void post_Dashboard_as_non_admin_401(TestInfo test) { CreateDashboard create = create(test); assertResponse( () -> createDashboard(create, authHeaders("test@open-metadata.org")), @@ -147,14 +147,14 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void post_DashboardWithoutRequiredService_4xx(TestInfo test) { + void post_DashboardWithoutRequiredService_4xx(TestInfo test) { CreateDashboard create = create(test).withService(null); TestUtils.assertResponseContains( () -> createDashboard(create, adminAuthHeaders()), BAD_REQUEST, "service must not be null"); } @Test - public void post_DashboardWithInvalidService_4xx(TestInfo test) { + void post_DashboardWithInvalidService_4xx(TestInfo test) { CreateDashboard create = create(test).withService(SUPERSET_INVALID_SERVICE_REFERENCE); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createDashboard(create, adminAuthHeaders())); @@ -163,7 +163,7 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void post_DashboardWithDifferentService_200_ok(TestInfo test) throws IOException { + void post_DashboardWithDifferentService_200_ok(TestInfo test) throws IOException { EntityReference[] differentServices = {SUPERSET_REFERENCE, LOOKER_REFERENCE}; // Create Dashboard for each service and test APIs @@ -188,7 +188,7 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void put_DashboardChartsUpdate_200(TestInfo test) throws IOException { + void put_DashboardChartsUpdate_200(TestInfo test) throws IOException { CreateDashboard request = create(test).withService(SUPERSET_REFERENCE).withDescription(null); Dashboard dashboard = createAndCheckEntity(request, adminAuthHeaders()); @@ -206,7 +206,7 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void put_AddRemoveDashboardChartsUpdate_200(TestInfo test) throws IOException { + void put_AddRemoveDashboardChartsUpdate_200(TestInfo test) throws IOException { CreateDashboard request = create(test).withService(SUPERSET_REFERENCE).withDescription(null); Dashboard dashboard = createAndCheckEntity(request, adminAuthHeaders()); @@ -225,13 +225,13 @@ public class DashboardResourceTest extends EntityResourceTest { } @Test - public void delete_emptyDashboard_200_ok(TestInfo test) throws HttpResponseException { + void delete_emptyDashboard_200_ok(TestInfo test) throws HttpResponseException { Dashboard dashboard = createDashboard(create(test), adminAuthHeaders()); deleteEntity(dashboard.getId(), adminAuthHeaders()); } @Test - public void delete_nonEmptyDashboard_4xx() { + void delete_nonEmptyDashboard_4xx() { // TODO } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/DatabaseResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/DatabaseResourceTest.java index 56010f39604..e641f6dbed5 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/DatabaseResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/DatabaseResourceTest.java @@ -57,7 +57,7 @@ public class DatabaseResourceTest extends EntityResourceTest { } @Test - public void post_validDatabases_as_admin_200_OK(TestInfo test) throws IOException { + void post_validDatabases_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateDatabase create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -67,7 +67,7 @@ public class DatabaseResourceTest extends EntityResourceTest { } @Test - public void post_databaseFQN_as_admin_200_OK(TestInfo test) throws IOException { + void post_databaseFQN_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateDatabase create = create(test); create.setService(new EntityReference().withId(SNOWFLAKE_REFERENCE.getId()).withType("databaseService")); @@ -77,17 +77,17 @@ public class DatabaseResourceTest extends EntityResourceTest { } @Test - public void post_databaseWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_databaseWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_databaseWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_databaseWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1), adminAuthHeaders()); } @Test - public void post_database_as_non_admin_401(TestInfo test) { + void post_database_as_non_admin_401(TestInfo test) { CreateDatabase create = create(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createDatabase(create, authHeaders("test@open-metadata.org"))); @@ -95,7 +95,7 @@ public class DatabaseResourceTest extends EntityResourceTest { } @Test - public void post_databaseWithoutRequiredService_4xx(TestInfo test) { + void post_databaseWithoutRequiredService_4xx(TestInfo test) { CreateDatabase create = create(test).withService(null); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createDatabase(create, adminAuthHeaders())); @@ -103,7 +103,7 @@ public class DatabaseResourceTest extends EntityResourceTest { } @Test - public void post_databaseWithDifferentService_200_ok(TestInfo test) throws IOException { + void post_databaseWithDifferentService_200_ok(TestInfo test) throws IOException { EntityReference[] differentServices = { MYSQL_REFERENCE, REDSHIFT_REFERENCE, BIGQUERY_REFERENCE, SNOWFLAKE_REFERENCE }; @@ -127,13 +127,13 @@ public class DatabaseResourceTest extends EntityResourceTest { } @Test - public void delete_emptyDatabase_200_ok(TestInfo test) throws HttpResponseException { + void delete_emptyDatabase_200_ok(TestInfo test) throws HttpResponseException { Database database = createDatabase(create(test), adminAuthHeaders()); deleteEntity(database.getId(), adminAuthHeaders()); } @Test - public void delete_nonEmptyDatabase_4xx() { + void delete_nonEmptyDatabase_4xx() { // TODO } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/TableResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/TableResourceTest.java index ff55463f1a1..ef6c9a2234f 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/TableResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/databases/TableResourceTest.java @@ -135,7 +135,7 @@ public class TableResourceTest extends EntityResourceTest { } @Test - public void post_tableWithoutColumnDataLength_400(TestInfo test) { + void post_tableWithoutColumnDataLength_400(TestInfo test) { List columns = singletonList(getColumn("c1", BIGINT, null).withOrdinalPosition(1)); CreateTable create = create(test).withColumns(columns); @@ -152,7 +152,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void post_tableInvalidArrayColumn_400(TestInfo test) { + void post_tableInvalidArrayColumn_400(TestInfo test) { // No arrayDataType passed for array List columns = singletonList(getColumn("c1", ARRAY, "array", null)); CreateTable create = create(test).withColumns(columns); @@ -168,7 +168,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void post_duplicateColumnName_400(TestInfo test) { + void post_duplicateColumnName_400(TestInfo test) { // Duplicate column names c1 String repeatedColumnName = "c1"; List columns = @@ -181,7 +181,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void post_validTables_200_OK(TestInfo test) throws IOException { + void post_validTables_200_OK(TestInfo test) throws IOException { // Create table with different optional fields // Optional field description CreateTable create = create(test).withDescription("description"); @@ -212,7 +212,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void post_put_patch_complexColumnTypes(TestInfo test) throws IOException { + void post_put_patch_complexColumnTypes(TestInfo test) throws IOException { Column c1 = getColumn("c1", ARRAY, "array", USER_ADDRESS_TAG_LABEL).withArrayDataType(INT); Column c2_a = getColumn("a", INT, USER_ADDRESS_TAG_LABEL); Column c2_b = getColumn("b", CHAR, USER_ADDRESS_TAG_LABEL); @@ -315,17 +315,17 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void post_tableWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_tableWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_tableWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_tableWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1), adminAuthHeaders()); } @Test - public void post_tableWithInvalidDatabase_404(TestInfo test) { + void post_tableWithInvalidDatabase_404(TestInfo test) { CreateTable create = create(test).withDatabase(NON_EXISTENT_ENTITY); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createEntity(create, adminAuthHeaders())); @@ -333,7 +333,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void post_table_as_non_admin_401(TestInfo test) { + void post_table_as_non_admin_401(TestInfo test) { CreateTable create = create(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createEntity(create, authHeaders("test@open-metadata.org"))); @@ -341,7 +341,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableTableConstraintUpdate_200(TestInfo test) throws IOException { + void put_tableTableConstraintUpdate_200(TestInfo test) throws IOException { // Create table without table constraints CreateTable request = create(test).withOwner(USER_OWNER1).withDescription("description").withTableConstraints(null); Table table = createAndCheckEntity(request, adminAuthHeaders()); @@ -378,7 +378,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_columnConstraintUpdate_200(TestInfo test) throws IOException { + void put_columnConstraintUpdate_200(TestInfo test) throws IOException { List columns = new ArrayList<>(); columns.add(getColumn("c1", INT, null).withConstraint(ColumnConstraint.NULL)); columns.add(getColumn("c2", INT, null).withConstraint(ColumnConstraint.UNIQUE)); @@ -422,7 +422,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_updateColumns_200(TestInfo test) throws IOException { + void put_updateColumns_200(TestInfo test) throws IOException { int tagCategoryUsageCount = getTagCategoryUsageCount("user", userAuthHeaders()); int addressTagUsageCount = getTagUsageCount(USER_ADDRESS_TAG_LABEL.getTagFQN(), userAuthHeaders()); int bankTagUsageCount = getTagUsageCount(USER_BANK_ACCOUNT_TAG_LABEL.getTagFQN(), userAuthHeaders()); @@ -494,7 +494,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableJoins_200(TestInfo test) throws IOException, ParseException { + void put_tableJoins_200(TestInfo test) throws IOException, ParseException { Table table1 = createAndCheckEntity(create(test, 1), adminAuthHeaders()); Table table2 = createAndCheckEntity(create(test, 2), adminAuthHeaders()); Table table3 = createAndCheckEntity(create(test, 3), adminAuthHeaders()); @@ -616,7 +616,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableJoinsInvalidColumnName_4xx(TestInfo test) throws IOException, ParseException { + void put_tableJoinsInvalidColumnName_4xx(TestInfo test) throws IOException, ParseException { Table table1 = createAndCheckEntity(create(test, 1), adminAuthHeaders()); Table table2 = createAndCheckEntity(create(test, 2), adminAuthHeaders()); @@ -672,7 +672,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableSampleData_200(TestInfo test) throws IOException { + void put_tableSampleData_200(TestInfo test) throws IOException { Table table = createAndCheckEntity(create(test), adminAuthHeaders()); List columns = Arrays.asList("c1", "c2", "c3"); @@ -692,7 +692,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableInvalidSampleData_4xx(TestInfo test) throws IOException { + void put_tableInvalidSampleData_4xx(TestInfo test) throws IOException { Table table = createAndCheckEntity(create(test), adminAuthHeaders()); TableData tableData = new TableData(); @@ -722,7 +722,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_viewDefinition_200(TestInfo test) throws IOException { + void put_viewDefinition_200(TestInfo test) throws IOException { CreateTable createTable = create(test); createTable.setTableType(TableType.View); String query = @@ -740,7 +740,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_viewDefinition_invalid_table_4xx(TestInfo test) { + void put_viewDefinition_invalid_table_4xx(TestInfo test) { CreateTable createTable = create(test); createTable.setTableType(TableType.Regular); String query = @@ -760,7 +760,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableProfile_200(TestInfo test) throws IOException { + void put_tableProfile_200(TestInfo test) throws IOException { Table table = createAndCheckEntity(create(test), adminAuthHeaders()); ColumnProfile c1Profile = new ColumnProfile().withName("c1").withMax("100.0").withMin("10.0").withUniqueCount(100.0); @@ -811,7 +811,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableInvalidTableProfileData_4xx(TestInfo test) throws IOException { + void put_tableInvalidTableProfileData_4xx(TestInfo test) throws IOException { Table table = createAndCheckEntity(create(test), adminAuthHeaders()); ColumnProfile c1Profile = new ColumnProfile().withName("c1").withMax("100").withMin("10.0").withUniqueCount(100.0); @@ -832,7 +832,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableQueries_200(TestInfo test) throws IOException { + void put_tableQueries_200(TestInfo test) throws IOException { Table table = createAndCheckEntity(create(test), adminAuthHeaders()); SQLQuery query = new SQLQuery().withQuery("select * from test;").withQueryDate("2021-09-08").withDuration(600.0); Table putResponse = putTableQueriesData(table.getId(), query, adminAuthHeaders()); @@ -876,7 +876,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_tableDataModel(TestInfo test) throws IOException { + void put_tableDataModel(TestInfo test) throws IOException { List columns = Arrays.asList( getColumn("c1", BIGINT, USER_ADDRESS_TAG_LABEL).withDescription(null), @@ -929,7 +929,7 @@ public class TableResourceTest extends EntityResourceTest
{ @Test @Order(1) // Run this test first as other tables created in other tests will interfere with listing - public void get_tableListWithDifferentFields_200_OK(TestInfo test) throws IOException { + void get_tableListWithDifferentFields_200_OK(TestInfo test) throws IOException { CreateTable create = create(test, 1) .withDescription("description") @@ -1018,13 +1018,13 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void delete_table_200_ok(TestInfo test) throws HttpResponseException { + void delete_table_200_ok(TestInfo test) throws HttpResponseException { Table table = createEntity(create(test), adminAuthHeaders()); deleteEntity(table.getId(), adminAuthHeaders()); } @Test - public void delete_table_as_non_admin_401(TestInfo test) throws HttpResponseException { + void delete_table_as_non_admin_401(TestInfo test) throws HttpResponseException { Table table = createEntity(create(test), adminAuthHeaders()); HttpResponseException exception = assertThrows( @@ -1037,7 +1037,7 @@ public class TableResourceTest extends EntityResourceTest
{ * description, owner, and tags */ @Test - public void patch_tableAttributes_200_ok(TestInfo test) throws IOException { + void patch_tableAttributes_200_ok(TestInfo test) throws IOException { // Create table without tableType, and tableConstraints Table table = createEntity(create(test).withTableConstraints(null), adminAuthHeaders()); @@ -1093,7 +1093,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void patch_tableColumns_200_ok(TestInfo test) throws IOException { + void patch_tableColumns_200_ok(TestInfo test) throws IOException { // Create table with the following columns List columns = new ArrayList<>(); columns.add(getColumn("c1", INT, USER_ADDRESS_TAG_LABEL).withDescription(null)); @@ -1146,7 +1146,7 @@ public class TableResourceTest extends EntityResourceTest
{ } @Test - public void put_addDeleteLocation_200(TestInfo test) throws IOException { + void put_addDeleteLocation_200(TestInfo test) throws IOException { Table table = createAndCheckEntity(create(test), adminAuthHeaders()); // Add location to the table diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/events/WebhookResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/events/WebhookResourceTest.java index 253f1f8a1ed..ef33b1a1ef8 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/events/WebhookResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/events/WebhookResourceTest.java @@ -66,7 +66,7 @@ public class WebhookResourceTest extends EntityResourceTest { } @Test - public void post_webhookEnabledStateChange(TestInfo test) + void post_webhookEnabledStateChange(TestInfo test) throws URISyntaxException, IOException, InterruptedException { // // Create webhook in disabled state. It will not start webhook publisher @@ -140,7 +140,7 @@ public class WebhookResourceTest extends EntityResourceTest { } @Test - public void put_updateEndpointURL(TestInfo test) throws URISyntaxException, IOException, InterruptedException { + void put_updateEndpointURL(TestInfo test) throws URISyntaxException, IOException, InterruptedException { CreateWebhook create = createRequest("counter", "", "", null).withEnabled(true).withEndpoint(URI.create("http://invalidUnknowHost")); Webhook webhook = createAndCheckEntity(create, adminAuthHeaders()); @@ -295,7 +295,7 @@ public class WebhookResourceTest extends EntityResourceTest { } @Test - public void testDifferentTypesOfWebhooks() throws IOException, InterruptedException, URISyntaxException { + void testDifferentTypesOfWebhooks() throws IOException, InterruptedException, URISyntaxException { String baseUri = "http://localhost:" + APP.getLocalPort() + "/api/v1/test/webhook"; // Create multiple webhooks each with different type of response to callback diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/FeedResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/FeedResourceTest.java index 2fa972e4b20..5971b875905 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/FeedResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/FeedResourceTest.java @@ -81,7 +81,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_feedWithoutAbout_4xx() { + void post_feedWithoutAbout_4xx() { // Create thread without addressed to entity in the request CreateThread create = create().withFrom(USER.getId()).withAbout(null); HttpResponseException exception = @@ -90,7 +90,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_feedWithInvalidAbout_4xx() { + void post_feedWithInvalidAbout_4xx() { // Create thread without addressed to entity in the request CreateThread create = create().withFrom(USER.getId()).withAbout("<>"); // Invalid EntityLink Map authHeaders = authHeaders(USER.getEmail()); @@ -112,7 +112,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_feedWithoutMessage_4xx() { + void post_feedWithoutMessage_4xx() { // Create thread without message field in the request CreateThread create = create().withFrom(USER.getId()).withMessage(null); HttpResponseException exception = @@ -121,7 +121,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_feedWithoutFrom_4xx() { + void post_feedWithoutFrom_4xx() { // Create thread without from field in the request CreateThread create = create().withFrom(null); HttpResponseException exception = @@ -130,7 +130,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_feedWithNonExistentFrom_404() { + void post_feedWithNonExistentFrom_404() { // Create thread with non-existent from CreateThread create = create().withFrom(TestUtils.NON_EXISTENT_ENTITY); HttpResponseException exception = @@ -139,7 +139,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_feedWithNonExistentAbout_404() { + void post_feedWithNonExistentAbout_404() { // Create thread with non-existent addressed To entity CreateThread create = create().withAbout("<#E/table/invalidTableName>"); HttpResponseException exception = @@ -148,7 +148,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_validThreadAndList_200(TestInfo test) throws HttpResponseException { + void post_validThreadAndList_200(TestInfo test) throws HttpResponseException { int totalThreadCount = listThreads(null, adminAuthHeaders()).getData().size(); int userThreadCount = listThreads(USER_LINK, adminAuthHeaders()).getData().size(); int teamThreadCount = listThreads(TEAM_LINK, adminAuthHeaders()).getData().size(); @@ -173,7 +173,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_addPostWithoutMessage_4xx() { + void post_addPostWithoutMessage_4xx() { // Add post to a thread without message field Post post = createPost().withMessage(null); HttpResponseException exception = @@ -182,7 +182,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_addPostWithoutFrom_4xx() { + void post_addPostWithoutFrom_4xx() { // Add post to a thread without from field Post post = createPost().withFrom(null); HttpResponseException exception = @@ -191,7 +191,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_addPostWithNonExistentFrom_404() { + void post_addPostWithNonExistentFrom_404() { // Add post to a thread with non-existent from user Post post = createPost().withFrom(TestUtils.NON_EXISTENT_ENTITY); HttpResponseException exception = @@ -200,7 +200,7 @@ public class FeedResourceTest extends CatalogApplicationTest { } @Test - public void post_validAddPost_200() throws HttpResponseException { + void post_validAddPost_200() throws HttpResponseException { Map authHeaders = authHeaders(USER.getEmail()); Thread thread = createAndCheck(create(), authHeaders); // Add 10 posts and validate diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/MessageParserTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/MessageParserTest.java index c911f7d7963..0dfed3f1bc1 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/MessageParserTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/feeds/MessageParserTest.java @@ -21,7 +21,7 @@ import org.openmetadata.catalog.resources.feeds.MessageParser.EntityLink; public class MessageParserTest { @Test - public void parseMessage() { + void parseMessage() { String s = "abcd " + // Text in angled brackets that are not entity links diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/lineage/LineageResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/lineage/LineageResourceTest.java index b5797d174cc..68ffb4b5456 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/lineage/LineageResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/lineage/LineageResourceTest.java @@ -62,7 +62,7 @@ public class LineageResourceTest extends CatalogApplicationTest { } @Test - public void put_addLineageForInvalidEntities() throws HttpResponseException { + void put_addLineageForInvalidEntities() throws HttpResponseException { // Add lineage table4-->table5 addEdge(TABLES.get(4), TABLES.get(5)); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/locations/LocationResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/locations/LocationResourceTest.java index 9beb6cbe91e..f1cc55dddb5 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/locations/LocationResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/locations/LocationResourceTest.java @@ -124,7 +124,7 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void get_locationListWithPrefix_2xx(TestInfo test) throws HttpResponseException { + void get_locationListWithPrefix_2xx(TestInfo test) throws HttpResponseException { // Create some nested locations. List paths = Arrays.asList("/" + test.getDisplayName(), "/dwh", "/catalog", "/schema", "/table"); String locationName = @@ -155,7 +155,7 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void post_validLocations_as_admin_200_OK(TestInfo test) throws IOException { + void post_validLocations_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateLocation create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -165,17 +165,17 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void post_locationWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_locationWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_locationWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_locationWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1), adminAuthHeaders()); } @Test - public void post_location_as_non_admin_401(TestInfo test) { + void post_location_as_non_admin_401(TestInfo test) { CreateLocation create = create(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createLocation(create, authHeaders("test@open-metadata.org"))); @@ -183,13 +183,13 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void delete_location_200_ok(TestInfo test) throws HttpResponseException { + void delete_location_200_ok(TestInfo test) throws HttpResponseException { Location location = createLocation(create(test), adminAuthHeaders()); deleteEntity(location.getId(), adminAuthHeaders()); } @Test - public void delete_location_as_non_admin_401(TestInfo test) throws HttpResponseException { + void delete_location_as_non_admin_401(TestInfo test) throws HttpResponseException { Location location = createLocation(create(test), adminAuthHeaders()); HttpResponseException exception = assertThrows( @@ -198,7 +198,7 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void post_locationWithoutRequiredFields_4xx(TestInfo test) { + void post_locationWithoutRequiredFields_4xx(TestInfo test) { HttpResponseException exception = assertThrows( HttpResponseException.class, () -> createLocation(create(test).withName(null), adminAuthHeaders())); @@ -212,7 +212,7 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void post_locationWithDifferentService_200_ok(TestInfo test) throws IOException { + void post_locationWithDifferentService_200_ok(TestInfo test) throws IOException { EntityReference[] differentServices = {GCP_STORAGE_SERVICE_REFERENCE, AWS_STORAGE_SERVICE_REFERENCE}; // Create location for each service and test APIs @@ -234,7 +234,7 @@ public class LocationResourceTest extends EntityResourceTest { } @Test - public void put_locationNonEmptyDescriptionUpdate_200(TestInfo test) throws IOException { + void put_locationNonEmptyDescriptionUpdate_200(TestInfo test) throws IOException { CreateLocation request = create(test).withService(AWS_STORAGE_SERVICE_REFERENCE).withDescription("description"); createAndCheckEntity(request, adminAuthHeaders()); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/mlmodels/MlModelResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/mlmodels/MlModelResourceTest.java index 5ddfa33e280..939b14db671 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/mlmodels/MlModelResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/mlmodels/MlModelResourceTest.java @@ -157,7 +157,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void post_validMlModels_as_admin_200_OK(TestInfo test) throws IOException { + void post_validMlModels_as_admin_200_OK(TestInfo test) throws IOException { // Create valid model CreateMlModel create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -167,41 +167,41 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void post_MlModelWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_MlModelWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_MlModelWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_MlModelWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1).withDisplayName("Model1"), adminAuthHeaders()); } @Test - public void post_MlModelWithoutFeatures_200_ok(TestInfo test) throws IOException { + void post_MlModelWithoutFeatures_200_ok(TestInfo test) throws IOException { CreateMlModel create = new CreateMlModel().withName(getEntityName(test, 0)).withAlgorithm(ALGORITHM); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_MlModelWithDashboard_200_ok(TestInfo test) throws IOException { + void post_MlModelWithDashboard_200_ok(TestInfo test) throws IOException { CreateMlModel create = create(test).withDashboard(DASHBOARD_REFERENCE); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_MlModelWitMlStore_200_ok(TestInfo test) throws IOException { + void post_MlModelWitMlStore_200_ok(TestInfo test) throws IOException { CreateMlModel create = create(test).withMlStore(ML_STORE); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_MlModelWitServer_200_ok(TestInfo test) throws IOException { + void post_MlModelWitServer_200_ok(TestInfo test) throws IOException { CreateMlModel create = create(test).withServer(SERVER); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_MlModel_as_non_admin_401(TestInfo test) { + void post_MlModel_as_non_admin_401(TestInfo test) { CreateMlModel create = create(test); assertResponse( () -> createMlModel(create, authHeaders("test@open-metadata.org")), @@ -210,7 +210,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelUpdateWithNoChange_200(TestInfo test) throws IOException { + void put_MlModelUpdateWithNoChange_200(TestInfo test) throws IOException { // Create a Model with POST CreateMlModel request = create(test).withOwner(USER_OWNER1); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); @@ -221,7 +221,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelUpdateAlgorithm_200(TestInfo test) throws IOException { + void put_MlModelUpdateAlgorithm_200(TestInfo test) throws IOException { CreateMlModel request = create(test); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -233,7 +233,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelAddDashboard_200(TestInfo test) throws IOException { + void put_MlModelAddDashboard_200(TestInfo test) throws IOException { CreateMlModel request = create(test); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -244,7 +244,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelAddInvalidDashboard_200(TestInfo test) { + void put_MlModelAddInvalidDashboard_200(TestInfo test) { CreateMlModel request = create(test); // Create a made up dashboard reference by picking up a random UUID EntityReference dashboard = new EntityReference().withId(USER1.getId()).withType("dashboard"); @@ -256,7 +256,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelAddServer_200(TestInfo test) throws IOException { + void put_MlModelAddServer_200(TestInfo test) throws IOException { CreateMlModel request = create(test); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -266,7 +266,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelUpdateServer_200(TestInfo test) throws IOException { + void put_MlModelUpdateServer_200(TestInfo test) throws IOException { CreateMlModel request = create(test).withServer(SERVER); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -278,7 +278,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelAddMlStore_200(TestInfo test) throws IOException { + void put_MlModelAddMlStore_200(TestInfo test) throws IOException { CreateMlModel request = create(test); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -288,7 +288,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelAddMlFeatures_200(TestInfo test) throws IOException { + void put_MlModelAddMlFeatures_200(TestInfo test) throws IOException { CreateMlModel request = new CreateMlModel().withName(getEntityName(test)).withAlgorithm(ALGORITHM); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -298,7 +298,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelUpdateMlFeatures_200(TestInfo test) throws IOException { + void put_MlModelUpdateMlFeatures_200(TestInfo test) throws IOException { CreateMlModel request = create(test); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); @@ -316,7 +316,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelWithDataSource_200(TestInfo test) throws IOException { + void put_MlModelWithDataSource_200(TestInfo test) throws IOException { CreateMlModel request = create(test); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); @@ -340,7 +340,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelWithInvalidDataSource_400(TestInfo test) throws IOException { + void put_MlModelWithInvalidDataSource_400(TestInfo test) throws IOException { CreateMlModel request = create(test); // Create a made up table reference by picking up a random UUID @@ -365,7 +365,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void put_MlModelAddMlHyperParams_200(TestInfo test) throws IOException { + void put_MlModelAddMlHyperParams_200(TestInfo test) throws IOException { CreateMlModel request = new CreateMlModel().withName(getEntityName(test)).withAlgorithm(ALGORITHM); MlModel model = createAndCheckEntity(request, adminAuthHeaders()); ChangeDescription change = getChangeDescription(model.getVersion()); @@ -376,7 +376,7 @@ public class MlModelResourceTest extends EntityResourceTest { } @Test - public void delete_MlModel_200_ok(TestInfo test) throws HttpResponseException { + void delete_MlModel_200_ok(TestInfo test) throws HttpResponseException { MlModel model = createMlModel(create(test), adminAuthHeaders()); deleteEntity(model.getId(), adminAuthHeaders()); } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/operations/IngestionResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/operations/IngestionResourceTest.java index 8df291ba2dc..0db9d5c2dbe 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/operations/IngestionResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/operations/IngestionResourceTest.java @@ -132,7 +132,7 @@ public class IngestionResourceTest extends EntityOperationsResourceTest createEntity(create, authHeaders("test@open-metadata.org"))); @@ -165,7 +165,7 @@ public class IngestionResourceTest extends EntityOperationsResourceTest createEntity(create, adminAuthHeaders())); @@ -173,7 +173,7 @@ public class IngestionResourceTest extends EntityOperationsResourceTest createEntity(create, adminAuthHeaders())); @@ -181,7 +181,7 @@ public class IngestionResourceTest extends EntityOperationsResourceTest { } @Test - public void post_validPipelines_as_admin_200_OK(TestInfo test) throws IOException { + void post_validPipelines_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreatePipeline create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -156,22 +156,22 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void post_PipelineWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_PipelineWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_PipelineWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_PipelineWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1).withDisplayName("Pipeline1"), adminAuthHeaders()); } @Test - public void post_PipelineWithTasks_200_ok(TestInfo test) throws IOException { + void post_PipelineWithTasks_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withTasks(TASKS), adminAuthHeaders()); } @Test - public void post_Pipeline_as_non_admin_401(TestInfo test) { + void post_Pipeline_as_non_admin_401(TestInfo test) { CreatePipeline create = create(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createPipeline(create, authHeaders("test@open-metadata.org"))); @@ -179,7 +179,7 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void post_PipelineWithoutRequiredService_4xx(TestInfo test) { + void post_PipelineWithoutRequiredService_4xx(TestInfo test) { CreatePipeline create = create(test).withService(null); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createPipeline(create, adminAuthHeaders())); @@ -187,7 +187,7 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void post_PipelineWithDifferentService_200_ok(TestInfo test) throws IOException { + void post_PipelineWithDifferentService_200_ok(TestInfo test) throws IOException { EntityReference[] differentServices = {AIRFLOW_REFERENCE, PREFECT_REFERENCE}; // Create Pipeline for each service and test APIs @@ -209,7 +209,7 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void put_PipelineUrlUpdate_200(TestInfo test) throws IOException, URISyntaxException { + void put_PipelineUrlUpdate_200(TestInfo test) throws IOException, URISyntaxException { CreatePipeline request = create(test) .withService(new EntityReference().withId(AIRFLOW_REFERENCE.getId()).withType("pipelineService")) @@ -233,7 +233,7 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void put_PipelineTasksUpdate_200(TestInfo test) throws IOException { + void put_PipelineTasksUpdate_200(TestInfo test) throws IOException { CreatePipeline request = create(test).withService(AIRFLOW_REFERENCE).withDescription(null); Pipeline pipeline = createAndCheckEntity(request, adminAuthHeaders()); @@ -246,7 +246,7 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void put_AddRemovePipelineTasksUpdate_200(TestInfo test) throws IOException, URISyntaxException { + void put_AddRemovePipelineTasksUpdate_200(TestInfo test) throws IOException, URISyntaxException { CreatePipeline request = create(test) .withService(AIRFLOW_REFERENCE) @@ -287,13 +287,13 @@ public class PipelineResourceTest extends EntityResourceTest { } @Test - public void delete_emptyPipeline_200_ok(TestInfo test) throws HttpResponseException { + void delete_emptyPipeline_200_ok(TestInfo test) throws HttpResponseException { Pipeline pipeline = createPipeline(create(test), adminAuthHeaders()); deleteEntity(pipeline.getId(), adminAuthHeaders()); } @Test - public void delete_nonEmptyPipeline_4xx() { + void delete_nonEmptyPipeline_4xx() { // TODO } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/policies/PolicyResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/policies/PolicyResourceTest.java index 4e864e2d743..270dba754da 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/policies/PolicyResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/policies/PolicyResourceTest.java @@ -128,7 +128,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void post_PolicyWithoutPolicyType_400_badRequest(TestInfo test) { + void post_PolicyWithoutPolicyType_400_badRequest(TestInfo test) { CreatePolicy create = create(test).withPolicyType(null); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createPolicy(create, adminAuthHeaders())); @@ -136,7 +136,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void post_validPolicies_as_admin_200_OK(TestInfo test) throws IOException { + void post_validPolicies_as_admin_200_OK(TestInfo test) throws IOException { // Create valid policy CreatePolicy create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -145,25 +145,25 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void post_PolicyWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_PolicyWithUserOwner_200_ok(TestInfo test) throws IOException { CreatePolicy create = create(test).withOwner(USER_OWNER1); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_PolicyWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_PolicyWithTeamOwner_200_ok(TestInfo test) throws IOException { CreatePolicy create = create(test).withOwner(TEAM_OWNER1); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_AccessControlPolicyWithValidRules_200_ok(TestInfo test) throws IOException { + void post_AccessControlPolicyWithValidRules_200_ok(TestInfo test) throws IOException { CreatePolicy create = createAccessControlPolicyWithValidRules(test); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_AccessControlPolicyWithInvalidRules_400_error(TestInfo test) throws IOException { + void post_AccessControlPolicyWithInvalidRules_400_error(TestInfo test) throws IOException { CreatePolicy create = createAccessControlPolicyWithInvalidRules(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createEntity(create, adminAuthHeaders())); @@ -175,7 +175,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void post_Policy_as_non_admin_401(TestInfo test) { + void post_Policy_as_non_admin_401(TestInfo test) { CreatePolicy create = create(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createPolicy(create, authHeaders("test@open-metadata.org"))); @@ -183,7 +183,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void get_PolicyListWithInvalidLimitOffset_4xx() { + void get_PolicyListWithInvalidLimitOffset_4xx() { // Limit must be >= 1 and <= 1000,000 HttpResponseException exception = assertThrows(HttpResponseException.class, () -> listPolicies(null, -1, null, null, adminAuthHeaders())); @@ -198,7 +198,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void get_PolicyListWithInvalidPaginationCursors_4xx() { + void get_PolicyListWithInvalidPaginationCursors_4xx() { // Passing both before and after cursors is invalid HttpResponseException exception = assertThrows(HttpResponseException.class, () -> listPolicies(null, 1, "", "", adminAuthHeaders())); @@ -206,7 +206,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void get_PolicyListWithValidLimitOffset_4xx(TestInfo test) throws HttpResponseException { + void get_PolicyListWithValidLimitOffset_4xx(TestInfo test) throws HttpResponseException { // Create a large number of Policies int maxPolicies = 40; for (int i = 0; i < maxPolicies; i++) { @@ -267,7 +267,7 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void patch_PolicyAttributes_200_ok(TestInfo test) throws IOException { + void patch_PolicyAttributes_200_ok(TestInfo test) throws IOException { Policy policy = createAndCheckEntity(create(test), adminAuthHeaders()); URI uri = null; @@ -308,13 +308,13 @@ public class PolicyResourceTest extends EntityResourceTest { } @Test - public void delete_emptyPolicy_200_ok(TestInfo test) throws HttpResponseException { + void delete_emptyPolicy_200_ok(TestInfo test) throws HttpResponseException { Policy policy = createPolicy(create(test), adminAuthHeaders()); deleteEntity(policy.getId(), adminAuthHeaders()); } @Test - public void delete_nonEmptyPolicy_4xx() { + void delete_nonEmptyPolicy_4xx() { // TODO } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DashboardServiceResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DashboardServiceResourceTest.java index d35d0e1d263..95b12038104 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DashboardServiceResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DashboardServiceResourceTest.java @@ -62,7 +62,7 @@ public class DashboardServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test, 1).withDescription(null), authHeaders); @@ -86,7 +86,7 @@ public class DashboardServiceResourceTest extends EntityResourceTest authHeaders = authHeaders("test@open-metadata.org"); @@ -98,7 +98,7 @@ public class DashboardServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test).withDescription(null).withIngestionSchedule(null), authHeaders); @@ -216,7 +216,7 @@ public class DashboardServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); DashboardService dashboardService = createEntity(create(test), authHeaders); @@ -224,7 +224,7 @@ public class DashboardServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); DashboardService dashboardService = createEntity(create(test), authHeaders); HttpResponseException exception = @@ -235,7 +235,7 @@ public class DashboardServiceResourceTest extends EntityResourceTest getEntity(TestUtils.NON_EXISTENT_ENTITY, adminAuthHeaders())); TestUtils.assertResponse( diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DatabaseServiceResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DatabaseServiceResourceTest.java index e7a226bef18..080b79de99d 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DatabaseServiceResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/DatabaseServiceResourceTest.java @@ -60,7 +60,7 @@ public class DatabaseServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test, 1).withDescription(null), authHeaders); @@ -69,7 +69,7 @@ public class DatabaseServiceResourceTest extends EntityResourceTest authHeaders = authHeaders("test@open-metadata.org"); @@ -81,7 +81,7 @@ public class DatabaseServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test).withDescription(null).withIngestionSchedule(null), authHeaders); @@ -193,14 +193,14 @@ public class DatabaseServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); DatabaseService databaseService = createEntity(create(test), authHeaders); deleteEntity(databaseService.getId(), authHeaders); } @Test - public void delete_as_user_401(TestInfo test) throws HttpResponseException { + void delete_as_user_401(TestInfo test) throws HttpResponseException { Map authHeaders = adminAuthHeaders(); DatabaseService databaseService = createEntity(create(test), authHeaders); HttpResponseException exception = diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/MessagingServiceResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/MessagingServiceResourceTest.java index 5a6fef49def..c3523524257 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/MessagingServiceResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/MessagingServiceResourceTest.java @@ -75,7 +75,7 @@ public class MessagingServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test, 1).withDescription(null), authHeaders); @@ -99,7 +99,7 @@ public class MessagingServiceResourceTest extends EntityResourceTest authHeaders = authHeaders("test@open-metadata.org"); @@ -111,7 +111,7 @@ public class MessagingServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test).withDescription(null).withIngestionSchedule(null), authHeaders); @@ -243,14 +243,14 @@ public class MessagingServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); MessagingService messagingService = createEntity(create(test), authHeaders); deleteEntity(messagingService.getId(), authHeaders); } @Test - public void delete_as_user_401(TestInfo test) throws HttpResponseException { + void delete_as_user_401(TestInfo test) throws HttpResponseException { Map authHeaders = adminAuthHeaders(); MessagingService messagingService = createEntity(create(test), authHeaders); HttpResponseException exception = @@ -261,7 +261,7 @@ public class MessagingServiceResourceTest extends EntityResourceTest getEntity(TestUtils.NON_EXISTENT_ENTITY, adminAuthHeaders())); TestUtils.assertResponse( diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/PipelineServiceResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/PipelineServiceResourceTest.java index 8a6b8e30d5a..89f6a27e09b 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/PipelineServiceResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/PipelineServiceResourceTest.java @@ -73,7 +73,7 @@ public class PipelineServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test, 1).withDescription(null), authHeaders); @@ -97,7 +97,7 @@ public class PipelineServiceResourceTest extends EntityResourceTest authHeaders = authHeaders("test@open-metadata.org"); @@ -109,7 +109,7 @@ public class PipelineServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test).withDescription(null).withIngestionSchedule(null), authHeaders); @@ -223,14 +223,14 @@ public class PipelineServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); PipelineService pipelineService = createEntity(create(test), authHeaders); deleteEntity(pipelineService.getId(), authHeaders); } @Test - public void delete_as_user_401(TestInfo test) throws HttpResponseException { + void delete_as_user_401(TestInfo test) throws HttpResponseException { Map authHeaders = adminAuthHeaders(); PipelineService pipelineService = createEntity(create(test), authHeaders); HttpResponseException exception = @@ -241,7 +241,7 @@ public class PipelineServiceResourceTest extends EntityResourceTest getEntity(TestUtils.NON_EXISTENT_ENTITY, adminAuthHeaders())); TestUtils.assertResponse( diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/StorageServiceResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/StorageServiceResourceTest.java index e40a68c5559..7a2a9189c0b 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/StorageServiceResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/services/StorageServiceResourceTest.java @@ -56,7 +56,7 @@ public class StorageServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test, 1).withDescription(null), authHeaders); @@ -64,7 +64,7 @@ public class StorageServiceResourceTest extends EntityResourceTest authHeaders = authHeaders("test@open-metadata.org"); @@ -76,14 +76,14 @@ public class StorageServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); createAndCheckEntity(create(test).withDescription(null), authHeaders); @@ -98,14 +98,14 @@ public class StorageServiceResourceTest extends EntityResourceTest authHeaders = adminAuthHeaders(); StorageService storageService = createEntity(create(test), authHeaders); deleteEntity(storageService.getId(), authHeaders); } @Test - public void delete_as_user_401(TestInfo test) throws HttpResponseException { + void delete_as_user_401(TestInfo test) throws HttpResponseException { Map authHeaders = adminAuthHeaders(); StorageService storageService = createEntity(create(test), authHeaders); HttpResponseException exception = @@ -116,7 +116,7 @@ public class StorageServiceResourceTest extends EntityResourceTest getEntity(TestUtils.NON_EXISTENT_ENTITY, adminAuthHeaders())); TestUtils.assertResponse( diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/tags/TagResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/tags/TagResourceTest.java index 85444a508a3..7de18e1cc8d 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/tags/TagResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/tags/TagResourceTest.java @@ -61,7 +61,7 @@ public class TagResourceTest extends CatalogApplicationTest { @Test @Order(0) - public void list_categories_200() throws IOException { + void list_categories_200() throws IOException { // GET .../tags to list all tag categories CategoryList list = listCategories(); @@ -77,7 +77,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void get_category_200() throws HttpResponseException { + void get_category_200() throws HttpResponseException { // GET .../tags/{category} to get a category TagCategory category = getCategory("User", authHeaders("test@open-metadata.org")); assertEquals("User", category.getName()); @@ -85,7 +85,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void get_nonExistentCategory_404() { + void get_nonExistentCategory_404() { // GET .../tags/{nonExistentCategory} returns 404 String nonExistent = "nonExistent"; HttpResponseException exception = @@ -94,7 +94,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void get_validTag_200() throws HttpResponseException { + void get_validTag_200() throws HttpResponseException { // GET .../tags/{category}/{tag} returns requested tag Tag tag = getTag("User.Address", adminAuthHeaders()); String parentURI = BASE_URL + "/User"; @@ -102,7 +102,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void get_nonExistentTag_404() { + void get_nonExistentTag_404() { // GET .../tags/{category}/{nonExistent} returns 404 Not found String tagFQN = "User.NonExistent"; HttpResponseException exception = @@ -111,7 +111,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void post_alreadyExistingTagCategory_4xx() { + void post_alreadyExistingTagCategory_4xx() { // POST .../tags/{allReadyExistingCategory} returns 4xx CreateTagCategory create = new CreateTagCategory() @@ -124,7 +124,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void post_validTagCategory_as_admin_201(TestInfo test) throws HttpResponseException { + void post_validTagCategory_as_admin_201(TestInfo test) throws HttpResponseException { // POST .../tags/{newCategory} returns 201 String categoryName = test.getDisplayName().substring(0, 10); // Form a unique category name based on the test name CreateTagCategory create = @@ -137,7 +137,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void post_InvalidTagCategory_4xx(TestInfo test) { + void post_InvalidTagCategory_4xx(TestInfo test) { // POST .../tags/{newCategory} returns 201 String categoryName = test.getDisplayName().substring(0, 10); // Form a unique category name based on the test name @@ -164,7 +164,7 @@ public class TagResourceTest extends CatalogApplicationTest { @Order(1) @Test - public void post_validTags_200() throws HttpResponseException, JsonProcessingException { + void post_validTags_200() throws HttpResponseException, JsonProcessingException { // POST .../tags/{category}/{primaryTag} to create primary tag TagCategory category = getCategory("User", authHeaders("test@open-meatadata.org")); CreateTag create = new CreateTag().withName("PrimaryTag").withDescription("description"); @@ -180,7 +180,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void post_invalidTags_400() { + void post_invalidTags_400() { // Missing description in POST primary tag CreateTag create = new CreateTag().withName("noDescription").withDescription(null); HttpResponseException exception = @@ -206,7 +206,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void post_newTagsOnNonExistentParents_404() { + void post_newTagsOnNonExistentParents_404() { // POST .../tags/{nonExistent}/{primaryTag} where category does not exist String nonExistent = "nonExistent"; CreateTag create = new CreateTag().withName("primary").withDescription("description"); @@ -222,7 +222,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void put_tagCategory_200(TestInfo test) throws HttpResponseException { + void put_tagCategory_200(TestInfo test) throws HttpResponseException { // PUT .../tags/{user} update the user tags String newCategoryName = test.getDisplayName().substring(0, 10); CreateTagCategory create = @@ -238,7 +238,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void put_tagCategoryInvalidRequest_400(TestInfo test) { + void put_tagCategoryInvalidRequest_400(TestInfo test) { // Primary tag with missing description String newCategoryName = test.getDisplayName().substring(0, 10); CreateTagCategory create = @@ -257,7 +257,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void put_primaryTag_200() throws HttpResponseException, JsonProcessingException { + void put_primaryTag_200() throws HttpResponseException, JsonProcessingException { // PUT .../tags/{user}/{address} update the tag CreateTag create = new CreateTag().withName("AddressUpdated").withDescription("updatedDescription"); updatePrimaryTag("User", "Address", create, adminAuthHeaders()); @@ -268,7 +268,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void put_secondaryTag_200() throws HttpResponseException, JsonProcessingException { + void put_secondaryTag_200() throws HttpResponseException, JsonProcessingException { // PUT .../tags/{user}/{primaryTag}/{secondaryTag} update the tag CreateTag create = new CreateTag().withName("SecondaryTag1").withDescription("description"); updateSecondaryTag("User", "PrimaryTag", "SecondaryTag", create, adminAuthHeaders()); @@ -279,7 +279,7 @@ public class TagResourceTest extends CatalogApplicationTest { } @Test - public void put_tagInvalidRequest_404() { + void put_tagInvalidRequest_404() { // Primary tag with missing description CreateTag create = new CreateTag().withName("AddressUpdated").withDescription(null); HttpResponseException exception = diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/RoleResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/RoleResourceTest.java index 9cc545a59ce..1f55a58c66f 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/RoleResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/RoleResourceTest.java @@ -53,7 +53,7 @@ public class RoleResourceTest extends EntityResourceTest { } @Test - public void post_validRoles_as_admin_200_OK(TestInfo test) throws IOException { + void post_validRoles_as_admin_200_OK(TestInfo test) throws IOException { // Create role with different optional fields CreateRole create = create(test, 1); createAndCheckEntity(create, adminAuthHeaders()); @@ -69,7 +69,7 @@ public class RoleResourceTest extends EntityResourceTest { } @Test - public void post_validRoles_as_non_admin_401(TestInfo test) { + void post_validRoles_as_non_admin_401(TestInfo test) { // Create role with different optional fields Map authHeaders = authHeaders("test@open-metadata.org"); CreateRole create = create(test, 1); @@ -82,14 +82,14 @@ public class RoleResourceTest extends EntityResourceTest { * @see EntityResourceTest#put_addDeleteFollower_200 for tests related getting role with entities owned by the role */ @Test - public void delete_validRole_200_OK(TestInfo test) throws IOException { + void delete_validRole_200_OK(TestInfo test) throws IOException { CreateRole create = create(test); Role role = createAndCheckEntity(create, adminAuthHeaders()); deleteEntity(role.getId(), adminAuthHeaders()); } @Test - public void delete_validRole_as_non_admin_401(TestInfo test) throws IOException { + void delete_validRole_as_non_admin_401(TestInfo test) throws IOException { CreateRole create = create(test); Role role = createAndCheckEntity(create, adminAuthHeaders()); HttpResponseException exception = @@ -99,7 +99,7 @@ public class RoleResourceTest extends EntityResourceTest { } @Test - public void patch_roleDeletedDisallowed_400(TestInfo test) throws HttpResponseException, JsonProcessingException { + void patch_roleDeletedDisallowed_400(TestInfo test) throws HttpResponseException, JsonProcessingException { // Ensure role deleted attribute can't be changed using patch Role role = createRole(create(test), adminAuthHeaders()); String roleJson = JsonUtils.pojoToJson(role); @@ -110,7 +110,7 @@ public class RoleResourceTest extends EntityResourceTest { } @Test - public void patch_roleAttributes_as_non_admin_403(TestInfo test) + void patch_roleAttributes_as_non_admin_403(TestInfo test) throws HttpResponseException, JsonProcessingException { // Create table without any attributes Role role = createRole(create(test), adminAuthHeaders()); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/TeamResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/TeamResourceTest.java index 5e84aa061cd..861fa975d69 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/TeamResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/TeamResourceTest.java @@ -68,7 +68,7 @@ public class TeamResourceTest extends EntityResourceTest { } @Test - public void post_validTeams_as_admin_200_OK(TestInfo test) throws IOException { + void post_validTeams_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateTeam create = create(test, 1); createAndCheckEntity(create, adminAuthHeaders()); @@ -87,7 +87,7 @@ public class TeamResourceTest extends EntityResourceTest { } @Test - public void post_validTeams_as_non_admin_401(TestInfo test) { + void post_validTeams_as_non_admin_401(TestInfo test) { // Create team with different optional fields Map authHeaders = authHeaders("test@open-metadata.org"); CreateTeam create = create(test, 1); @@ -97,7 +97,7 @@ public class TeamResourceTest extends EntityResourceTest { } @Test - public void post_teamWithUsers_200_OK(TestInfo test) throws IOException { + void post_teamWithUsers_200_OK(TestInfo test) throws IOException { // Add team to user relationships while creating a team UserResourceTest userResourceTest = new UserResourceTest(); User user1 = createUser(userResourceTest.create(test, 1), authHeaders("test@open-metadata.org")); @@ -119,7 +119,7 @@ public class TeamResourceTest extends EntityResourceTest { } @Test - public void get_teamWithInvalidFields_400_BadRequest(TestInfo test) throws HttpResponseException { + void get_teamWithInvalidFields_400_BadRequest(TestInfo test) throws HttpResponseException { CreateTeam create = create(test); Team team = createTeam(create, adminAuthHeaders()); @@ -138,7 +138,7 @@ public class TeamResourceTest extends EntityResourceTest { * @see EntityResourceTest#put_addDeleteFollower_200 for tests related getting team with entities owned by the team */ @Test - public void delete_validTeam_200_OK(TestInfo test) throws IOException { + void delete_validTeam_200_OK(TestInfo test) throws IOException { UserResourceTest userResourceTest = new UserResourceTest(); User user1 = createUser(userResourceTest.create(test, 1), adminAuthHeaders()); List users = Collections.singletonList(user1.getId()); @@ -154,7 +154,7 @@ public class TeamResourceTest extends EntityResourceTest { } @Test - public void delete_validTeam_as_non_admin_401(TestInfo test) throws IOException { + void delete_validTeam_as_non_admin_401(TestInfo test) throws IOException { UserResourceTest userResourceTest = new UserResourceTest(); User user1 = createUser(userResourceTest.create(test, 1), authHeaders("test@open-metadata.org")); List users = Collections.singletonList(user1.getId()); @@ -167,7 +167,7 @@ public class TeamResourceTest extends EntityResourceTest { } @Test - public void patch_teamDeletedDisallowed_400(TestInfo test) throws HttpResponseException, JsonProcessingException { + void patch_teamDeletedDisallowed_400(TestInfo test) throws HttpResponseException, JsonProcessingException { // Ensure team deleted attribute can't be changed using patch Team team = createTeam(create(test), adminAuthHeaders()); String teamJson = JsonUtils.pojoToJson(team); @@ -229,7 +229,7 @@ public class TeamResourceTest extends EntityResourceTest { // } @Test - public void patch_teamAttributes_as_non_admin_403(TestInfo test) + void patch_teamAttributes_as_non_admin_403(TestInfo test) throws HttpResponseException, JsonProcessingException { // Create table without any attributes Team team = createTeam(create(test), adminAuthHeaders()); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/UserResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/UserResourceTest.java index 0246af432e4..352a236f65e 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/UserResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/teams/UserResourceTest.java @@ -86,7 +86,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void post_userWithoutEmail_400_badRequest(TestInfo test) { + void post_userWithoutEmail_400_badRequest(TestInfo test) { // Create user with mandatory email field null CreateUser create = create(test).withEmail(null); HttpResponseException exception = @@ -115,7 +115,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void post_validUser_200_ok(TestInfo test) throws IOException { + void post_validUser_200_ok(TestInfo test) throws IOException { // Create user with different optional fields CreateUser create = create(test, 1); createAndCheckEntity(create, adminAuthHeaders()); @@ -134,7 +134,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void put_validUser_200_ok(TestInfo test) throws IOException { + void put_validUser_200_ok(TestInfo test) throws IOException { // Create user with different optional fields CreateUser create = create(test, 1); User user = updateAndCheckEntity(create, CREATED, adminAuthHeaders(), UpdateType.CREATED, null); @@ -155,7 +155,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void post_validAdminUser_Non_Admin_401(TestInfo test) { + void post_validAdminUser_Non_Admin_401(TestInfo test) { CreateUser create = create(test, 6).withName("test").withDisplayName("displayName").withEmail("test@email.com").withIsAdmin(true); @@ -166,14 +166,14 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void post_validAdminUser_200_ok(TestInfo test) throws IOException { + void post_validAdminUser_200_ok(TestInfo test) throws IOException { CreateUser create = create(test, 6).withName("test1").withDisplayName("displayName").withEmail("test1@email.com").withIsAdmin(true); createAndCheckEntity(create, adminAuthHeaders()); } @Test - public void post_validUserWithTeams_200_ok(TestInfo test) throws IOException { + void post_validUserWithTeams_200_ok(TestInfo test) throws IOException { // Create user with different optional fields TeamResourceTest teamResourceTest = new TeamResourceTest(); Team team1 = createTeam(teamResourceTest.create(test, 1), adminAuthHeaders()); @@ -190,7 +190,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void post_validUserWithRoles_200_ok(TestInfo test) throws IOException { + void post_validUserWithRoles_200_ok(TestInfo test) throws IOException { // Create user with different optional fields RoleResourceTest roleResourceTest = new RoleResourceTest(); Role role1 = createRole(roleResourceTest.create(test, 1), adminAuthHeaders()); @@ -207,7 +207,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void get_listUsersWithTeams_200_ok(TestInfo test) throws IOException { + void get_listUsersWithTeams_200_ok(TestInfo test) throws IOException { TeamResourceTest teamResourceTest = new TeamResourceTest(); Team team1 = createTeam(teamResourceTest.create(test, 1), adminAuthHeaders()); Team team2 = createTeam(teamResourceTest.create(test, 2), adminAuthHeaders()); @@ -256,7 +256,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void get_userWithInvalidFields_400_BadRequest(TestInfo test) throws HttpResponseException { + void get_userWithInvalidFields_400_BadRequest(TestInfo test) throws HttpResponseException { User user = createUser(create(test), adminAuthHeaders()); // Empty query field .../users?fields= @@ -276,7 +276,7 @@ public class UserResourceTest extends EntityResourceTest { * @see TableResourceTest also tests GET user returns owns list */ @Test - public void patch_userNameChange_as_another_user_401(TestInfo test) + void patch_userNameChange_as_another_user_401(TestInfo test) throws HttpResponseException, JsonProcessingException { // Ensure username can't be changed using patch User user = @@ -291,7 +291,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void patch_makeAdmin_as_another_user_401(TestInfo test) throws HttpResponseException, JsonProcessingException { + void patch_makeAdmin_as_another_user_401(TestInfo test) throws HttpResponseException, JsonProcessingException { // Ensure username can't be changed using patch User user = createUser( @@ -305,7 +305,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void patch_userNameChange_as_same_user_200_ok(TestInfo test) + void patch_userNameChange_as_same_user_200_ok(TestInfo test) throws HttpResponseException, JsonProcessingException { // Ensure username can't be changed using patch User user = @@ -320,7 +320,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void patch_userDeletedDisallowed_400(TestInfo test) throws HttpResponseException, JsonProcessingException { + void patch_userDeletedDisallowed_400(TestInfo test) throws HttpResponseException, JsonProcessingException { // Ensure user deleted attributed can't be changed using patch User user = createUser(create(test), adminAuthHeaders()); String userJson = JsonUtils.pojoToJson(user); @@ -331,7 +331,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void patch_userAttributes_as_admin_200_ok(TestInfo test) throws IOException { + void patch_userAttributes_as_admin_200_ok(TestInfo test) throws IOException { // Create user without any attributes - ***Note*** isAdmin by default is false. User user = createUser(create(test), adminAuthHeaders()); assertListNull(user.getDisplayName(), user.getIsBot(), user.getProfile(), user.getTimezone()); @@ -444,7 +444,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void delete_validUser_as_non_admin_401(TestInfo test) throws HttpResponseException { + void delete_validUser_as_non_admin_401(TestInfo test) throws HttpResponseException { CreateUser create = create(test).withName("test3").withEmail("test3@email.com"); User user = createUser(create, authHeaders("test3")); @@ -454,7 +454,7 @@ public class UserResourceTest extends EntityResourceTest { } @Test - public void delete_validUser_as_admin_200(TestInfo test) throws IOException { + void delete_validUser_as_admin_200(TestInfo test) throws IOException { TeamResourceTest teamResourceTest = new TeamResourceTest(); Team team = createTeam(teamResourceTest.create(test), adminAuthHeaders()); List teamIds = Collections.singletonList(team.getId()); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/topics/TopicResourceTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/topics/TopicResourceTest.java index ca26c3df06d..e37d6984aa2 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/topics/TopicResourceTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/resources/topics/TopicResourceTest.java @@ -57,7 +57,7 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void post_validTopics_as_admin_200_OK(TestInfo test) throws IOException { + void post_validTopics_as_admin_200_OK(TestInfo test) throws IOException { // Create team with different optional fields CreateTopic create = create(test); createAndCheckEntity(create, adminAuthHeaders()); @@ -69,17 +69,17 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void post_topicWithUserOwner_200_ok(TestInfo test) throws IOException { + void post_topicWithUserOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(USER_OWNER1), adminAuthHeaders()); } @Test - public void post_topicWithTeamOwner_200_ok(TestInfo test) throws IOException { + void post_topicWithTeamOwner_200_ok(TestInfo test) throws IOException { createAndCheckEntity(create(test).withOwner(TEAM_OWNER1), adminAuthHeaders()); } @Test - public void post_topic_as_non_admin_401(TestInfo test) { + void post_topic_as_non_admin_401(TestInfo test) { CreateTopic create = create(test); HttpResponseException exception = assertThrows(HttpResponseException.class, () -> createTopic(create, authHeaders("test@open-metadata.org"))); @@ -87,7 +87,7 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void post_topicWithoutRequiredFields_4xx(TestInfo test) { + void post_topicWithoutRequiredFields_4xx(TestInfo test) { // Service is required field HttpResponseException exception = assertThrows( @@ -108,7 +108,7 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void post_topicWithDifferentService_200_ok(TestInfo test) throws IOException { + void post_topicWithDifferentService_200_ok(TestInfo test) throws IOException { EntityReference[] differentServices = {PULSAR_REFERENCE, KAFKA_REFERENCE}; // Create topic for each service and test APIs @@ -130,7 +130,7 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void put_topicAttributes_200_ok(TestInfo test) throws IOException { + void put_topicAttributes_200_ok(TestInfo test) throws IOException { CreateTopic createTopic = create(test) .withOwner(USER_OWNER1) @@ -183,7 +183,7 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void patch_topicAttributes_200_ok(TestInfo test) throws IOException { + void patch_topicAttributes_200_ok(TestInfo test) throws IOException { CreateTopic createTopic = create(test) .withOwner(USER_OWNER1) @@ -239,13 +239,13 @@ public class TopicResourceTest extends EntityResourceTest { } @Test - public void delete_emptyTopic_200_ok(TestInfo test) throws HttpResponseException { + void delete_emptyTopic_200_ok(TestInfo test) throws HttpResponseException { Topic topic = createTopic(create(test), adminAuthHeaders()); deleteEntity(topic.getId(), adminAuthHeaders()); } @Test - public void delete_nonEmptyTopic_4xx() { + void delete_nonEmptyTopic_4xx() { // TODO } diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/security/policyevaluator/PolicyEvaluatorTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/security/policyevaluator/PolicyEvaluatorTest.java index a6bf2a30d2e..be0bed1e97b 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/security/policyevaluator/PolicyEvaluatorTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/security/policyevaluator/PolicyEvaluatorTest.java @@ -62,7 +62,7 @@ public class PolicyEvaluatorTest { } @Test - public void dataConsumer_cannot_update_owner() { + void dataConsumer_cannot_update_owner() { User dataConsumer = createUser(ImmutableList.of(DATA_CONSUMER)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.UpdateOwner); @@ -70,7 +70,7 @@ public class PolicyEvaluatorTest { } @Test - public void dataSteward_can_update_owner() { + void dataSteward_can_update_owner() { User dataConsumer = createUser(ImmutableList.of(DATA_STEWARD)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.UpdateOwner); @@ -78,7 +78,7 @@ public class PolicyEvaluatorTest { } @Test - public void dataConsumer_can_suggest_description() { + void dataConsumer_can_suggest_description() { User dataConsumer = createUser(ImmutableList.of(DATA_CONSUMER)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.SuggestDescription); @@ -86,7 +86,7 @@ public class PolicyEvaluatorTest { } @Test - public void legal_can_update_tags_for_pii_tables() { + void legal_can_update_tags_for_pii_tables() { User dataConsumer = createUser(ImmutableList.of(LEGAL)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.UpdateTags); @@ -94,7 +94,7 @@ public class PolicyEvaluatorTest { } @Test - public void auditor_cannot_update_tags_for_pii_tables() { + void auditor_cannot_update_tags_for_pii_tables() { User dataConsumer = createUser(ImmutableList.of(AUDITOR)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.UpdateTags); @@ -102,7 +102,7 @@ public class PolicyEvaluatorTest { } @Test - public void devops_can_suggest_description() { + void devops_can_suggest_description() { User dataConsumer = createUser(ImmutableList.of(DEV_OPS)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.SuggestDescription); @@ -110,7 +110,7 @@ public class PolicyEvaluatorTest { } @Test - public void devops_cannot_update_description() { + void devops_cannot_update_description() { User dataConsumer = createUser(ImmutableList.of(DEV_OPS)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.UpdateDescription); @@ -118,7 +118,7 @@ public class PolicyEvaluatorTest { } @Test - public void devops_cannot_update_tags() { + void devops_cannot_update_tags() { User dataConsumer = createUser(ImmutableList.of(DEV_OPS)); Table table = createTable(); boolean hasPermission = policyEvaluator.hasPermission(dataConsumer, table, MetadataOperation.UpdateTags); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/JsonUtilsTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/JsonUtilsTest.java index 7c958ca976e..f1c6157726a 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/JsonUtilsTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/JsonUtilsTest.java @@ -32,7 +32,7 @@ import org.openmetadata.catalog.entity.teams.Team; public class JsonUtilsTest { /** Test apply patch method with different operations. */ @Test - public void applyPatch() throws IOException { + void applyPatch() throws IOException { JsonObjectBuilder teamJson = Json.createObjectBuilder(); JsonObjectBuilder user1 = Json.createObjectBuilder(); JsonObjectBuilder user2 = Json.createObjectBuilder(); diff --git a/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/RestUtilTest.java b/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/RestUtilTest.java index 224465d72e6..5169c962ed4 100644 --- a/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/RestUtilTest.java +++ b/catalog-rest-service/src/test/java/org/openmetadata/catalog/util/RestUtilTest.java @@ -25,7 +25,7 @@ import org.openmetadata.catalog.entity.teams.User; public class RestUtilTest { @Test - public void testFields() { + void testFields() { // Anonymous class with JsonProperties to extract Object entity = new Object() { diff --git a/common/src/test/java/org/openmetadata/common/utils/CipherTextTest.java b/common/src/test/java/org/openmetadata/common/utils/CipherTextTest.java index a22750e6664..716dda960d5 100644 --- a/common/src/test/java/org/openmetadata/common/utils/CipherTextTest.java +++ b/common/src/test/java/org/openmetadata/common/utils/CipherTextTest.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; public class CipherTextTest { @Test - public void encryptDescryptTest() throws GeneralSecurityException, UnsupportedEncodingException { + void encryptDescryptTest() throws GeneralSecurityException, UnsupportedEncodingException { CipherText cipherText = CipherText.instance(); String[] strings = {"test1", "test2", "service.dwh.fact_trip", "random text", "user@domain.com"}; for (String str : strings) {