Automate wake-on-LAN tests (New)#1686
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1686 +/- ##
==========================================
+ Coverage 49.63% 49.87% +0.24%
==========================================
Files 377 379 +2
Lines 40630 40826 +196
Branches 6830 6854 +24
==========================================
+ Hits 20168 20364 +196
Misses 19740 19740
Partials 722 722
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:
|
95d33ee to
abdf0d4
Compare
tomli380576
reviewed
Jan 22, 2025
abdf0d4 to
f5bab48
Compare
2c9c8c5 to
24b89a5
Compare
5e3a584 to
e9de79a
Compare
please refer to wake-on-LAN-automatic-tests.md for more details Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com>
… checkbox. This is because it's not directly called by checkbox and introduces an unnecessary dependency on FastAPI.
…ues on some older python versions. Fix some issues per Stanley's review Add the related unit tests after code changes
Move inline function out of get_ip_mac per Stanley's comments
use more specific 4xx or 5xx status code from wol_server Co-authored-by: stanley31huang <stanley.huang@canonical.com>
Check the return value when get the timestamp to prevent unexpected exception Update related unit tests
5de3d08 to
f259115
Compare
Contributor
Author
|
Thank you @stanley31huang for detailed and helpful reviews. |
pieqq
added a commit
that referenced
this pull request
Mar 24, 2025
stanley31huang
added a commit
that referenced
this pull request
Mar 28, 2025
* Automated the wake-on-LAN tests (New) please refer to wake-on-LAN-automatic-tests.md for more details Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com> * Fix the unit test issue * Remove wol_server.py and place it in a separate repository outside of checkbox. This is because it's not directly called by checkbox and introduces an unnecessary dependency on FastAPI. * remove f-string syntax not be supported in Python 3.5 * Use socket and urllib to replace netifaces and urllib3 since some issues on some older python versions. Fix some issues per Stanley's review Add the related unit tests after code changes * Add a has_wake_on_lan_server manifest per Stanley's comments Move inline function out of get_ip_mac per Stanley's comments * fix some of the new reviews from Stanley * remove unused parameters in wol_check.py use more specific 4xx or 5xx status code from wol_server Co-authored-by: stanley31huang <stanley.huang@canonical.com> * Use the /proc/stat to get the system boot time Check the return value when get the timestamp to prevent unexpected exception Update related unit tests * fix some errors in the Readme --------- Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com> Co-authored-by: stanley31huang <stanley.huang@canonical.com>
stanley31huang
pushed a commit
that referenced
this pull request
Mar 28, 2025
mreed8855
pushed a commit
that referenced
this pull request
Jul 30, 2025
* Automated the wake-on-LAN tests (New) please refer to wake-on-LAN-automatic-tests.md for more details Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com> * Fix the unit test issue * Remove wol_server.py and place it in a separate repository outside of checkbox. This is because it's not directly called by checkbox and introduces an unnecessary dependency on FastAPI. * remove f-string syntax not be supported in Python 3.5 * Use socket and urllib to replace netifaces and urllib3 since some issues on some older python versions. Fix some issues per Stanley's review Add the related unit tests after code changes * Add a has_wake_on_lan_server manifest per Stanley's comments Move inline function out of get_ip_mac per Stanley's comments * fix some of the new reviews from Stanley * remove unused parameters in wol_check.py use more specific 4xx or 5xx status code from wol_server Co-authored-by: stanley31huang <stanley.huang@canonical.com> * Use the /proc/stat to get the system boot time Check the return value when get the timestamp to prevent unexpected exception Update related unit tests * fix some errors in the Readme --------- Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com> Co-authored-by: stanley31huang <stanley.huang@canonical.com>
mreed8855
pushed a commit
that referenced
this pull request
Jul 30, 2025
mreed8855
pushed a commit
that referenced
this pull request
Jul 31, 2025
* Automated the wake-on-LAN tests (New) please refer to wake-on-LAN-automatic-tests.md for more details Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com> * Fix the unit test issue * Remove wol_server.py and place it in a separate repository outside of checkbox. This is because it's not directly called by checkbox and introduces an unnecessary dependency on FastAPI. * remove f-string syntax not be supported in Python 3.5 * Use socket and urllib to replace netifaces and urllib3 since some issues on some older python versions. Fix some issues per Stanley's review Add the related unit tests after code changes * Add a has_wake_on_lan_server manifest per Stanley's comments Move inline function out of get_ip_mac per Stanley's comments * fix some of the new reviews from Stanley * remove unused parameters in wol_check.py use more specific 4xx or 5xx status code from wol_server Co-authored-by: stanley31huang <stanley.huang@canonical.com> * Use the /proc/stat to get the system boot time Check the return value when get the timestamp to prevent unexpected exception Update related unit tests * fix some errors in the Readme --------- Co-authored-by: hanhsuan <32028620+hanhsuan@users.noreply.github.com> Co-authored-by: stanley31huang <stanley.huang@canonical.com>
mreed8855
pushed a commit
that referenced
this pull request
Jul 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automate wake-on-LAN tests (New)
Description
We would like to automate the wake-on-LAN test instead of running manual tests for it.
Please refer to wake-on-LAN-automatic-tests.md in the commit for more details
Resolved issues
Make the Wake-on-LAN test from manual to automatic.
Documentation
wake-on-LAN-automatic-tests.md
Tests
"[wol_S3_auto] Both success": https://certification.canonical.com/submissions/status/300209
"[wol_S3_auto] Cannot connect to the WOL server" : https://certification.canonical.com/submissions/status/300211
"[wol_S3_auto] One of the WOL disabled" : https://certification.canonical.com/submissions/status/300210
"[wol_auto_test] One of NIC has wake-on-LAN issue" : https://certification.canonical.com/submissions/status/300212
"[wake-on-Lan] test for one NIC": https://certification.canonical.com/hardware/202406-34088/submission/408713/