If --system-log-monitors or --custom-plugin-monitors are not
specified, npd gave us unclear message.
This patch adds the validation and clear error message.
1. Why is this change necessary ?
Modify unit testing of options in such a way that we specify
the WantedNodeName
2. How to verify this change ?
Run, make test
Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
1. Why is this change necessary ?
The program avoids changing hostname and the variable name "Options" is changed to
"options". Also, added more comments and formatted. Removed hostname in options since
it will not be changed in tests.
2. How does this change address the issue ?
While the program is being run, the hostname is not changed. And options can't be
accessed outside(not exported).
3. How to verify this change ?
Run, make test
Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
1. Why is this change necessary ?
Added copyright 2018 statement on options_test.go and added space
between // and text on the comments.
Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
1. Why is this change necessary ?
fixes: kubernetes/node-problem-detector#161
2. How does this change address the issue ?
Under package cmd/options, the testing for SetNodeNameOrDie need
to decide Nodename based on environment variable "NODE_NAME" or
hostname or hostnameoverride variable.
3. How to verify this change ?
Run "go test" with admin privilege
Signed-off-by: gkGaneshR <gkganesh126@gmail.com>