-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add steps/network tests #157
Add steps/network tests #157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really clear and simple 🎉
just a couple of notes
Related to liquidmetal-dev#155
973bb9d
to
15f75c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
before you merge, can you make all the common string values variables? for easy changing in future
@Callisto13: Moved all inline strings into constants and added a helper Edit: Aaaand you approved before I could mention you and ask for a new |
I happened to be lurking nearby 👀 |
What this PR does / why we need it:
Testing network interface steps, because it had zero tests and we are before a not so small refactoring, more tests we have, more likely we can catch an error.
While I was working on #144, I found a strange code part and wrote it down as note to check back because it's not a bug, and wanted to verify it shouldn't be executed in any cases, at least my intuition told me that. The easiest way to check, writing test and yes, in out current plan model, it's a dead code.
Which issue(s) this PR fixes:
Related to #155
Special notes for your reviewer:
Added testing for a case that can never happen based on our code, but the intention seems like we want to call it, it just not on the right place or something.
In
core/steps/network/interface_create.go
, in theDo
function, we have this block:The
ShouldDo
returns false if the device is there, so thatif exists { ... }
in theDo
function will never be executed.Checklist: