mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Merge pull request #59464 from dixudx/fix_all_typos
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>. fix all the typos across the project **What this PR does / why we need it**: There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient. This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: /sig testing /area test-infra /sig release /cc @ixdy /assign @fejta **Release note**: ```release-note None ```
This commit is contained in:
@@ -109,7 +109,7 @@ var _ timer = realTimer{}
|
||||
// multiple runs are serialized. If the function needs to hold locks, it must
|
||||
// take them internally.
|
||||
//
|
||||
// Runs of the funtion will have at least minInterval between them (from
|
||||
// Runs of the function will have at least minInterval between them (from
|
||||
// completion to next start), except that up to bursts may be allowed. Burst
|
||||
// runs are "accumulated" over time, one per minInterval up to burstRuns total.
|
||||
// This can be used, for example, to mitigate the impact of expensive operations
|
||||
|
||||
@@ -70,7 +70,7 @@ func TestFileUtils(t *testing.T) {
|
||||
t.Fatal("Failed to test: failed to change work dir.")
|
||||
}
|
||||
|
||||
// recover test enviroment
|
||||
// recover test environment
|
||||
defer RecoverEnv(currentDir, tmpDir)
|
||||
|
||||
t.Run("TestFileExists", func(t *testing.T) {
|
||||
|
||||
@@ -97,8 +97,8 @@ func (*FakeIPTables) AddReloadFunc(reloadFunc func()) {}
|
||||
|
||||
func (*FakeIPTables) Destroy() {}
|
||||
|
||||
func getToken(line, seperator string) string {
|
||||
tokens := strings.Split(line, seperator)
|
||||
func getToken(line, separator string) string {
|
||||
tokens := strings.Split(line, separator)
|
||||
if len(tokens) == 2 {
|
||||
return strings.Split(tokens[1], " ")[0]
|
||||
}
|
||||
|
||||
@@ -35,12 +35,12 @@ func TestVirtualServer(t *testing.T) {
|
||||
}
|
||||
err := fake.AddVirtualServer(vs1)
|
||||
if err != nil {
|
||||
t.Errorf("Fail to add virutal server, error: %v", err)
|
||||
t.Errorf("Fail to add virtual server, error: %v", err)
|
||||
}
|
||||
// Get a specific virtual server
|
||||
got1, err := fake.GetVirtualServer(vs1)
|
||||
if err != nil {
|
||||
t.Errorf("Fail to get virutal server, error: %v", err)
|
||||
t.Errorf("Fail to get virtual server, error: %v", err)
|
||||
}
|
||||
if !vs1.Equal(got1) {
|
||||
t.Errorf("Expect virtual server: %v, got: %v", vs1, got1)
|
||||
@@ -54,12 +54,12 @@ func TestVirtualServer(t *testing.T) {
|
||||
}
|
||||
err = fake.UpdateVirtualServer(vs12)
|
||||
if err != nil {
|
||||
t.Errorf("Fail to update virutal server, error: %v", err)
|
||||
t.Errorf("Fail to update virtual server, error: %v", err)
|
||||
}
|
||||
// Check the updated virtual server
|
||||
got12, err := fake.GetVirtualServer(vs1)
|
||||
if !got12.Equal(vs12) {
|
||||
t.Errorf("Expect virutal server: %v, got: %v", vs12, got12)
|
||||
t.Errorf("Expect virtual server: %v, got: %v", vs12, got12)
|
||||
}
|
||||
// Add another virtual server
|
||||
vs2 := &utilipvs.VirtualServer{
|
||||
@@ -69,20 +69,20 @@ func TestVirtualServer(t *testing.T) {
|
||||
}
|
||||
err = fake.AddVirtualServer(vs2)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error when add virutal server, error: %v", err)
|
||||
t.Errorf("Unexpected error when add virtual server, error: %v", err)
|
||||
}
|
||||
// List all virtual servers
|
||||
list, err := fake.GetVirtualServers()
|
||||
if err != nil {
|
||||
t.Errorf("Fail to list virutal servers, error: %v", err)
|
||||
t.Errorf("Fail to list virtual servers, error: %v", err)
|
||||
}
|
||||
if len(list) != 2 {
|
||||
t.Errorf("Expect 2 virutal servers, got: %d", len(list))
|
||||
t.Errorf("Expect 2 virtual servers, got: %d", len(list))
|
||||
}
|
||||
// Delete a virtual server
|
||||
err = fake.DeleteVirtualServer(vs1)
|
||||
if err != nil {
|
||||
t.Errorf("Fail to delete virutal server: %v, error: %v", vs1, err)
|
||||
t.Errorf("Fail to delete virtual server: %v, error: %v", vs1, err)
|
||||
}
|
||||
// Check the deleted virtual server no longer exists
|
||||
got, _ := fake.GetVirtualServer(vs1)
|
||||
@@ -92,15 +92,15 @@ func TestVirtualServer(t *testing.T) {
|
||||
// Flush all virtual servers
|
||||
err = fake.Flush()
|
||||
if err != nil {
|
||||
t.Errorf("Fail to flush virutal servers, error: %v", err)
|
||||
t.Errorf("Fail to flush virtual servers, error: %v", err)
|
||||
}
|
||||
// List all virtual servers
|
||||
list, err = fake.GetVirtualServers()
|
||||
if err != nil {
|
||||
t.Errorf("Fail to list virutal servers, error: %v", err)
|
||||
t.Errorf("Fail to list virtual servers, error: %v", err)
|
||||
}
|
||||
if len(list) != 0 {
|
||||
t.Errorf("Expect 0 virutal servers, got: %d", len(list))
|
||||
t.Errorf("Expect 0 virtual servers, got: %d", len(list))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func TestRealServer(t *testing.T) {
|
||||
}
|
||||
err := fake.AddVirtualServer(vs)
|
||||
if err != nil {
|
||||
t.Errorf("Fail to add virutal server, error: %v", err)
|
||||
t.Errorf("Fail to add virtual server, error: %v", err)
|
||||
}
|
||||
// Add real server to the virtual server
|
||||
for i := range rss {
|
||||
@@ -138,7 +138,7 @@ func TestRealServer(t *testing.T) {
|
||||
t.Errorf("Fail to get real servers of the virtual server, error: %v", err)
|
||||
}
|
||||
if len(list) != rssLen {
|
||||
t.Errorf("Expect %d virutal servers, got: %d", len(rss), len(list))
|
||||
t.Errorf("Expect %d virtual servers, got: %d", len(rss), len(list))
|
||||
}
|
||||
rsToDel := list[i]
|
||||
if err = fake.DeleteRealServer(vs, rsToDel); err != nil {
|
||||
|
||||
@@ -56,7 +56,7 @@ func (m *execMounter) Mount(source string, target string, fstype string, options
|
||||
return m.doExecMount(source, target, fstype, options)
|
||||
}
|
||||
|
||||
// doExecMount calls exec(mount <waht> <where>) using given exec interface.
|
||||
// doExecMount calls exec(mount <what> <where>) using given exec interface.
|
||||
func (m *execMounter) doExecMount(source, target, fstype string, options []string) error {
|
||||
glog.V(5).Infof("Exec Mounting %s %s %s %v", source, target, fstype, options)
|
||||
mountArgs := makeMountArgs(source, target, fstype, options)
|
||||
|
||||
@@ -260,7 +260,7 @@ func isBind(options []string) (bool, []string) {
|
||||
// TODO: this is a workaround for the unmount device issue caused by gci mounter.
|
||||
// In GCI cluster, if gci mounter is used for mounting, the container started by mounter
|
||||
// script will cause additional mounts created in the container. Since these mounts are
|
||||
// irrelavant to the original mounts, they should be not considered when checking the
|
||||
// irrelevant to the original mounts, they should be not considered when checking the
|
||||
// mount references. Current solution is to filter out those mount paths that contain
|
||||
// the string of original mount path.
|
||||
// Plan to work on better approach to solve this issue.
|
||||
|
||||
@@ -70,7 +70,7 @@ func New(mounterPath string) Interface {
|
||||
}
|
||||
|
||||
// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must
|
||||
// be an emtpy string in case it's not required, e.g. for remount, or for auto filesystem
|
||||
// be an empty string in case it's not required, e.g. for remount, or for auto filesystem
|
||||
// type, where kernel handles fstype for you. The mount 'options' is a list of options,
|
||||
// currently come from mount(8), e.g. "ro", "remount", "bind", etc. If no more option is
|
||||
// required, call Mount with an empty string list or nil.
|
||||
@@ -314,7 +314,7 @@ func exclusiveOpenFailsOnDevice(pathname string) (bool, error) {
|
||||
}
|
||||
|
||||
if !isDevice {
|
||||
glog.Errorf("Path %q is not refering to a device.", pathname)
|
||||
glog.Errorf("Path %q is not referring to a device.", pathname)
|
||||
return false, nil
|
||||
}
|
||||
fd, errno := unix.Open(pathname, unix.O_RDONLY|unix.O_EXCL, 0)
|
||||
|
||||
Reference in New Issue
Block a user