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:
Brett Ponder
2021-03-03 16:46:49 -06:00
committed by GitHub
parent d10e99007b
commit b20aa0c677
4 changed files with 12 additions and 47 deletions

View File

@@ -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);
});
});

View File

@@ -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: {