mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-16 02:47:03 +02:00
00c05e82a3
* test:remove testify go mod * tidy go mdo * fix test
22 lines
455 B
Go
22 lines
455 B
Go
package metrics
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestMetrics(t *testing.T) {
|
|
next := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return req.(string) + "https://go-kratos.dev", nil
|
|
}
|
|
_, err := Server()(next)(context.Background(), "test:")
|
|
if err != nil {
|
|
t.Errorf("expect %v, got %v", nil, err)
|
|
}
|
|
|
|
_, err = Client()(next)(context.Background(), "test:")
|
|
if err != nil {
|
|
t.Errorf("expect %v, got %v", nil, err)
|
|
}
|
|
}
|