mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-18 02:36:36 +00:00
chore: release 0.29.0.rc0 (#1600)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package perflib
|
||||
|
||||
import (
|
||||
"io"
|
||||
"log/slog"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/go-kit/log"
|
||||
)
|
||||
|
||||
type simple struct {
|
||||
@@ -114,11 +114,14 @@ func TestUnmarshalPerflib(t *testing.T) {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
|
||||
output := make([]simple, 0)
|
||||
err := UnmarshalObject(c.obj, &output, log.NewNopLogger())
|
||||
|
||||
err := UnmarshalObject(c.obj, &output, logger)
|
||||
if err != nil && !c.expectError {
|
||||
t.Errorf("Did not expect error, got %q", err)
|
||||
}
|
||||
|
||||
if err == nil && c.expectError {
|
||||
t.Errorf("Expected an error, but got ok")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user