Remove Stage name check on aggregate pipelines (#7237)
* add search for atlas search index * added test for search in pipeline * removed stage name check in pipeline * removed spec for invalid query invalid key * updated changelog Co-authored-by: Diamond Lewis <findlewis@gmail.com>
This commit is contained in:
@@ -74,4 +74,15 @@ describe('AggregateRouter', () => {
|
||||
expect(e.message).toBe('Pipeline stages should only have one key found group, match');
|
||||
}
|
||||
});
|
||||
|
||||
it('get search pipeline from Pipeline Operator (Array)', () => {
|
||||
const body = {
|
||||
pipeline: {
|
||||
search: {},
|
||||
},
|
||||
};
|
||||
const expected = [{ $search: {} }];
|
||||
const result = AggregateRouter.getPipeline(body);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -83,18 +83,6 @@ describe('Parse.Query Aggregate testing', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('invalid query invalid key', done => {
|
||||
const options = Object.assign({}, masterKeyOptions, {
|
||||
body: {
|
||||
unknown: {},
|
||||
},
|
||||
});
|
||||
get(Parse.serverURL + '/aggregate/TestObject', options).catch(error => {
|
||||
expect(error.error.code).toEqual(Parse.Error.INVALID_QUERY);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('invalid query group _id', done => {
|
||||
const options = Object.assign({}, masterKeyOptions, {
|
||||
body: {
|
||||
|
||||
Reference in New Issue
Block a user