Skip to content
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

[STAL-2820] feat: add end-to-end testing for R, Rust, and SQL #505

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

amaanq
Copy link
Collaborator

@amaanq amaanq commented Aug 30, 2024

What problem are you trying to solve?

We've added support for several new languages in the analyzer, but we haven't added proper end-to-end testing to ensure that we can write rules in the rule editor for these languages, retrieve them from the backend, run them in the analyzer, and get some number of results back.

What is your solution?

This PR adds 3 integration test files, named integration-test-{lang}.sh which incorporate the same logic as the other currently existing integration scripts. It downloads a repository that is a project written mostly in the target language, writes a config file to use the {lang}-inclusive and {lang}-code-style rulesets in the cloned path, and executes the analyzer in this path. Each language has a function-name-min-length and comments rule which are in the code-style and inclusive rulesets for each language. We expect to get at least two results in each case; currently the R repo has 10 results, the Rust one 9, and the SQL one 27. While there might be slight variation in the number of results over time as the repository changes, we're not likely to see this number go below 2.

These three integration test scripts have been added to the integration-tests GitHub CI job as well to check for any regressions/issues.

Alternatives considered

What the reviewer should know

@amaanq amaanq requested a review from a team as a code owner August 30, 2024 19:12
@amaanq amaanq merged commit 6445f55 into main Sep 5, 2024
70 checks passed
@jasonforal jasonforal deleted the e2e-tests branch November 8, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants