Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #884 +/- ##
==========================================
+ Coverage 35.70% 36.04% +0.33%
==========================================
Files 303 303
Lines 34250 34265 +15
Branches 5917 5918 +1
==========================================
+ Hits 12230 12350 +120
+ Misses 21458 21350 -108
- Partials 562 565 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pieqq
left a comment
There was a problem hiding this comment.
I remember our conversation about this. Thanks for the PR!
We now require every test script in the providers to have enough test coverage. This script has none.
At the very least, the changes that you made should be tested. I usually tell contributors to just test the function(s) they modified (or created), but in this case, your changes are in main(), and main() is most of this script!
You can try to split the part that you modified and make it its own function, and then write unit tests for this function. See our contrib guide for more info, or don't hesitate to ping me if you need help.
pieqq
left a comment
There was a problem hiding this comment.
Looks good! I think you can reduce the sample data file to the bare minimum required to run your tests, but it's not a big deal anyway.
Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
As describe in this snap doc[1], to access to host’s snap-related files, it's now have to access via /var/lib/snapd/hostfs. This system-backup interface gives privileged read-only access to system data. The change can be traced back to snapd 2.36. [1] https://snapcraft.io/docs/the-system-backup-interface * fix snap boot kernel path * add comment for reference * add unit test for boot_mode_test_snappy.py * amend for flake8 check * remove unnecessary test data Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com> --------- Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
As describe in this snap doc[1], to access to host’s snap-related files, it's now have to access via /var/lib/snapd/hostfs. This system-backup interface gives privileged read-only access to system data. The change can be traced back to snapd 2.36. [1] https://snapcraft.io/docs/the-system-backup-interface * fix snap boot kernel path * add comment for reference * add unit test for boot_mode_test_snappy.py * amend for flake8 check * remove unnecessary test data Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com> --------- Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
Description
As describe in this snap doc, to access to host’s snap-related files, it's now have to access via
/var/lib/snapd/hostfs. Thissystem-backupinterface gives privileged read-only access to system data. The change can be traced back to snapd 2.36.Resolved issues
Resolve failed test case
miscellanea/secure_boot_mode_kdrp-kdrp-k4500-gadgetin denver SUV test.Documentation
The test case impacted is
miscellanea/secure_boot_mode_{gadget}. Confirmed with QA that the most of the IoT projects use their own project checkboxs, which already include this boot kernel path change inboot_mode_test_snappy.py. The only exception is denver project, that its provider usesboot_mode_test_snappy.pyin general checkbox provider. Other than that,miscellanea/secure_boot_mode_{gadget}is not included in any test plan in checkbox itself,Tests
Test on
denver-keurig-001with side-loaded checkbox.