-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add query suite integration tests for swift, actions, csharp, go, javascript, ruby, rust #19355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds integration tests for multiple languages (Java, Go, C#, Actions) to validate query suite inclusion with expected internal-repo changes causing test failures.
- Simplified the test logic in Java by replacing file I/O with helper functions.
- Added new integration tests for Go, C#, and Actions that mirror the Java test structure.
Reviewed Changes
Copilot reviewed 28 out of 44 changed files in this pull request and generated no comments.
File | Description |
---|---|
java/ql/integration-tests/java/query-suite/test.py | Replaces manual query resolution and file output with helper functions for checking query suites. |
go/ql/integration-tests/query-suite/test.py | Introduces integration tests for Go query suites using helper functions. |
csharp/ql/integration-tests/posix/query-suite/test.py | Introduces integration tests for C# query suites using helper functions. |
actions/ql/integration-tests/query-suite/test.py | Introduces integration tests for Actions query suites using helper functions. |
Files not reviewed (16)
- actions/ql/integration-tests/query-suite/actions-code-quality.qls.expected: Language not supported
- actions/ql/integration-tests/query-suite/actions-code-scanning.qls.expected: Language not supported
- actions/ql/integration-tests/query-suite/actions-security-and-quality.qls.expected: Language not supported
- actions/ql/integration-tests/query-suite/actions-security-extended.qls.expected: Language not supported
- actions/ql/integration-tests/query-suite/not_included_in_qls.expected: Language not supported
- csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected: Language not supported
- csharp/ql/integration-tests/posix/query-suite/csharp-code-scanning.qls.expected: Language not supported
- csharp/ql/integration-tests/posix/query-suite/csharp-security-and-quality.qls.expected: Language not supported
- csharp/ql/integration-tests/posix/query-suite/csharp-security-extended.qls.expected: Language not supported
- csharp/ql/integration-tests/posix/query-suite/not_included_in_qls.expected: Language not supported
- go/ql/integration-tests/query-suite/go-code-quality.qls.expected: Language not supported
- go/ql/integration-tests/query-suite/go-code-scanning.qls.expected: Language not supported
- go/ql/integration-tests/query-suite/go-security-and-quality.qls.expected: Language not supported
- go/ql/integration-tests/query-suite/go-security-extended.qls.expected: Language not supported
- go/ql/integration-tests/query-suite/not_included_in_qls.expected: Language not supported
- javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor cosmetic nits, but LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go LGTM (I didn't check every single query though...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C# 👍
Are these tests added, such that we don't accidentally add/remove queries to a suite?
650f187
to
20f7f1e
Compare
Yes. There are more changes to query suites recently due to the code-quality work that we're doing. I'm also planning on changing the code-quality query suites to not list individual query IDs, and having these tests in place help in not making accidental mistakes. |
20f7f1e
to
6c99666
Compare
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
d03cd33
to
998e64b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR is adding integration tests to all languages to check query inclusion in query suites. The tests rely on changes to the internal repo, so integration tests are expected to be failing.