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

E2E tests: Increase timeout, update python version, and add LLM scan test #325

Merged
merged 16 commits into from
Mar 17, 2025

Conversation

ccronca
Copy link
Collaborator

@ccronca ccronca commented Mar 12, 2025

This PR improves the e2e testing by increasing the timeout when waiting for Rapidast or Nessus to run, since the images are quite large and take a while to download.

Also, the oobkube test has been updated to run with Python 3.12 when using the rapidast-llm image. It wasn’t working before with Python 3 because the dependencies were only available for Python 3.12.

Lastly, @jeremychoi added an additional e2e test to validate Garak scan functionality.

@ccronca ccronca changed the title Fix garak e2e Improve e2e Tests: Increase Timeout, Update Python Version, and Add LLV Scan Test Mar 12, 2025
@ccronca ccronca changed the title Improve e2e Tests: Increase Timeout, Update Python Version, and Add LLV Scan Test Improve e2e Tests: Increase Timeout, Update Python Version, and Add LLM Scan Test Mar 12, 2025
@ccronca ccronca changed the title Improve e2e Tests: Increase Timeout, Update Python Version, and Add LLM Scan Test E2E tests: Increase timeout, update python version, and add LLM scan test Mar 12, 2025
@ccronca ccronca marked this pull request as ready for review March 12, 2025 14:10
@ccronca ccronca requested a review from a team as a code owner March 12, 2025 14:10
@@ -20,7 +20,9 @@ data:
# if it is "*stdout" or unspecified, the command's standard output will be selected
results: "/tmp/oobtkube.sarif.json" # if None or "*stdout", the command's standard output is selected
# toolDir: scanners/generic/tools
inline: "python3 oobtkube.py --log-level debug -d 60 -p 6000 -i rapidast-oobtkube -f /opt/rapidast/config/cr_example.yaml | tee /tmp/oobtkube.sarif.json"
inline: |
PYTHON_VERSION="${PYTHON_VERSION:-python3}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not for this PR, as an aside, should we bump to python3.12 for vanilla rapidast as well, so that both images use the same version?


self.create_from_yaml(f"{self.tempdir}/rapidast-nessus-configmap.yaml")
self.create_from_yaml(f"{self.tempdir}/rapidast-nessus-pod.yaml")
wait_until_ready(field_selector="metadata.name=rapidast-nessus")
# @FIX: We don't assert the container's successful completion because it
Copy link
Collaborator

Choose a reason for hiding this comment

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

:O Does this mean the nessus test should have been failing for some time already?

Copy link
Collaborator Author

@ccronca ccronca Mar 13, 2025

Choose a reason for hiding this comment

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

Well, this test doesn’t assert much, it only retrieves logs from the RapiDAST container. While the container does generate logs, it ends with an error. It would be better to update the test to at least assert that the container completes successfully, it should have a simple solution, just remove the 'authentication' part of the config file.

I'll take care of it in a future PR (#327)

@sfowl
Copy link
Collaborator

sfowl commented Mar 14, 2025

Just to clarify so I understand right, with this change the following e2e tests will run?

  • rapidast-e2e / rapidast: runs non-llm tests with vanilla image
  • rapidast-e2e / rapidast-llm: runs non-llm tests with llm image
  • rapidast-llm-e2e / rapidast-llm: runs llm tests with llm image

@ccronca
Copy link
Collaborator Author

ccronca commented Mar 14, 2025

Just to clarify so I understand right, with this change the following e2e tests will run?

  • rapidast-e2e / rapidast: runs non-llm tests with vanilla image
  • rapidast-e2e / rapidast-llm: runs non-llm tests with llm image
  • rapidast-llm-e2e / rapidast-llm: runs llm tests with llm image

Correct

Copy link
Collaborator

@jeremychoi jeremychoi left a comment

Choose a reason for hiding this comment

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

lgtm

@ccronca ccronca merged commit e378190 into RedHatProductSecurity:development Mar 17, 2025
10 checks passed
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.

3 participants