You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
423 B
19 lines
423 B
3 years ago
|
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)
|
||
|
}
|