diff --git a/apis/opts/config/ulimit_test.go b/apis/opts/config/ulimit_test.go index 0187c72be..849adf80f 100644 --- a/apis/opts/config/ulimit_test.go +++ b/apis/opts/config/ulimit_test.go @@ -129,7 +129,7 @@ func TestUlimitType(t *testing.T) { t.Run(tt.name, func(t *testing.T) { out := ul.Type() if !tt.wantErr && !reflect.DeepEqual(out, tt.wantStr) { - t.Errorf("Ulimit.String() = %v, want %v", out, tt.wantStr) + t.Errorf("Ulimit.Type() = %v, want %v", out, tt.wantStr) } }) } diff --git a/apis/opts/portbindings.go b/apis/opts/portbindings.go index 44c083372..cc82acf36 100644 --- a/apis/opts/portbindings.go +++ b/apis/opts/portbindings.go @@ -40,7 +40,7 @@ func ValidatePortBinding(portBindings types.PortMap) error { for _, pb := range portBindings[port] { _, err := nat.NewPort(nat.SplitProtoPort(pb.HostPort)) if err != nil { - return fmt.Errorf("invalud port specification: %q, err: %v", pb.HostPort, err) + return fmt.Errorf("invalid port specification: %q, err: %v", pb.HostPort, err) } } } diff --git a/ctrd/image.go b/ctrd/image.go index f5bc8c1e3..1c9d9eedb 100644 --- a/ctrd/image.go +++ b/ctrd/image.go @@ -176,7 +176,7 @@ func (c *Client) importImage(ctx context.Context, importer ctrdmetaimages.Import return imgs, nil } -// FetchImage fetchs image content from the remote repository. +// FetchImage fetches image content from the remote repository. func (c *Client) FetchImage(ctx context.Context, ref string, authConfig *types.AuthConfig, stream *jsonstream.JSONStream) (containerd.Image, error) { wrapperCli, err := c.Get(ctx) if err != nil { diff --git a/test/cli_create_test.go b/test/cli_create_test.go index c884aea1c..7e0bb8708 100644 --- a/test/cli_create_test.go +++ b/test/cli_create_test.go @@ -48,7 +48,7 @@ func (suite *PouchCreateSuite) TestCreateName(c *check.C) { c.Assert(res.Combined(), check.Equals, fmt.Sprintf("%s\n", digStr)) } -// TestCreateNameByImageID is to verify the correctness of creating contaier with specified name by image id. +// TestCreateNameByImageID is to verify the correctness of creating container with specified name by image id. func (suite *PouchCreateSuite) TestCreateNameByImageID(c *check.C) { name := "create-normal-by-image-id" @@ -349,7 +349,7 @@ func (suite *PouchCreateSuite) TestCreateWithUser(c *check.C) { c.Assert(userConfig, check.Equals, user) } -// TestCreateWithIntelRdt tests creating container with Intel Rdt. +// TestCreateWithIntelRdt tests creating container with Intel RDT. func (suite *PouchCreateSuite) TestCreateWithIntelRdt(c *check.C) { name := "TestCreateWithIntelRdt" intelRdt := "L3:=" @@ -387,7 +387,7 @@ func (suite *PouchCreateSuite) TestCreateWithAliOSMemoryOptions(c *check.C) { c.Assert(result[0].HostConfig.ScheLatSwitch, check.Equals, int64(1)) } -// TestCreateWithOOMOption tests creating container with oom options. +// TestCreateWithOOMOption tests creating container with OOM options. func (suite *PouchCreateSuite) TestCreateWithOOMOption(c *check.C) { name := "TestCreateWithOOMOption" oomScore := "100" diff --git a/test/cli_top_test.go b/test/cli_top_test.go index 436ca0028..2864d8f8e 100644 --- a/test/cli_top_test.go +++ b/test/cli_top_test.go @@ -71,7 +71,7 @@ func (suite *PouchTopSuite) TestTopRunningOrPausedContainer(c *check.C) { c.Fatalf("unexpected output %s expected %s", out, expectString) } - // Top a paused contaner is valid + // Top a paused container is valid res = command.PouchRun("pause", name) res.Assert(c, icmd.Success)