Skip to content

Commit

Permalink
feat(pkg/oomstore): check group category in API Push
Browse files Browse the repository at this point in the history
  • Loading branch information
jinghancc committed Jan 28, 2022
1 parent d25d7d9 commit 0b0e7bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/oomstore/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func (s *OomStore) Push(ctx context.Context, opt types.PushOpt) error {

entity := features[0].Entity()
group := features[0].Group
if group.Category != types.CategoryStream {
return errdefs.Errorf("Push API is for streaming features only")
}
if !stringSliceEqual(features.Names(), featureNames) {
return errdefs.Errorf("FeatureNames %v does not match with group's features %v", featureNames, features.Names())
}
Expand Down

0 comments on commit 0b0e7bc

Please sign in to comment.