mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-27 16:55:06 +00:00
fix unit test
This commit is contained in:
parent
c491ac8297
commit
2b9941c55a
@ -92,20 +92,38 @@ describe('getTagAssetsQueryFilter', () => {
|
||||
const tagFQN = 'Tier.Tier1';
|
||||
const result = getTagAssetsQueryFilter(tagFQN);
|
||||
|
||||
expect(result).toBe(`(tier.tagFQN:"${tagFQN}")`);
|
||||
expect(result).toEqual({
|
||||
query: {
|
||||
term: {
|
||||
'tier.tagFQN': tagFQN,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('returns query filter for tagFQN starting with "Certification"', () => {
|
||||
const tagFQN = 'Certification.Gold';
|
||||
const result = getTagAssetsQueryFilter(tagFQN);
|
||||
|
||||
expect(result).toBe(`(certification.tagLabel.tagFQN:"${tagFQN}")`);
|
||||
expect(result).toEqual({
|
||||
query: {
|
||||
term: {
|
||||
'certification.tagLabel.tagFQN': tagFQN,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('returns common query filter for tagFQN starting with any name expect "Tier and Certification"', () => {
|
||||
const tagFQN = 'ClassificationTag.Gold';
|
||||
const result = getTagAssetsQueryFilter(tagFQN);
|
||||
|
||||
expect(result).toBe(`(tags.tagFQN:"${tagFQN}")`);
|
||||
expect(result).toEqual({
|
||||
query: {
|
||||
term: {
|
||||
'tags.tagFQN': tagFQN,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user