-
Notifications
You must be signed in to change notification settings - Fork 94
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
Unit testing update #1027
Unit testing update #1027
Conversation
As you can see in the automated unit test log ( https://github.com/libremesh/lime-packages/actions/runs/5101071877/jobs/9169703391 ) there are a lot of other creepy messages, but interestingly they do not result in failed tests.
|
Hey! Great work Ilario!!! I've done some improvements and also one fix. The librerouter test is still failing, I started debugging it but not finished yet. The first step to fix is is to allow mocking the way that the lower interfaces are being detected because the
|
Thanks @spiccinini !!!!! |
This allows to mock from the tests.
hwmode is deprecated since 21.02.2
Tests pass now! So I added some more fixes, please review! I did not tested it in a device, I don't have any until next week |
Awesome work @spiccinini, plenty of fixes here! Thanks!! Just one comment: that is even changing to |
So the best thing would be to find a way to get the type of the interface without relying on the name, right? |
I guess so... It is a lot of work to do, but it is the right thing to do. The dirty solution would be to just check for both |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1027 +/- ##
==========================================
+ Coverage 77.84% 79.27% +1.42%
==========================================
Files 52 53 +1
Lines 4388 4444 +56
==========================================
+ Hits 3416 3523 +107
+ Misses 972 921 -51
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Just did this. |
On #1012 (comment) @spiccinini wrote that we should update the tests for working with the new LibreMesh code, as the tests were broken with the change from supporting OpenWrt 19.07 to OpenWrt 21 and 22.
I managed to fix some issues, but there are two that are still there:
The error comes from this line:
https://github.com/ilario/lime-packages/blob/c3e1b44764094b893e07b3a2bd62c964c7cbe5ee/packages/lime-system/tests/test_lime_network.lua#L100
On the hardware seems that there is no problem, as that @device[0] interface gets created by OpenWrt. In the tests, maaaaaaybe, the interface does not get added because there is no device yet? So that we should add a
uci add network device
somewhere? Where is the right place?The error comes from this line:
https://github.com/ilario/lime-packages/blob/c3e1b44764094b893e07b3a2bd62c964c7cbe5ee/tests/test_lime_config_device.lua#L44