Allow single server instance in test suite (#7262)

* initial pass

* reconfigureServer when needed

* finish postgres tests

* mongo tests

* more tests

* clean up

* re-add skipped test

* Fix transaction tests

* handle batch

* AuthenticationAdapter fix

* More reconfiguration

* clean up

* properly terminate cli servers

* handle Parse.Push

* Flaky PushController

* ensure reconfigureServer when changed

* fix postgres tests

* remove console.log

* LiveQuery spec remove duplicates and listeners
This commit is contained in:
Diamond Lewis
2021-03-13 09:05:22 -06:00
committed by GitHub
parent 8b0e8cd02c
commit 9563793303
36 changed files with 941 additions and 1020 deletions

View File

@@ -67,6 +67,7 @@ describe('miscellaneous', function () {
});
it('fail to create a duplicate username', async () => {
await reconfigureServer();
let numFailed = 0;
let numCreated = 0;
const p1 = request({
@@ -114,6 +115,7 @@ describe('miscellaneous', function () {
});
it('ensure that email is uniquely indexed', async () => {
await reconfigureServer();
let numFailed = 0;
let numCreated = 0;
const p1 = request({
@@ -246,7 +248,8 @@ describe('miscellaneous', function () {
});
});
it('ensure that if you try to sign up a user with a unique username and email, but duplicates in some other field that has a uniqueness constraint, you get a regular duplicate value error', done => {
it('ensure that if you try to sign up a user with a unique username and email, but duplicates in some other field that has a uniqueness constraint, you get a regular duplicate value error', async done => {
await reconfigureServer();
const config = Config.get('test');
config.database.adapter
.addFieldIfNotExists('_User', 'randomField', { type: 'String' })