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
pkg/utils: add utils_test #736
Conversation
pkg/utils/utils_test.go
Outdated
|
||
for _, tt := range testData { | ||
err := ValidateContainerID(tt.containerID) | ||
if err != nil && !tt.err { |
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.
Could you help to use DeepEqual to squash these lines?
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.
They are different structure types, and it seems that it is not suitable to use DeepEqual. If they are changed to agree types and then compared, more code will be generated.
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.
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.
updated, thanks for your suggestions. PTAL
BTW, commits need to be squashed either. |
35cc4d9
to
025e32f
Compare
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
/lgtm |
Add corresponding unit tests to the functions in util.go.
Signed-off-by: Zhou Hao zhouhao@cn.fujitsu.com