Commit Graph

26 Commits

Author SHA1 Message Date
Natan Rolnik
9bfa0c60c4 Adds index on _Role name property (#3586)
* Adds index on _Role name property

In order to avoid having different _Role objects with the same name, adding an index on the name property of _Role is necessary.

Fixes #3579

* Uses throw instead of Promise.reject when enforcing unique indexes

* Fixes wrong sorting of results in schemas tests
2017-03-04 12:42:19 -08:00
Arthur Cinader
4cb6e7d209 Add lint rule space-infix-ops (#3237)
Disallows: 1+1.  Must be 1 + 1.
2017-01-11 12:31:40 -08:00
Arthur Cinader
ca286b7108 Enable prefer-const lint rule (#3202) 2016-12-07 18:17:05 -05:00
corban baxter
e069b20ef9 adding simple test for adding and removing users on a role. (#3198) 2016-12-07 16:15:01 -05:00
Arthur Cinader
a270632570 More lint tweaking (#3164)
1. Add no space in paren rule
2. fix spec/eslintrc.json so it allow for inheriting from root rc.

Because the spce rc specified reccomended, it "turned off" all of the
rule tweaks in the root.  This fixes that.
2016-12-02 19:11:54 -05:00
Florent Vilmart
8c2c76dd26 Adds liniting into the workflow (#3082)
* initial linting of src

* fix indent to 2 spaces

* Removes unnecessary rules

* ignore spec folder for now

* Spec linting

* Fix spec indent

* nits

* nits

* no no-empty rule
2016-11-24 15:47:41 -05:00
Kulshekhar Kabra
8f0ae7081d Enable a few tests to test against Postgres (#2971)
* Enable RestCreate related tests for Postgres

* Enable tests in ParseRole for postgres

* Enable one ParseObject test for postgres

* Improve the way a jsonb field is updated.

* Use Postgres 9.5 in Travis

* Install Postgres 9.5 in Travis

* Use sudo to install and setup Postgres 9.5 in Travis

* Test if Postgres 9.5 can be used with trusty

* Re-exclude a test for postgres

* Revert travis to its original form
2016-11-01 07:30:22 -04:00
Florent Vilmart
9ecb9a3595 Postgres: Operations, Hooks, OAuth login, Files support (#2528)
* Adds files related tests through fs-adapter with PG

* Schema deletions implementations

* Adds Hooks spec

* Fix test

* Adds support for containsAll (numbers and strings)

* Better support for deleteFields and deleteClass

* Recursive JSON update for authData

* Adds node_modules to travis cache

* Disable temporarily to make tests pass

* Adds _perishable_token support for _User class

* ignore when a table creation fails at init (table exists)

* Adds support for AddUnique and Remove

* PG 9.4 compatible functions

* Re-enable tests

* nit

* Better handling of schema creation race
2016-08-18 18:05:26 -04:00
Florent Vilmart
c0249283ac 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
2016-08-15 16:48:39 -04:00
Drew
ab06055369 Postgres exclude failing tests (#2081)
* reload the right data

More passing postgres tests

Handle schema updates, and $in for non array columns

remove authdata from user and implement ensureUniqueness

Make some tests work, detect existing classes

Throw proper error for unique index violation

fix findOneAndUpdate

Support more types

support more type

Support boolean, fix _rperm/_wperm, add TODO

Support string types and also simplify tests

Move operator flattening into Parse Server and out of mongo adapters

Move authdata transform for create into Parse Server

Move authdata transforms completely in to Parse Server

Fix test setup

inline addSchema

Inject default schema to response from DB adapter

* Mark tests that don't work in Postgres

* Exclude one more test

* Exclude some more failing tests

* Exclude more tests
2016-06-17 12:59:16 -04:00
Marco Cheung
d9f8486790 Fix role test (#2057) 2016-06-14 10:17:15 -07:00
Florent Vilmart
cbbd66964a Huge performance improvement on roles queries 2016-04-05 20:44:26 -04:00
Blayne Chard
18906f17b4 Auth._loadRoles should not query the same role twice. 2016-04-04 21:32:41 -04:00
Fosco Marotto
3a06117fa1 Adding a role scenario test for issue 827 2016-03-06 18:28:29 -08:00
Fosco Marotto
157e43f4a4 Merge pull request #861 from ParsePlatform/fosco.role1
Fix for related query on non-existing column
2016-03-06 14:35:03 -08:00
Fosco Marotto
4ee9cb754c Fix for related query on non-existing column 2016-03-06 00:34:44 -08:00
Florent Vilmart
17bc79b372 Improves tests, ensure unicity of roleIds 2016-03-04 22:52:27 -05:00
Florent Vilmart
c9f8453171 Fix reversed roles lookup 2016-03-04 22:52:26 -05:00
Nikita Lutsenko
c4fa3f0ee0 Propagate installationId in all Cloud Code triggers. 2016-03-02 21:02:50 -08:00
jim1_lin
789dc48f47 remove redundant log 2016-03-02 21:09:20 +08:00
jim1_lin
a909ab71e3 ACL must be specified in _Role 2016-03-02 16:08:39 +08:00
jim1_lin
5f9b5d54f3 move check from classRouter to Schema.js 2016-03-02 12:21:18 +08:00
jim1_lin
4054c247ec Add test, JavascriptSDK 1.7.1 rest format not as expected
JavascriptSDK 1.7.1 use serverUrl/classes/_Role directly.
So move validation from RolesRouter to ClassesRouter.
2016-03-02 11:13:24 +08:00
Florent Vilmart
753bead4ac Recursive lookup for roles 2016-02-26 13:35:56 -05:00
Francis Lessard
83c0f92553 no message 2016-02-13 08:18:43 -05:00
Fosco Marotto
7f5d744ce2 Initial release, parse-server, 2.0.0 2016-01-28 10:58:12 -08:00