Skip to content

Commit f9384d7

Browse files
committed
[backend] remove stix filtering tests
1 parent ef83256 commit f9384d7

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

opencti-platform/opencti-graphql/tests/03-integration/01-database/stixFiltering-test.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -161,47 +161,6 @@ describe('Filters testing', () => {
161161
const filteredObjectsNot = await applyFilters(filtersNot);
162162
expect(stixBundle.objects.length - filteredObjects.length).toBe(filteredObjectsNot.length);
163163
});
164-
it('Should labels filters correctly applied with only_eq_to operator', async () => {
165-
// With only_eq_to
166-
let filters = {
167-
mode: 'and',
168-
filters: [{
169-
key: ['objectLabel'],
170-
values: ['ryuk'],
171-
operator: 'only_eq_to',
172-
mode: 'or',
173-
}],
174-
filterGroups: [],
175-
};
176-
let filteredObjects = await applyFilters(filters);
177-
expect(filteredObjects.length).toBe(0);
178-
// With only_eq_to & AND local mode
179-
filters = {
180-
mode: 'and',
181-
filters: [{
182-
key: ['objectLabel'],
183-
values: ['ryuk', 'TrickBot', 'COVID-19'],
184-
operator: 'only_eq_to',
185-
mode: 'and',
186-
}],
187-
filterGroups: [],
188-
};
189-
filteredObjects = await applyFilters(filters);
190-
expect(filteredObjects.length).toBe(2);
191-
// With only_eq_to & OR local mode
192-
filters = {
193-
mode: 'and',
194-
filters: [{
195-
key: ['objectLabel'],
196-
values: ['ryuk', 'TrickBot', 'COVID-19'],
197-
operator: 'only_eq_to',
198-
mode: 'or',
199-
}],
200-
filterGroups: [],
201-
};
202-
filteredObjects = await applyFilters(filters);
203-
expect(filteredObjects.length).toBe(0);
204-
});
205164

206165
// revoked
207166

0 commit comments

Comments
 (0)