Skip to content

Advancements with postgres #2510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Aug 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e49cc9c
Start DB runner from tests
flovilmart Aug 12, 2016
eed14bd
Connect GridstoreAdapter only when needed
flovilmart Aug 12, 2016
58c2653
removes unused package
flovilmart Aug 12, 2016
831c32e
better test errors reporting
flovilmart Aug 13, 2016
451439c
Adds support for __op.Delete
flovilmart Aug 13, 2016
3a5da32
Better test error reporting
flovilmart Aug 13, 2016
4037326
Makes sure all tests can run without crashing
flovilmart Aug 13, 2016
36e9ac2
Use xdescribe to skip test suite
flovilmart Aug 13, 2016
d0b67fe
Removes unused dependencies
flovilmart Aug 13, 2016
01f7653
Let volatiles classes be created with PG on start
flovilmart Aug 13, 2016
4bc751f
Do not fail if class dont exist
flovilmart Aug 13, 2016
1568fb4
adds index.spec.js to the pg suite
flovilmart Aug 13, 2016
22440dd
Use a new config each test to prevent side effects
flovilmart Aug 13, 2016
bfaa171
Enable EmailVerificationToken specs with pg
flovilmart Aug 13, 2016
cdceb00
Makes sure failure output is not cut
flovilmart Aug 13, 2016
36b1fa2
Reduces number of ignored tests in ParseObject.spec
flovilmart Aug 13, 2016
3158136
Inspect reconfiguration errors
flovilmart Aug 13, 2016
c981817
Mark GlobalConfig is incompatible with PG
flovilmart Aug 14, 2016
24f5171
PG: Nested JSON queries and updates
flovilmart Aug 14, 2016
410d0ee
Enable working specs in ParseUser
flovilmart Aug 14, 2016
83cc4ac
Sets default logLevel in tests to undefined
flovilmart Aug 14, 2016
7c197de
Adds File type support, retores purchaseValidation specs
flovilmart Aug 14, 2016
af27ef6
Adds support for updating jsonb objects
flovilmart Aug 14, 2016
0cc0d27
Proper implementation of deleteByQuery and ORs
flovilmart Aug 14, 2016
07cfd2e
xit only failing tests
flovilmart Aug 14, 2016
d50d90a
Nit on ParseAPI spec
flovilmart Aug 14, 2016
229a49b
add sorting operator
flovilmart Aug 14, 2016
4499f48
properly bound order keys
flovilmart Aug 14, 2016
e8e9224
reverts describe_only_db behavior
flovilmart Aug 14, 2016
263a299
Enables passing tests
flovilmart Aug 14, 2016
9417903
Adds basic support for relations, upsertOneObject aliased to createOb…
flovilmart Aug 15, 2016
e889377
progress on queries options
flovilmart Aug 15, 2016
09cdbf0
Fix ACL update related problems
flovilmart Aug 15, 2016
24ec92e
Creates relation tables on class creation
flovilmart Aug 15, 2016
5eac075
Adds Relation tests
flovilmart Aug 15, 2016
9f7eecd
remove flaky tests
flovilmart Aug 15, 2016
624c9bf
use promises instead of CB
flovilmart Aug 15, 2016
f5f36bb
disable flaky test
flovilmart Aug 15, 2016
8ada600
nits
flovilmart Aug 15, 2016
9998ad7
Fixes on schema spec
flovilmart Aug 15, 2016
edb84a5
fix failues
flovilmart Aug 15, 2016
484a3f0
Basic GeoPoint support
flovilmart Aug 15, 2016
349f2bc
Adds support for $nearSphere/$maxDistance geopoint queries
flovilmart Aug 15, 2016
8e1069c
enable passing tests
flovilmart Aug 15, 2016
76422e6
drop tables afterEach for PG, clean up relation tables too
flovilmart Aug 15, 2016
fe52a53
Better initialization/dropTables
flovilmart Aug 15, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ addons:
before_script:
- ls -al "$HOME/.mongodb/versions"
- psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database
- psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database
env:
global:
- COVERAGE_OPTION='./node_modules/.bin/istanbul cover'
Expand All @@ -26,7 +28,8 @@ branches:
cache:
directories:
- "$HOME/.mongodb/versions"
after_script: "./node_modules/.bin/codecov"
after_script:
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: npm
email:
Expand Down
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
"license": "BSD-3-Clause",
"dependencies": {
"babel-polyfill": "6.13.0",
"babel-runtime": "6.11.6",
"bcrypt-nodejs": "0.0.3",
"body-parser": "1.15.2",
"colors": "1.1.2",
"commander": "2.9.0",
"deepcopy": "0.6.3",
"express": "4.14.0",
Expand All @@ -41,7 +39,6 @@
"pg-promise": "5.2.7",
"redis": "2.6.2",
"request": "2.74.0",
"request-promise": "4.1.1",
"semver": "5.2.0",
"tv4": "1.2.7",
"winston": "2.2.0",
Expand All @@ -56,22 +53,20 @@
"babel-preset-es2015": "6.13.2",
"babel-preset-stage-0": "6.5.0",
"babel-register": "6.11.6",
"codecov": "1.0.1",
"cross-env": "2.0.0",
"deep-diff": "0.3.4",
"gaze": "1.1.1",
"istanbul": "1.0.0-alpha.1",
"jasmine": "2.4.1",
"mongodb-runner": "3.3.2",
"nodemon": "1.10.0"
"nodemon": "1.10.0",
"request-promise": "^4.1.1"
},
"scripts": {
"dev": "npm run build && node bin/dev",
"build": "babel src/ -d lib/",
"pretest": "test -z \"$PARSE_SERVER_TEST_DB\" && cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 mongodb-runner start || echo",
"test": "cross-env NODE_ENV=test TESTING=1 babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js",
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js",
"test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 babel-node ./node_modules/jasmine/bin/jasmine.js && npm run posttest",
"posttest": "mongodb-runner stop",
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/istanbul cover' npm test",
"coverage:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 babel-node ./node_modules/babel-istanbul/lib/cli.js cover ./node_modules/jasmine/bin/jasmine.js && npm run posttest",
"start": "node ./bin/parse-server",
Expand Down
21 changes: 12 additions & 9 deletions spec/CloudCode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ it('beforeSave should not affect fetched pointers', done => {
});
});

it_exclude_dbs(['postgres'])('should fully delete objects when using `unset` with beforeSave (regression test for #1840)', done => {
it('should fully delete objects when using `unset` with beforeSave (regression test for #1840)', done => {
var TestObject = Parse.Object.extend('TestObject');
var NoBeforeSaveObject = Parse.Object.extend('NoBeforeSave');
var BeforeSaveObject = Parse.Object.extend('BeforeSaveChanged');
Expand All @@ -746,7 +746,7 @@ it('beforeSave should not affect fetched pointers', done => {
})
.then(object => {
res.success(object);
});
}).catch(res.error);
});

Parse.Cloud.define('removeme2', (req, res) => {
Expand All @@ -762,7 +762,7 @@ it('beforeSave should not affect fetched pointers', done => {
})
.then(object => {
res.success(object);
});
}).catch(res.error);
});

Parse.Cloud.run('removeme')
Expand All @@ -775,10 +775,13 @@ it('beforeSave should not affect fetched pointers', done => {
expect(aBeforeSaveObj.get('before')).toEqual('save');
expect(aBeforeSaveObj.get('remove')).toEqual(undefined);
done();
}).catch((err) => {
jfail(err);
done();
});
});

it_exclude_dbs(['postgres'])('should fully delete objects when using `unset` with beforeSave (regression test for #1840)', done => {
it('should fully delete objects when using `unset` with beforeSave (regression test for #1840)', done => {
var TestObject = Parse.Object.extend('TestObject');
var BeforeSaveObject = Parse.Object.extend('BeforeSaveChanged');

Expand All @@ -802,12 +805,12 @@ it('beforeSave should not affect fetched pointers', done => {
expect(object.get('remove')).toBeUndefined();
done();
}).fail((err) => {
console.error(err);
jfail(err);
done();
})
});
});

it_exclude_dbs(['postgres'])('should not include relation op (regression test for #1606)', done => {
it('should not include relation op (regression test for #1606)', done => {
var TestObject = Parse.Object.extend('TestObject');
var BeforeSaveObject = Parse.Object.extend('BeforeSaveChanged');
let testObj;
Expand All @@ -818,7 +821,7 @@ it('beforeSave should not affect fetched pointers', done => {
testObj.save().then(() => {
object.relation('testsRelation').add(testObj);
res.success();
})
}, res.error);
});

let object = new BeforeSaveObject();
Expand All @@ -827,7 +830,7 @@ it('beforeSave should not affect fetched pointers', done => {
expect(() => { objectAgain.relation('testsRelation') }).not.toThrow();
done();
}).fail((err) => {
console.error(err);
jfail(err);
done();
})
});
Expand Down
Loading