Advancements with postgres (#2510)

* Start DB runner from tests

* Connect GridstoreAdapter only when needed

* removes unused package

* better test errors reporting

* Adds support for __op.Delete

* Better test error reporting

* Makes sure all tests can run without crashing

* Use xdescribe to skip test suite

* Removes unused dependencies

* Let volatiles classes be created with PG on start

* Do not fail if class dont exist

* adds index.spec.js to the pg suite

* Use a new config each test to prevent side effects

* Enable EmailVerificationToken specs with pg

* Makes sure failure output is not cut

* Reduces number of ignored tests in ParseObject.spec

* Inspect reconfiguration errors

* Mark GlobalConfig is incompatible with PG

- Problem is with nested updates (param.prop = value)

* PG: Nested JSON queries and updates

- Adds support for nested json and . operator queries
- Adds debug support for PG adapter
- Adds loglevel support in helper

* Enable working specs in ParseUser

* Sets default logLevel in tests to undefined

* Adds File type support, retores purchaseValidation specs

* Adds support for updating jsonb objects

- Restores PushController tests

* Proper implementation of deleteByQuery and ORs

- Adds ParseInstallation spec to the test suite

* xit only failing tests

* Nit on ParseAPI spec

* add sorting operator

* properly bound order keys

* reverts describe_only_db behavior

* Enables passing tests

* Adds basic support for relations, upsertOneObject aliased to createObject

* progress on queries options

* Fix ACL update related problems

* Creates relation tables on class creation

* Adds Relation tests

* remove flaky tests

* use promises instead of CB

* disable flaky test

* nits

* Fixes on schema spec

- Next thing is to implemenet geopoint and files correctly

* fix failues

* Basic GeoPoint support

* Adds support for $nearSphere/$maxDistance geopoint queries

* enable passing tests

* drop tables afterEach for PG, clean up relation tables too

* Better initialization/dropTables
This commit is contained in:
Florent Vilmart
2016-08-15 16:48:39 -04:00
committed by GitHub
parent 2f1ee2186b
commit c0249283ac
42 changed files with 1447 additions and 716 deletions

View File

@@ -159,7 +159,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('creates _User schema when server starts', done => {
it('creates _User schema when server starts', done => {
request.get({
url: 'http://localhost:8378/1/schemas',
json: true,
@@ -317,7 +317,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('responds with all fields when you create a class', done => {
it('responds with all fields when you create a class', done => {
request.post({
url: 'http://localhost:8378/1/schemas',
headers: masterKeyHeaders,
@@ -346,7 +346,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('responds with all fields when getting incomplete schema', done => {
it('responds with all fields when getting incomplete schema', done => {
config.database.loadSchema()
.then(schemaController => schemaController.addClassIfNotExists('_Installation', {}, defaultClassLevelPermissions))
.then(() => {
@@ -387,7 +387,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('lets you specify class name in both places', done => {
it('lets you specify class name in both places', done => {
request.post({
url: 'http://localhost:8378/1/schemas/NewClass',
headers: masterKeyHeaders,
@@ -600,7 +600,7 @@ describe('schemas', () => {
})
});
it_exclude_dbs(['postgres'])('lets you add fields', done => {
it('lets you add fields', done => {
request.post({
url: 'http://localhost:8378/1/schemas/NewClass',
headers: masterKeyHeaders,
@@ -650,7 +650,7 @@ describe('schemas', () => {
})
});
it_exclude_dbs(['postgres'])('lets you add fields to system schema', done => {
it('lets you add fields to system schema', done => {
request.post({
url: 'http://localhost:8378/1/schemas/_User',
headers: masterKeyHeaders,
@@ -963,7 +963,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('should set/get schema permissions', done => {
it('should set/get schema permissions', done => {
request.post({
url: 'http://localhost:8378/1/schemas/AClass',
headers: masterKeyHeaders,
@@ -1245,7 +1245,7 @@ describe('schemas', () => {
});
}
it_exclude_dbs(['postgres'])('validate CLP 1', done => {
it('validate CLP 1', done => {
let user = new Parse.User();
user.setUsername('user');
user.setPassword('user');
@@ -1294,7 +1294,7 @@ describe('schemas', () => {
})
});
it_exclude_dbs(['postgres'])('validate CLP 2', done => {
it('validate CLP 2', done => {
let user = new Parse.User();
user.setUsername('user');
user.setPassword('user');
@@ -1417,7 +1417,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('validate CLP 4', done => {
it('validate CLP 4', done => {
let user = new Parse.User();
user.setUsername('user');
user.setPassword('user');
@@ -1485,7 +1485,7 @@ describe('schemas', () => {
})
});
it_exclude_dbs(['postgres'])('validate CLP 5', done => {
it('validate CLP 5', done => {
let user = new Parse.User();
user.setUsername('user');
user.setPassword('user');
@@ -1567,7 +1567,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])('can login when addFields is false (issue #1355)', (done) => {
it('can login when addFields is false (issue #1355)', (done) => {
setPermissionsOnClass('_User', {
'create': {'*': true},
'addField': {}
@@ -1599,7 +1599,7 @@ describe('schemas', () => {
});
});
it_exclude_dbs(['postgres'])("regression test for #1991", done => {
it("regression test for #1991", done => {
let user = new Parse.User();
user.setUsername('user');
user.setPassword('user');
@@ -1630,7 +1630,7 @@ describe('schemas', () => {
done();
}).catch((err) => {
fail('should not fail');
console.error(err);
jfail(err);
done();
});
});