mirror of
https://github.com/go-kratos/kratos.git
synced 2025-04-13 11:50:53 +02:00
* fix lint check * fix lll lint error * fix build error * fix gomnd * fix shadow declaration * add make test command * update
20 lines
424 B
Go
20 lines
424 B
Go
package metrics
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
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)
|
|
}
|