runtime: Rename constraintGRPCSpec to improve grammar

"constraint" is a noun, "constrain" is the associated verb, which makes
more sense in this context.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2021-10-08 17:07:42 +11:00
parent 57ab408576
commit d9e2e9edb2
2 changed files with 6 additions and 6 deletions

View File

@ -995,7 +995,7 @@ func (k *kataAgent) replaceOCIMountsForStorages(spec *specs.Spec, volumeStorages
return nil return nil
} }
func (k *kataAgent) constraintGRPCSpec(grpcSpec *grpc.Spec, passSeccomp bool) { func (k *kataAgent) constrainGRPCSpec(grpcSpec *grpc.Spec, passSeccomp bool) {
// Disable Hooks since they have been handled on the host and there is // Disable Hooks since they have been handled on the host and there is
// no reason to send them to the agent. It would make no sense to try // no reason to send them to the agent. It would make no sense to try
// to apply them on the guest. // to apply them on the guest.
@ -1411,9 +1411,9 @@ func (k *kataAgent) createContainer(ctx context.Context, sandbox *Sandbox, c *Co
passSeccomp := !sandbox.config.DisableGuestSeccomp && sandbox.seccompSupported passSeccomp := !sandbox.config.DisableGuestSeccomp && sandbox.seccompSupported
// We need to constraint the spec to make sure we're not passing // We need to constrain the spec to make sure we're not
// irrelevant information to the agent. // passing irrelevant information to the agent.
k.constraintGRPCSpec(grpcSpec, passSeccomp) k.constrainGRPCSpec(grpcSpec, passSeccomp)
req := &grpc.CreateContainerRequest{ req := &grpc.CreateContainerRequest{
ContainerId: c.id, ContainerId: c.id,

View File

@ -541,7 +541,7 @@ func TestAppendVhostUserBlkDevices(t *testing.T) {
updatedDevList, expected) updatedDevList, expected)
} }
func TestConstraintGRPCSpec(t *testing.T) { func TestConstrainGRPCSpec(t *testing.T) {
assert := assert.New(t) assert := assert.New(t)
expectedCgroupPath := "/foo/bar" expectedCgroupPath := "/foo/bar"
@ -589,7 +589,7 @@ func TestConstraintGRPCSpec(t *testing.T) {
} }
k := kataAgent{} k := kataAgent{}
k.constraintGRPCSpec(g, true) k.constrainGRPCSpec(g, true)
// check nil fields // check nil fields
assert.Nil(g.Hooks) assert.Nil(g.Hooks)