Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1826 +/- ##
==========================================
+ Coverage 50.17% 50.31% +0.14%
==========================================
Files 380 380
Lines 40962 40997 +35
Branches 6883 6877 -6
==========================================
+ Hits 20552 20628 +76
+ Misses 19683 19634 -49
- Partials 727 735 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This modifies the submission format. Can you also modify the submission schema? |
fernando79513
left a comment
There was a problem hiding this comment.
I'll be damned if checkbox is not convoluted.
I was going to ask you to add some tests for the CheckboxINIParser, and I saw the ones from ConfigParser and then got caught into that mess.
Since you are only using the ''to_dict" method here. I think it is okay to skip the unit tests, but I'll still add something like this in test_config.py
@patch("os.path.isfile", return_value=True)
def test_ini_parser(self, _):
ini_data = """
[launcher]
launcher_version = 1
stock_reports = submission_files, text
[test plan]
unit = 2021.com.canonical.certification::pass-and-fail
forced = yes
"""
parser = CheckboxINIParser()
parser.read_string(ini_data)
dict_data = parser.to_dict()
launcher = dict_data.get("launcher")
self.assertEqual(launcher.get("launcher_version"), "1")
self.assertEqual(
launcher.get("stock_reports"), "submission_files, text"
)
test_plan = dict_data.get("test plan")
self.assertEqual(
test_plan.get("unit"),
"2021.com.canonical.certification::pass-and-fail",
)
self.assertEqual(test_plan.get("forced"), "yes")
* Add launcher to the submission * Add the new object to the schema Minor: update authors * Add the field to the submission using the new schema * Reformatted schema using jq * Add unit test for to_dict
* Add launcher to the submission * Add the new object to the schema Minor: update authors * Add the field to the submission using the new schema * Reformatted schema using jq * Add unit test for to_dict
* Add launcher to the submission * Add the new object to the schema Minor: update authors * Add the field to the submission using the new schema * Reformatted schema using jq * Add unit test for to_dict
Description
In order to easily reproduce a test run, one has to know the launcher that created it. This PR changes the submission so that it also contains the launcher. This will make it way easier to spot issues with submissions directly on C3 and without relying on our infra (that may not be the submitter) to pick up the launcher.
TO REVIEW THE SCHEMA: note, I've reformatted the schema using
jqbut I did so in a separate commit, if you want to review my changes, do so excluding that commit for your own sanity's sake!Resolved issues
Fixes: CHECKBOX-1773
Documentation
N/A
Tests
Submission.json
submission_2025-03-27T16.10.59.703034.json