Skip to content

Change remote queries to test against submitted data#1746

Merged
koesie10 merged 3 commits intomainfrom
koesie10/remote-queries-tests-tar
Nov 11, 2022
Merged

Change remote queries to test against submitted data#1746
koesie10 merged 3 commits intomainfrom
koesie10/remote-queries-tests-tar

Conversation

@koesie10
Copy link
Copy Markdown
Member

The remote queries tests were testing the data on the filesystem, rather than the data submitted to the server. This required using a dryRun parameter to prevent deleting the temporary directory, while we can actually just test against the submitted data.

This will create an in-memory filesystem of the submitted query pack by un-tar-gz'ing the query pack into memory and using that to test the existence of certain files.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

The remote queries tests were testing the data on the filesystem, rather
than the data submitted to the server. This required using a `dryRun`
parameter to prevent deleting the temporary directory, while we can
actually just test against the submitted data.

This will create an in-memory filesystem of the submitted query pack by
un-tar-gz'ing the query pack into memory and using that to test the
existence of certain files.
Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks for improving tests!

Comment thread extensions/ql-vscode/src/vscode-tests/utils/bundled-pack-helpers.ts Outdated
Comment thread extensions/ql-vscode/package.json
Base automatically changed from koesie10/extract-remote-query-preparation to main November 11, 2022 10:23
@koesie10 koesie10 enabled auto-merge November 11, 2022 10:25
@koesie10 koesie10 merged commit 9894eda into main Nov 11, 2022
@koesie10 koesie10 deleted the koesie10/remote-queries-tests-tar branch November 11, 2022 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants