"log/slog"
"net/http"
"net/http/httptest"
- "reflect"
"sort"
"testing"
"time"
for _, m := range dfp.Metrics {
_, ok := names[m.Name]
assert.True(t, ok)
- assert.True(t, reflect.DeepEqual(*m.MetricConfig, *(names[m.Name])))
+ assert.Equal(t, *(names[m.Name]), *m.MetricConfig)
}
}
package seven
import (
- "reflect"
"testing"
+ "github.com/stretchr/testify/assert"
+
flowpb "github.com/cilium/cilium/api/v1/flow"
"github.com/cilium/cilium/pkg/hubble/defaults"
"github.com/cilium/cilium/pkg/hubble/parser/options"
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := decodeKafka(tt.args.flowType, tt.args.kafka, tt.args.opts)
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("decodeKafka() = %v, want %v", got, tt.want)
- }
+ assert.Equal(t, tt.want, got)
})
}
}