Skip to content

Conversation

Ilyesbdlala
Copy link
Member

@Ilyesbdlala Ilyesbdlala commented Mar 15, 2022

This PR removes the scanners` dependency on integration tests located in tests/integration

  • The tests are moved to their corresponding scanner folder (instead of /tests/integration/)
  • The integration-tests makefile target is only overwritten when necessary:
    • by git-repo-scanner: Integration-tests are disabled to avoid GitHub API rate limit
    • by semgrep: to allow the use of a config-map
    • by test-scan: since it has not yet been migrated to the makefile integration-tests template
  • The scanners.mk is changed to make use of the integration-tests located in the $(scanner-name)/integration-tests folder

As a side effect of the transition to the use of makefile. We've had to have a two copies of helpers.js. One in scanners/ folder and the other in tests/integration. The one in tests/integration can be deleted after the migration of the hooks integration tests is complete. (This is why the codeclimate check is unhappy)

Description

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure npm test runs for the whole project.

installed within the scanners directory

This removes the dependency on tests/integration package.json

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
when it's not necessary

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@Ilyesbdlala Ilyesbdlala added maintenance testing Improvements or additions regarding the test setup labels Mar 15, 2022
Ilyesbdlala and others added 6 commits March 15, 2022 11:41
also changed it in the corresponding files
This is done to fix the file dependency issue in CI

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
Signed-off-by: Rami Souai <rami.souai@iteratec.com>
This is to make the CI run successfully again. And is rather irrelevant
since these tests will be migrated in later PRs

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
This is done to include the fix to semgrep integration-tests

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
…anner folders

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
The limitation of the GitHub API rate does not allow to run
these tests in a reasonable amount of time

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@Ilyesbdlala Ilyesbdlala changed the title Maintenance/generic makefile scanners Improves the integration-tests makefile process for scanners Mar 15, 2022
@Ilyesbdlala Ilyesbdlala marked this pull request as ready for review March 15, 2022 16:46
The cascading scan hook tests already include this use-case

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@Ilyesbdlala Ilyesbdlala added the planned Issues we will do in the next sprint. label Mar 16, 2022
@Weltraumschaf Weltraumschaf self-requested a review March 16, 2022 15:00
@Weltraumschaf Weltraumschaf merged commit ef300f6 into main Mar 17, 2022
@Weltraumschaf Weltraumschaf deleted the maintenance/generic-makefile-scanners branch March 17, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance planned Issues we will do in the next sprint. testing Improvements or additions regarding the test setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants