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:
@@ -4,7 +4,7 @@
|
||||
var TestObject = Parse.Object.extend('TestObject');
|
||||
|
||||
describe('Parse.GeoPoint testing', () => {
|
||||
it_exclude_dbs(['postgres'])('geo point roundtrip', (done) => {
|
||||
it('geo point roundtrip', (done) => {
|
||||
var point = new Parse.GeoPoint(44.0, -11.0);
|
||||
var obj = new TestObject();
|
||||
obj.set('location', point);
|
||||
@@ -26,7 +26,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo point exception two fields', (done) => {
|
||||
it('geo point exception two fields', (done) => {
|
||||
var point = new Parse.GeoPoint(20, 20);
|
||||
var obj = new TestObject();
|
||||
obj.set('locationOne', point);
|
||||
@@ -39,7 +39,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo line', (done) => {
|
||||
it('geo line', (done) => {
|
||||
var line = [];
|
||||
for (var i = 0; i < 10; ++i) {
|
||||
var obj = new TestObject();
|
||||
@@ -67,7 +67,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance large', (done) => {
|
||||
it('geo max distance large', (done) => {
|
||||
var objects = [];
|
||||
[0, 1, 2].map(function(i) {
|
||||
var obj = new TestObject();
|
||||
@@ -86,11 +86,11 @@ describe('Parse.GeoPoint testing', () => {
|
||||
done();
|
||||
}, (err) => {
|
||||
fail("Couldn't query GeoPoint");
|
||||
fail(err)
|
||||
jfail(err)
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance medium', (done) => {
|
||||
it('geo max distance medium', (done) => {
|
||||
var objects = [];
|
||||
[0, 1, 2].map(function(i) {
|
||||
var obj = new TestObject();
|
||||
@@ -114,7 +114,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance small', (done) => {
|
||||
it('geo max distance small', (done) => {
|
||||
var objects = [];
|
||||
[0, 1, 2].map(function(i) {
|
||||
var obj = new TestObject();
|
||||
@@ -153,11 +153,12 @@ describe('Parse.GeoPoint testing', () => {
|
||||
Parse.Object.saveAll([sacramento, sf, honolulu], callback);
|
||||
};
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in km everywhere', (done) => {
|
||||
it('geo max distance in km everywhere', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
query.withinKilometers('location', sfo, 4000.0);
|
||||
// Honolulu is 4300 km away from SFO on a sphere ;)
|
||||
query.withinKilometers('location', sfo, 4800.0);
|
||||
query.find({
|
||||
success: function(results) {
|
||||
equal(results.length, 3);
|
||||
@@ -167,7 +168,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in km california', (done) => {
|
||||
it('geo max distance in km california', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
@@ -183,7 +184,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in km bay area', (done) => {
|
||||
it('geo max distance in km bay area', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
@@ -198,7 +199,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in km mid peninsula', (done) => {
|
||||
it('geo max distance in km mid peninsula', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
@@ -212,11 +213,11 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in miles everywhere', (done) => {
|
||||
it('geo max distance in miles everywhere', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
query.withinMiles('location', sfo, 2500.0);
|
||||
query.withinMiles('location', sfo, 2600.0);
|
||||
query.find({
|
||||
success: function(results) {
|
||||
equal(results.length, 3);
|
||||
@@ -226,7 +227,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in miles california', (done) => {
|
||||
it('geo max distance in miles california', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
@@ -242,11 +243,12 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in miles bay area', (done) => {
|
||||
it('geo max distance in miles bay area', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
query.withinMiles('location', sfo, 75.0);
|
||||
// 100km is 62 miles...
|
||||
query.withinMiles('location', sfo, 62.0);
|
||||
query.find({
|
||||
success: function(results) {
|
||||
equal(results.length, 1);
|
||||
@@ -257,7 +259,7 @@ describe('Parse.GeoPoint testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it_exclude_dbs(['postgres'])('geo max distance in miles mid peninsula', (done) => {
|
||||
it('geo max distance in miles mid peninsula', (done) => {
|
||||
makeSomeGeoPoints(function(list) {
|
||||
var sfo = new Parse.GeoPoint(37.6189722, -122.3748889);
|
||||
var query = new Parse.Query(TestObject);
|
||||
|
||||
Reference in New Issue
Block a user