12345678910111213141516 |
- package internal
- import (
- "testing"
- "git.i2edu.net/i2/go-zero/core/stat"
- "github.com/stretchr/testify/assert"
- )
- func TestWithMetrics(t *testing.T) {
- metrics := stat.NewMetrics("foo")
- opt := WithMetrics(metrics)
- var options rpcServerOptions
- opt(&options)
- assert.Equal(t, metrics, options.metrics)
- }
|