mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Fix strategy name in the error messages.
This commit is contained in:
parent
a7d6340ad2
commit
cee37f2f72
@ -33,10 +33,10 @@ type mustRunAs struct {
|
|||||||
// NewMustRunAs provides a strategy that requires the container to run as a specific UID in a range.
|
// NewMustRunAs provides a strategy that requires the container to run as a specific UID in a range.
|
||||||
func NewMustRunAs(options *extensions.RunAsUserStrategyOptions) (RunAsUserStrategy, error) {
|
func NewMustRunAs(options *extensions.RunAsUserStrategyOptions) (RunAsUserStrategy, error) {
|
||||||
if options == nil {
|
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 {
|
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{
|
return &mustRunAs{
|
||||||
opts: options,
|
opts: options,
|
||||||
|
@ -1954,7 +1954,7 @@ func TestCreateProvidersFromConstraints(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
expectedErr: "MustRunAsRange requires at least one range",
|
expectedErr: "MustRunAs requires at least one range",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user