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

Adding metabox tests to packaging (Infra) #960

Merged
merged 7 commits into from
Jan 23, 2024

Conversation

fernando79513
Copy link
Collaborator

@fernando79513 fernando79513 commented Jan 22, 2024

Description

As a followup to #909, We have implemented a new metabox tests that checks that a "packaging.pxu" file produces the correct output "substvar" file with the propper dependencies.

This new test takes a more E2E approach as suggested. Now, we run the test directly from the scenario without having to all any external python script. For that purpose, we have added two new more actions:

  • RunManage(): launches the manage.py script with some arguments.
  • AssertInFile(): checks that some regex pattern is present in a file.

Resolved issues

Closes https://warthogs.atlassian.net/browse/CHECKBOX-1156

Documentation

No changes to the documentation

Tests

To run the tests:

  • metabox configs/local-source-18.04.py --tag packaging: the test should not pass in bionic
  • metabox configs/local-source-20.04.py --tag packaging: the test should pass in focal
  • metabox configs/local-source-22.04.py --tag packaging: the test should pass in jammy

@fernando79513 fernando79513 force-pushed the adding-metabox-tests-to-packaging branch from c3d52ef to bb03eae Compare January 22, 2024 15:47
@fernando79513 fernando79513 changed the title Adding metabox tests to packaging Adding metabox tests to packaging (Infra) Jan 22, 2024
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (130710d) 39.19% compared to head (05ce2b9) 39.19%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #960   +/-   ##
=======================================
  Coverage   39.19%   39.19%           
=======================================
  Files         315      315           
  Lines       34898    34898           
  Branches     5972     5972           
=======================================
  Hits        13679    13679           
  Misses      20608    20608           
  Partials      611      611           
Flag Coverage Δ
checkbox-ng 65.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@fernando79513 fernando79513 force-pushed the adding-metabox-tests-to-packaging branch from bb03eae to 4f63223 Compare January 22, 2024 15:57
Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

Just one major comment, the rest you can take it or leave it

metabox/metabox/core/scenario.py Outdated Show resolved Hide resolved
metabox/metabox/core/scenario.py Show resolved Hide resolved
metabox/metabox/scenarios/packaging/deb_packaging.py Outdated Show resolved Hide resolved
metabox/metabox/scenarios/packaging/deb_packaging.py Outdated Show resolved Hide resolved
metabox/metabox/scenarios/packaging/deb_packaging.py Outdated Show resolved Hide resolved
metabox/metabox/scenarios/packaging/deb_packaging.py Outdated Show resolved Hide resolved
metabox/metabox/scenarios/packaging/deb_packaging.py Outdated Show resolved Hide resolved
metabox/metabox/core/scenario.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

+1, ty, keep in mind that possible followup

@fernando79513 fernando79513 removed the request for review from kissiel January 23, 2024 18:18
@fernando79513 fernando79513 merged commit 5a26768 into main Jan 23, 2024
17 checks passed
@fernando79513 fernando79513 deleted the adding-metabox-tests-to-packaging branch January 23, 2024 18:19
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Mar 20, 2024
* Added new metabox test for packaging versions

This test makes sure that the current packaging driver is
applicable for a specific os version.

* Added assert in file

* Fixed run_manage and assert_in_file actions

* Cleaned previous implementation of the tests

* Apply suggestions from code review

Co-authored-by: Massimiliano <[email protected]>

* Applied the rest of the PR comments

* Added a Xenial scenario

---------

Co-authored-by: Massimiliano <[email protected]>
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
* Added new metabox test for packaging versions

This test makes sure that the current packaging driver is
applicable for a specific os version.

* Added assert in file

* Fixed run_manage and assert_in_file actions

* Cleaned previous implementation of the tests

* Apply suggestions from code review

Co-authored-by: Massimiliano <[email protected]>

* Applied the rest of the PR comments

* Added a Xenial scenario

---------

Co-authored-by: Massimiliano <[email protected]>
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