Closed HeriLFIU closed 6 months ago
@viniarck I just fixed the issue, once I finish the End-to-End Tests should I also add them to the PR or are they separate?
Is black no longer used? The linter seems to be failing for some reason.
@HeriLFIU, congrats on this contribution. Great bug fix. Regarding e2e, if you post the results here it's fine too. If the existing e2e tests are passing that's already sufficient for this PR.
Now, regarding
black
, this Napp hasn't had it enabled yet, but it's certainly welcome, since you're at it, let's fully addblack
#63, that way the linter errors on scrutinizer will be fixed too. To enableblack
check out an example onflow_manager
's setup.cfg file
@viniarck I successfully added Black, and everything seems to be passing now.
Closes #82 Closes #63
Summary
I found out that the bug described in issue #82 which would not allow someone to create a MW on an existing interface was due to incorrect filtering of links.
This code should be filtering non_existant_links, but instead it is filtering links with interface data. To fix this I made the following changes:
Now it is filtering links with the corresponding link data.
Side Note
Added Black for reformatting and linting.
Local Tests
To make sure that this was issue and that the correct fix was applied I first created the maintenance window, verified that it was running, and made sure that its status was
DOWN
and that the reason for this wasmaintenance
.This is seen in the image below:
The unit tests are also now detecting these sorts of bugs. Four new unit tests were added. Three that test switches, interfaces, and links individually, and one that tests them all together with multiple copies.
As seen in the tests results below, the bug is now being detected by the unit tests:
With the fix, the modified unit tests no longer detect the bug (as it is no longer there), as seen below:
End-to-End Tests
E2E Test Maintenance