mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-19 20:26:32 +00:00
enabled and fixed the errcheck linter rule
This commit is contained in:
@@ -103,7 +103,9 @@ func TestNewPluginRun(t *testing.T) {
|
||||
utMeta := v
|
||||
t.Run(desp, func(t *testing.T) {
|
||||
conf := cpmtypes.CustomPluginConfig{}
|
||||
(&conf).ApplyConfiguration()
|
||||
if err := (&conf).ApplyConfiguration(); err != nil {
|
||||
t.Errorf("Failed to apply configuration: %v", err)
|
||||
}
|
||||
p := Plugin{config: conf}
|
||||
gotExitStatus, gotOutput := p.run(utMeta.Rule)
|
||||
// cut at position max_output_length if expected output is longer than max_output_length bytes
|
||||
|
||||
@@ -219,7 +219,9 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
|
||||
}
|
||||
|
||||
for desp, utMeta := range utMetas {
|
||||
(&utMeta.Orig).ApplyConfiguration()
|
||||
if err := (&utMeta.Orig).ApplyConfiguration(); err != nil {
|
||||
t.Errorf("Error in apply configuration for %q: %v", desp, err)
|
||||
}
|
||||
if !reflect.DeepEqual(utMeta.Orig, utMeta.Wanted) {
|
||||
t.Errorf("Error in apply configuration for %q", desp)
|
||||
t.Errorf("Wanted: %+v. \nGot: %+v", utMeta.Wanted, utMeta.Orig)
|
||||
|
||||
Reference in New Issue
Block a user