Skip to content

Commit

Permalink
chore(storage): fix typo WithMetricsLogInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsong committed Jul 13, 2023
1 parent 9913149 commit f3a79a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/varlogsn/varlogsn.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func parseStorageOptions(c *cli.Context) (opts []storage.Option, err error) {

opts = []storage.Option{
storage.WithDataDBOptions(getStorageDBOptions(0)...),
storage.WithMetrisLogInterval(c.Duration(flagStorageMetricsLogInterval.Name)),
storage.WithMetricsLogInterval(c.Duration(flagStorageMetricsLogInterval.Name)),
}
if c.Bool(flagExperimentalStorageSeparateDB.Name) {
opts = append(opts,
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func WithVerboseLogging() Option {
})
}

func WithMetrisLogInterval(metricsLogInterval time.Duration) Option {
func WithMetricsLogInterval(metricsLogInterval time.Duration) Option {
return newFuncOption(func(cfg *config) {
cfg.metricsLogInterval = metricsLogInterval
})
Expand Down
8 changes: 4 additions & 4 deletions internal/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,25 @@ func TestStorage_New(t *testing.T) {
{
name: "NewAndCloseSeparateDB",
pref: func(t *testing.T, path string) {
s, err := New(WithPath(path), SeparateDatabase(), WithVerboseLogging(), WithMetrisLogInterval(time.Second))
s, err := New(WithPath(path), SeparateDatabase(), WithVerboseLogging(), WithMetricsLogInterval(time.Second))
require.NoError(t, err)
require.NoError(t, s.Close())
},
postf: func(t *testing.T, path string) {
s, err := New(WithPath(path), SeparateDatabase(), WithVerboseLogging(), WithMetrisLogInterval(time.Second))
s, err := New(WithPath(path), SeparateDatabase(), WithVerboseLogging(), WithMetricsLogInterval(time.Second))
require.NoError(t, err)
require.NoError(t, s.Close())
},
},
{
name: "SeparateDBNewAndCloseNotSeparateDB",
pref: func(t *testing.T, path string) {
s, err := New(WithPath(path), WithVerboseLogging(), WithMetrisLogInterval(time.Second))
s, err := New(WithPath(path), WithVerboseLogging(), WithMetricsLogInterval(time.Second))
require.NoError(t, err)
require.NoError(t, s.Close())
},
postf: func(t *testing.T, path string) {
s, err := New(WithPath(path), WithVerboseLogging(), WithMetrisLogInterval(time.Second))
s, err := New(WithPath(path), WithVerboseLogging(), WithMetricsLogInterval(time.Second))
require.NoError(t, err)
require.NoError(t, s.Close())
},
Expand Down

0 comments on commit f3a79a0

Please sign in to comment.