Skip to content

Commit

Permalink
Change validation to include zero.
Browse files Browse the repository at this point in the history
Signed-off-by: aknishid <koco155@gmail.com>
  • Loading branch information
aknishid committed Jan 8, 2025
1 parent 116bd00 commit ac793a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/manager/index/service/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func New(opts ...Option) (idx Indexer, err error) {
}
i.indexing.Store(false)
i.saving.Store(false)
if i.indexDuration < 0 && i.indexDurationLimit < 0 && i.saveIndexDurationLimit < 0 {
if i.indexDuration <= 0 && i.indexDurationLimit <= 0 && i.saveIndexDurationLimit <= 0 {

Check warning on line 79 in pkg/manager/index/service/indexer.go

View check run for this annotation

Codecov / codecov/patch

pkg/manager/index/service/indexer.go#L79

Added line #L79 was not covered by tests
return nil, errors.ErrInvalidConfig
}
return i, nil
Expand Down

0 comments on commit ac793a5

Please sign in to comment.