Fix failing integration test

How did this ever work? It was using an old variant of the
qlpack name.

Also, this commit makes the unhandledRejection handler less
verbose. This gets hit when the tests end and there is a cancellation.
this is not an error.
This commit is contained in:
Andrew Eisenberg
2022-06-21 17:00:49 -07:00
parent 0ebff2d6e6
commit eb5ce029ba
2 changed files with 9 additions and 4 deletions

View File

@@ -12,9 +12,13 @@ import { DatabaseManager } from '../../databases';
export const DB_URL = 'https://github.com/github/vscode-codeql/files/5586722/simple-db.zip';
process.addListener('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise ', p, ' reason: ', reason);
fail(String(reason));
process.addListener('unhandledRejection', (reason) => {
if (reason instanceof Error && reason.message === 'Canceled') {
console.log('Cancellation requested after the test has ended.');
process.exit(0);
} else {
fail(String(reason));
}
});
// We need to resolve the path, but the final three segments won't exist until later, so we only resolve the

View File

@@ -157,10 +157,11 @@ describe('Queries', function() {
});
it('should avoid creating a quick query', async () => {
fs.mkdirpSync(path.dirname(qlpackFile));
fs.writeFileSync(qlpackFile, yaml.dump({
name: 'quick-query',
version: '1.0.0',
libraryPathDependencies: ['codeql-javascript']
libraryPathDependencies: ['codeql/javascript-all']
}));
fs.writeFileSync(qlFile, 'xxx');
await commands.executeCommand('codeQL.quickQuery');