-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix(node_manager): lowercase owner for discord #2188
Conversation
@@ -78,6 +78,11 @@ pub async fn add_node( | |||
check_port_availability(port_option, &node_registry.nodes)?; | |||
} | |||
|
|||
let owner = match &options.owner { | |||
Some(owner) => Some(owner.to_lowercase()), |
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.
shall we raise a warning here in case an UpperCase
input detected ?
at least a warning log
?
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.
Good idea.
Hey mazzi, The node manager has a test suite. It would be nice if we could add a test case for this. The tests can be a bit unwieldy though because they use a lot of mocking and stuff, so if it's too much hassle, don't worry about it. |
I've modified an existing test. I didn't wanted to copy past the one that I've modified. |
Right, thanks. However, wouldn't it need an assertion that the assigned value is in lowercase? |
The assertion was already there. I just modified the input. Please check the whole test. |
Ah ok cool, sorry. Approved. |
Description
We use owner in lowercase to be able to compute scores accordingly on Discord.
Related https://github.com/maidsafe/dags-service/pull/7
Related #2180