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 ?
Solves kubernetes/node-problem-detector#163
2. How does this change address the issue ?
Unit testing for node-problem-detector/cmd/options is yet to be
done and the corresponding package path needs to be included in makefile
test
3. How to verify this change ?
make test command should run the test TestSetNodeNameOrDie with admin
privileges.
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>
This modifies pattern for catching cpp problem messages produced by
ABRT. Found that not all mentioned messages fit into former pattern.
For example following is valid cpp problem message produced by ABRT:
Process xxx (bad_binary) crashed in Will::Fail::a() [clone .isra.2]()
but doesn't fit former pattern, since it's last part contains
whitespaces.