Skip to content

Commit

Permalink
Merge pull request #61115 from php-coder/psp_fix_provider_error_msgs
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

PSP: fix strategy name in the error messages

**What this PR does / why we need it**:
This PR corrects strategy names in the error messages.
  • Loading branch information
Kubernetes Submit Queue committed Mar 21, 2018
2 parents 01e67e2 + cee37f2 commit 622ad35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/security/podsecuritypolicy/user/mustrunas.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ type mustRunAs struct {
// NewMustRunAs provides a strategy that requires the container to run as a specific UID in a range.
func NewMustRunAs(options *extensions.RunAsUserStrategyOptions) (RunAsUserStrategy, error) {
if options == nil {
return nil, fmt.Errorf("MustRunAsRange requires run as user options")
return nil, fmt.Errorf("MustRunAs requires run as user options")
}
if len(options.Ranges) == 0 {
return nil, fmt.Errorf("MustRunAsRange requires at least one range")
return nil, fmt.Errorf("MustRunAs requires at least one range")
}
return &mustRunAs{
opts: options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,7 @@ func TestCreateProvidersFromConstraints(t *testing.T) {
},
}
},
expectedErr: "MustRunAsRange requires at least one range",
expectedErr: "MustRunAs requires at least one range",
},
}

Expand Down

0 comments on commit 622ad35

Please sign in to comment.