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

Added Qemu automatic tests #615

Merged
merged 5 commits into from
May 7, 2024
Merged

Conversation

nesitor
Copy link
Member

@nesitor nesitor commented May 3, 2024

Feature: Added automatic tests to check if Qemu runs, also with network interface.
The tests bypass systemd manager to reduce complexity.
In later tests we will test the entire flow also using systemd.

@nesitor nesitor requested review from olethanh, hoh and Antonyjin May 3, 2024 13:17
@nesitor nesitor self-assigned this May 3, 2024
Copy link

github-actions bot commented May 3, 2024

Failed to retrieve llama text: POST 504:

504 Gateway Time-out


The server didn't respond in time.

Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 92.50000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 51.71%. Comparing base (c942e27) to head (782e002).

Files Patch % Lines
src/aleph/vm/controllers/__main__.py 54.54% 5 Missing ⚠️
tests/supervisor/test_qemu_instance.py 96.96% 2 Missing and 1 partial ⚠️
src/aleph/vm/models.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #615      +/-   ##
==========================================
+ Coverage   44.82%   51.71%   +6.89%     
==========================================
  Files          55       57       +2     
  Lines        5033     5147     +114     
  Branches      589      591       +2     
==========================================
+ Hits         2256     2662     +406     
+ Misses       2654     2355     -299     
- Partials      123      130       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nesitor nesitor merged commit d26888f into main May 7, 2024
23 checks passed
nesitor added a commit that referenced this pull request May 27, 2024
* Feature: Added automatic tests to check if QEmu runs.

* Fix: Added code quality fixes.

* Testing basic instance
Adding a test that start and stop a simple fake instance

* Adding a test to create a simple instance
Creating an instance locally using fake_data and checks if the execution start
and stop properly.
Doing the same checks with the VM created.

* Fix: Black test did not pass
Black check was failing

Solution: Use black to format bad files

* Fix: isort test did not pass

isort check was failing

Solution: Use isort to format bad files

* Added Qemu automatic tests (#615)

* Feature: Added automatic tests to check if QEmu runs.

* Fix: Added code quality fixes.

* Fix: Changed runtime generation script name.

* Fix: Solve conflicts with main branch.

* Fix: ruff test did not pass

ruff check was failing

Solution: Use ruff to format bad files

* Fix: Branch `main` could not be tested easily

This deploys the main branch automatically on the staging servers for system testing.

* Fix: Unkwnown hashes raised exception

Problem: Many crawlers called URLs that do not exist on CRNs.

The current implementation raises an error when the hash of the VM cannot be found, which fills the logs on Sentry.

Solution: Return an HTTP Not Found status instead.

* Fix: Mypy was failing
mypy was failing because I tried to stop an execution but did not
checked if there was an existing execution

Solution: Check first if there an execution and then stop and shutdown

* Fix: Wrong image name inside the workflow

* Fix: Wrong debian executable name inside workflow

* Feature: Added automatic tests to check if QEmu runs.

* Fix: Added code quality fixes.

* Rebasing from main

* Testing basic instance
Adding a test that start and stop a simple fake instance

* Adding a test to create a simple instance
Creating an instance locally using fake_data and checks if the execution start
and stop properly.
Doing the same checks with the VM created.

* Fix: Black test did not pass
Black check was failing

Solution: Use black to format bad files

* Fix: isort test did not pass

isort check was failing

Solution: Use isort to format bad files

* Fix: ruff test did not pass

ruff check was failing

Solution: Use ruff to format bad files

* Fix: Mypy was failing
mypy was failing because I tried to stop an execution but did not
checked if there was an existing execution

Solution: Check first if there an execution and then stop and shutdown

* Rebasing from main

* Fix: Incorrect path given in the workflow

* Fix: Test use unknown user
Instance test try to chmod a user named jailman that
did not exist

Solution: Creating the user jailman

* unit test job cancelled, push again to check it

* Fix: Job to create user jailman now is inside another job
This job to create a new user do not need hes own job, we could
just insert it in a previous job

---------

Co-authored-by: Andres D. Molins <[email protected]>
Co-authored-by: ajin <[email protected]>
Co-authored-by: Hugo Herter <[email protected]>
@Psycojoker Psycojoker deleted the andres-test-implement_qemu_tests branch July 24, 2024 15:36
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