mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-06 04:26:57 +00:00
Fix #8579: Add unit test to cover the cases where columnProfile is null or not being sent by client (#9038)
* Fix #8171: add test to make sure column profile can be sent as null or empty, it shouldn't break addProfileData API * Fix #8171: add test to make sure column profile can be sent as null or empty, it shouldn't break addProfileData API
This commit is contained in:
parent
6393ed03dc
commit
e06935d3fa
@ -1252,6 +1252,22 @@ public class TableResourceTest extends EntityResourceTest<Table, CreateTable> {
|
||||
|
||||
table1 = getEntity(table1.getId(), "*", authHeaders);
|
||||
verifyTableProfile(table1.getProfile(), table1ProfileList.get(table1ProfileList.size() - 1));
|
||||
|
||||
// Table profile with column profile as null
|
||||
timestamp = TestUtils.dateToTimestamp("2022-09-09");
|
||||
tableProfile =
|
||||
new TableProfile().withRowCount(6.0).withColumnCount(3.0).withTimestamp(timestamp).withProfileSample(10.0);
|
||||
createTableProfile = new CreateTableProfile().withTableProfile(tableProfile).withColumnProfile(null);
|
||||
putResponse = putTableProfileData(table.getId(), createTableProfile, authHeaders);
|
||||
verifyTableProfile(putResponse.getProfile(), createTableProfile.getTableProfile());
|
||||
|
||||
// Table profile without column profile
|
||||
timestamp = TestUtils.dateToTimestamp("2022-10-09");
|
||||
tableProfile =
|
||||
new TableProfile().withRowCount(6.0).withColumnCount(3.0).withTimestamp(timestamp).withProfileSample(10.0);
|
||||
createTableProfile = new CreateTableProfile().withTableProfile(tableProfile);
|
||||
putResponse = putTableProfileData(table.getId(), createTableProfile, authHeaders);
|
||||
verifyTableProfile(putResponse.getProfile(), createTableProfile.getTableProfile());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user