Skip to content

Commit

Permalink
ci: Fix test exclusion list in combination with other exclusions (#9277)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Aug 13, 2024
1 parent 9fd7070 commit 9552a4c
Show file tree
Hide file tree
Showing 42 changed files with 281 additions and 293 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
NODE_VERSION: 18.20.4
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 15
timeout-minutes: 20
runs-on: ubuntu-latest
services:
redis:
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
NODE_VERSION: 22.4.1
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 15
timeout-minutes: 20
runs-on: ubuntu-latest
services:
redis:
Expand Down
4 changes: 2 additions & 2 deletions spec/AudienceRouter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ describe('AudiencesRouter', () => {
);
});

it_id('af1111b5-3251-4b40-8f06-fb0fc624fa91')(it_exclude_dbs(['postgres'])('should support legacy parse.com audience fields', done => {
it_id('af1111b5-3251-4b40-8f06-fb0fc624fa91')(it_exclude_dbs(['postgres']))('should support legacy parse.com audience fields', done => {
const database = Config.get(Parse.applicationId).database.adapter.database;
const now = new Date();
Parse._request(
Expand Down Expand Up @@ -369,7 +369,7 @@ describe('AudiencesRouter', () => {
});
});
});
}));
});

it('should be able to search on audiences', done => {
Parse._request(
Expand Down
12 changes: 6 additions & 6 deletions spec/AuthenticationAdapters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ describe('facebook limited auth adapter', () => {
}
});

it_id('7bfa55ab-8fd7-4526-992e-6de3df16bf9c', 'should use algorithm from key header to verify id_token (facebook.com)', async () => {
it_id('7bfa55ab-8fd7-4526-992e-6de3df16bf9c')(it)('should use algorithm from key header to verify id_token (facebook.com)', async () => {
const fakeClaim = {
iss: 'https://www.facebook.com',
aud: 'secret',
Expand Down Expand Up @@ -2072,7 +2072,7 @@ describe('facebook limited auth adapter', () => {
}
});

it_id('4bcb1a1a-11f8-4e12-a3f6-73f7e25e355a', '(using client id as string) should verify id_token (facebook.com)', async () => {
it_id('4bcb1a1a-11f8-4e12-a3f6-73f7e25e355a')(it)('using client id as string) should verify id_token (facebook.com)', async () => {
const fakeClaim = {
iss: 'https://www.facebook.com',
aud: 'secret',
Expand All @@ -2092,7 +2092,7 @@ describe('facebook limited auth adapter', () => {
expect(result).toEqual(fakeClaim);
});

it_id('c521a272-2ac2-4d8b-b5ed-ea250336d8b1', '(using client id as array) should verify id_token (facebook.com)', async () => {
it_id('c521a272-2ac2-4d8b-b5ed-ea250336d8b1')(it)('(using client id as array) should verify id_token (facebook.com)', async () => {
const fakeClaim = {
iss: 'https://www.facebook.com',
aud: 'secret',
Expand All @@ -2112,7 +2112,7 @@ describe('facebook limited auth adapter', () => {
expect(result).toEqual(fakeClaim);
});

it_id('e3f16404-18e9-4a87-a555-4710cfbdac67')('(using client id as array with multiple items) should verify id_token (facebook.com)', async () => {
it_id('e3f16404-18e9-4a87-a555-4710cfbdac67')(it)('(using client id as array with multiple items) should verify id_token (facebook.com)', async () => {
const fakeClaim = {
iss: 'https://www.facebook.com',
aud: 'secret',
Expand All @@ -2132,7 +2132,7 @@ describe('facebook limited auth adapter', () => {
expect(result).toEqual(fakeClaim);
});

it_id('549c33a1-3a6b-4732-8cf6-8f010ad4569c')('(using client id as string) should throw error with with invalid jwt issuer (facebook.com)', async () => {
it_id('549c33a1-3a6b-4732-8cf6-8f010ad4569c')(it)('(using client id as string) should throw error with with invalid jwt issuer (facebook.com)', async () => {
const fakeClaim = {
iss: 'https://not.facebook.com',
sub: 'the_user_id',
Expand Down Expand Up @@ -2263,7 +2263,7 @@ describe('facebook limited auth adapter', () => {
}
});

it_id('c194d902-e697-46c9-a303-82c2d914473c', 'should throw error with with invalid user id (facebook.com)', async () => {
it_id('c194d902-e697-46c9-a303-82c2d914473c')(it)('should throw error with with invalid user id (facebook.com)', async () => {
const fakeClaim = {
iss: 'https://www.facebook.com',
aud: 'invalid_client_id',
Expand Down
8 changes: 4 additions & 4 deletions spec/CLI.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe('execution', () => {
}
});

it_id('a0ab74b4-f805-4e03-b31d-b5cd59e64495', 'should start Parse Server', done => {
it_id('a0ab74b4-f805-4e03-b31d-b5cd59e64495')(it)('should start Parse Server', done => {
const env = { ...process.env };
env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation';
childProcess = spawn(
Expand All @@ -261,7 +261,7 @@ describe('execution', () => {
handleError(childProcess, done);
});

it_id('d7165081-b133-4cba-901b-19128ce41301', 'should start Parse Server with GraphQL', async done => {
it_id('d7165081-b133-4cba-901b-19128ce41301')(it)('should start Parse Server with GraphQL', async done => {
const env = { ...process.env };
env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation';
childProcess = spawn(
Expand All @@ -287,7 +287,7 @@ describe('execution', () => {
handleError(childProcess, done);
});

it_id('2769cdb4-ce8a-484d-8a91-635b5894ba7e', 'should start Parse Server with GraphQL and Playground', async done => {
it_id('2769cdb4-ce8a-484d-8a91-635b5894ba7e')(it)('should start Parse Server with GraphQL and Playground', async done => {
const env = { ...process.env };
env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation';
childProcess = spawn(
Expand Down Expand Up @@ -315,7 +315,7 @@ describe('execution', () => {
handleError(childProcess, done);
});

it_id('23caddd7-bfea-4869-8bd4-0f2cd283c8bd', 'can start Parse Server with auth via CLI', done => {
it_id('23caddd7-bfea-4869-8bd4-0f2cd283c8bd')(it)('can start Parse Server with auth via CLI', done => {
const env = { ...process.env };
env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation';
childProcess = spawn(
Expand Down
12 changes: 6 additions & 6 deletions spec/CloudCode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,7 @@ describe('beforeFind hooks', () => {
);
});

it_id('6ef0d226-af30-4dfd-8306-972a1b4becd3', 'should handle empty where', done => {
it_id('6ef0d226-af30-4dfd-8306-972a1b4becd3')(it)('should handle empty where', done => {
Parse.Cloud.beforeFind('MyObject', req => {
const otherQuery = new Parse.Query('MyObject');
otherQuery.equalTo('some', true);
Expand Down Expand Up @@ -2919,7 +2919,7 @@ describe('afterFind hooks', () => {
}).toThrow('Only the _Session class is allowed for the afterLogout trigger.');
});

it_id('c16159b5-e8ee-42d5-8fe3-e2f7c006881d', 'should skip afterFind hooks for aggregate', done => {
it_id('c16159b5-e8ee-42d5-8fe3-e2f7c006881d')(it)('should skip afterFind hooks for aggregate', done => {
const hook = {
method: function () {
return Promise.reject();
Expand All @@ -2946,7 +2946,7 @@ describe('afterFind hooks', () => {
});
});

it_id('ca55c90d-36db-422c-9060-a30583ce5224', 'should skip afterFind hooks for distinct', done => {
it_id('ca55c90d-36db-422c-9060-a30583ce5224')(it)('should skip afterFind hooks for distinct', done => {
const hook = {
method: function () {
return Promise.reject();
Expand Down Expand Up @@ -3033,7 +3033,7 @@ describe('afterFind hooks', () => {
expect(calledAfter).toBe(false);
});

it_id('55ef1741-cf72-4a7c-a029-00cb75f53233', 'should expose context in beforeSave/afterSave via header', async () => {
it_id('55ef1741-cf72-4a7c-a029-00cb75f53233')(it)('should expose context in beforeSave/afterSave via header', async () => {
let calledBefore = false;
let calledAfter = false;
Parse.Cloud.beforeSave('TestObject', req => {
Expand Down Expand Up @@ -3347,7 +3347,7 @@ describe('beforeLogin hook', () => {
expect(response).toEqual(error);
});

it_id('5656d6d7-65ef-43d1-8ca6-6942ae3614d5', 'should have expected data in request in beforeLogin', async done => {
it_id('5656d6d7-65ef-43d1-8ca6-6942ae3614d5')(it)('should have expected data in request in beforeLogin', async done => {
Parse.Cloud.beforeLogin(req => {
expect(req.object).toBeDefined();
expect(req.user).toBeUndefined();
Expand Down Expand Up @@ -3464,7 +3464,7 @@ describe('afterLogin hook', () => {
done();
});

it_id('e86155c4-62e1-4c6e-ab4a-9ac6c87c60f2')('should have expected data in request in afterLogin', async done => {
it_id('e86155c4-62e1-4c6e-ab4a-9ac6c87c60f2')(it)('should have expected data in request in afterLogin', async done => {
Parse.Cloud.afterLogin(req => {
expect(req.object).toBeDefined();
expect(req.user).toBeDefined();
Expand Down
20 changes: 10 additions & 10 deletions spec/CloudCodeLogger.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Cloud Code Logger', () => {
// Note that helpers takes care of logout.
// see helpers.js:afterEach

it_id('02d53b97-3ec7-46fb-abb6-176fd6e85590')('should expose log to functions', () => {
it_id('02d53b97-3ec7-46fb-abb6-176fd6e85590')(it)('should expose log to functions', () => {
const spy = spyOn(Config.get('test').loggerController, 'log').and.callThrough();
Parse.Cloud.define('loggerTest', req => {
req.log.info('logTest', 'info log', { info: 'some log' });
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Cloud Code Logger', () => {
});
});

it_id('768412f5-d32f-4134-89a6-08949781a6c0')('trigger should obfuscate password', done => {
it_id('768412f5-d32f-4134-89a6-08949781a6c0')(it)('trigger should obfuscate password', done => {
Parse.Cloud.beforeSave(Parse.User, req => {
return req.object;
});
Expand All @@ -82,7 +82,7 @@ describe('Cloud Code Logger', () => {
.then(null, e => done.fail(e));
});

it_id('3c394047-272e-4728-9d02-9eaa660d2ed2')('should expose log to trigger', done => {
it_id('3c394047-272e-4728-9d02-9eaa660d2ed2')(it)('should expose log to trigger', done => {
Parse.Cloud.beforeSave('MyObject', req => {
req.log.info('beforeSave MyObject', 'info log', { info: 'some log' });
req.log.error('beforeSave MyObject', 'error log', {
Expand Down Expand Up @@ -120,7 +120,7 @@ describe('Cloud Code Logger', () => {
expect(truncatedString.length).toBe(1015); // truncate length + the string '... (truncated)'
});

it_id('4a009b1f-9203-49ca-8d48-5b45f4eedbdf')('should truncate input and result of long lines', done => {
it_id('4a009b1f-9203-49ca-8d48-5b45f4eedbdf')(it)('should truncate input and result of long lines', done => {
const longString = fs.readFileSync(loremFile, 'utf8');
Parse.Cloud.define('aFunction', req => {
return req.params;
Expand All @@ -138,7 +138,7 @@ describe('Cloud Code Logger', () => {
.then(null, e => done.fail(e));
});

it_id('9857e15d-bb18-478d-8a67-fdaad3e89565')('should log an afterSave', done => {
it_id('9857e15d-bb18-478d-8a67-fdaad3e89565')(it)('should log an afterSave', done => {
Parse.Cloud.afterSave('MyObject', () => {});
new Parse.Object('MyObject')
.save()
Expand All @@ -151,7 +151,7 @@ describe('Cloud Code Logger', () => {
.then(null, e => done.fail(e));
});

it_id('ec13a296-f8b1-4fc6-985a-3593462edd9c')('should log a denied beforeSave', done => {
it_id('ec13a296-f8b1-4fc6-985a-3593462edd9c')(it)('should log a denied beforeSave', done => {
Parse.Cloud.beforeSave('MyObject', () => {
throw 'uh oh!';
});
Expand All @@ -174,7 +174,7 @@ describe('Cloud Code Logger', () => {
});
});

it_id('3e0caa45-60d6-41af-829a-fd389710c132')('should log cloud function success', done => {
it_id('3e0caa45-60d6-41af-829a-fd389710c132')(it)('should log cloud function success', done => {
Parse.Cloud.define('aFunction', () => {
return 'it worked!';
});
Expand All @@ -189,7 +189,7 @@ describe('Cloud Code Logger', () => {
});
});

it_id('8088de8a-7cba-4035-8b05-4a903307e674')('should log cloud function execution using the custom log level', async done => {
it_id('8088de8a-7cba-4035-8b05-4a903307e674')(it)('should log cloud function execution using the custom log level', async done => {
Parse.Cloud.define('aFunction', () => {
return 'it worked!';
});
Expand Down Expand Up @@ -260,7 +260,7 @@ describe('Cloud Code Logger', () => {
expect(calls).toEqual({ beforeSave: 'warn', afterSave: undefined });
});

it_id('97e0eafa-cde6-4a9a-9e53-7db98bacbc62')('should log cloud function failure', done => {
it_id('97e0eafa-cde6-4a9a-9e53-7db98bacbc62')(it)('should log cloud function failure', done => {
Parse.Cloud.define('aFunction', () => {
throw 'it failed!';
});
Expand Down Expand Up @@ -311,7 +311,7 @@ describe('Cloud Code Logger', () => {
.then(null, e => done.fail(JSON.stringify(e)));
}).pend('needs more work.....');

it_id('b86e8168-8370-4730-a4ba-24ca3016ad66')('cloud function should obfuscate password', done => {
it_id('b86e8168-8370-4730-a4ba-24ca3016ad66')(it)('cloud function should obfuscate password', done => {
Parse.Cloud.define('testFunction', () => {
return 'verify code success';
});
Expand Down
2 changes: 1 addition & 1 deletion spec/DefinedSchemas.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ describe('DefinedSchemas', () => {
expect(logger.error).toHaveBeenCalledWith(`Failed to run migrations: ${error.toString()}`);
});

it_id('a18bf4f2-25c8-4de3-b986-19cb1ab163b8')('should perform migration in parallel without failing', async () => {
it_id('a18bf4f2-25c8-4de3-b986-19cb1ab163b8')(it)('should perform migration in parallel without failing', async () => {
const server = await reconfigureServer();
const logger = require('../lib/logger').logger;
spyOn(logger, 'error').and.callThrough();
Expand Down
Loading

0 comments on commit 9552a4c

Please sign in to comment.