mirror of
https://github.com/go-kratos/kratos.git
synced 2025-04-21 12:16:52 +02:00
19 lines
423 B
Go
19 lines
423 B
Go
|
package metrics
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
"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:")
|
||
|
assert.Equal(t, err, nil)
|
||
|
|
||
|
_, err = Client()(next)(context.Background(), "test:")
|
||
|
assert.Equal(t, err, nil)
|
||
|
}
|