mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-04 02:37:39 +00:00
fix all the typos across the project
Kubernetes-commit: 48388fec7eaad4ac8d84fbe20673ffacf41964a1
This commit is contained in:
parent
33bd23f75b
commit
d39d12f4b0
@ -192,7 +192,7 @@ func Test_tokenSource_applicationDefaultCredentials(t *testing.T) {
|
|||||||
t.Fatalf("failed to get a token source: %+v", err)
|
t.Fatalf("failed to get a token source: %+v", err)
|
||||||
}
|
}
|
||||||
if ts == nil {
|
if ts == nil {
|
||||||
t.Fatal("returned nil token soruce")
|
t.Fatal("returned nil token source")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ func TestCreateBackoffManager(t *testing.T) {
|
|||||||
backoff.UpdateBackoff(theUrl, nil, 500)
|
backoff.UpdateBackoff(theUrl, nil, 500)
|
||||||
backoff = readExpBackoffConfig()
|
backoff = readExpBackoffConfig()
|
||||||
if backoff.CalculateBackoff(theUrl)/time.Second != 0 {
|
if backoff.CalculateBackoff(theUrl)/time.Second != 0 {
|
||||||
t.Errorf("Zero backoff duration, but backoff still occuring.")
|
t.Errorf("Zero backoff duration, but backoff still occurring.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// No env -> No backoff.
|
// No env -> No backoff.
|
||||||
|
@ -107,7 +107,7 @@ func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) {
|
|||||||
// ClientConfig implements ClientConfig
|
// ClientConfig implements ClientConfig
|
||||||
func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) {
|
func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) {
|
||||||
// check that getAuthInfo, getContext, and getCluster do not return an error.
|
// check that getAuthInfo, getContext, and getCluster do not return an error.
|
||||||
// Do this before checking if the curent config is usable in the event that an
|
// Do this before checking if the current config is usable in the event that an
|
||||||
// AuthInfo, Context, or Cluster config with user-defined names are not found.
|
// AuthInfo, Context, or Cluster config with user-defined names are not found.
|
||||||
// This provides a user with the immediate cause for error if one is found
|
// This provides a user with the immediate cause for error if one is found
|
||||||
configAuthInfo, err := config.getAuthInfo()
|
configAuthInfo, err := config.getAuthInfo()
|
||||||
|
@ -94,7 +94,7 @@ func TestInsecureOverridesCA(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMergeContext(t *testing.T) {
|
func TestMergeContext(t *testing.T) {
|
||||||
const namespace = "overriden-namespace"
|
const namespace = "overridden-namespace"
|
||||||
|
|
||||||
config := createValidTestConfig()
|
config := createValidTestConfig()
|
||||||
clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil)
|
clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil)
|
||||||
|
@ -260,7 +260,7 @@ func testTryAcquireOrRenew(t *testing.T, objectType string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if test.expectSuccess != le.tryAcquireOrRenew() {
|
if test.expectSuccess != le.tryAcquireOrRenew() {
|
||||||
t.Errorf("[%v]unexpected result of tryAcquireOrRenew: [succeded=%v]", i, !test.expectSuccess)
|
t.Errorf("[%v]unexpected result of tryAcquireOrRenew: [succeeded=%v]", i, !test.expectSuccess)
|
||||||
}
|
}
|
||||||
|
|
||||||
le.observedRecord.AcquireTime = metav1.Time{}
|
le.observedRecord.AcquireTime = metav1.Time{}
|
||||||
|
@ -179,7 +179,7 @@ func TestGetListener(t *testing.T) {
|
|||||||
t.Errorf("Test case #%d failed: Listener does not listen on expected address: asked '%v' got '%v'", i, testCase.ExpectedListenerAddress, host)
|
t.Errorf("Test case #%d failed: Listener does not listen on expected address: asked '%v' got '%v'", i, testCase.ExpectedListenerAddress, host)
|
||||||
}
|
}
|
||||||
if port != expectedListenerPort {
|
if port != expectedListenerPort {
|
||||||
t.Errorf("Test case #%d failed: Listener does not listen on exepected port: asked %v got %v", i, expectedListenerPort, port)
|
t.Errorf("Test case #%d failed: Listener does not listen on expected port: asked %v got %v", i, expectedListenerPort, port)
|
||||||
|
|
||||||
}
|
}
|
||||||
listener.Close()
|
listener.Close()
|
||||||
|
@ -190,7 +190,7 @@ func TestStructInput(t *testing.T) {
|
|||||||
{"nonexistent field", "{.hello}", storeData, "hello is not found", false},
|
{"nonexistent field", "{.hello}", storeData, "hello is not found", false},
|
||||||
{"invalid array", "{.Labels[0]}", storeData, "map[string]int is not array or slice", false},
|
{"invalid array", "{.Labels[0]}", storeData, "map[string]int is not array or slice", false},
|
||||||
{"invalid filter operator", "{.Book[?(@.Price<>10)]}", storeData, "unrecognized filter operator <>", false},
|
{"invalid filter operator", "{.Book[?(@.Price<>10)]}", storeData, "unrecognized filter operator <>", false},
|
||||||
{"redundent end", "{range .Labels.*}{@}{end}{end}", storeData, "not in range, nothing to end", false},
|
{"redundant end", "{range .Labels.*}{@}{end}{end}", storeData, "not in range, nothing to end", false},
|
||||||
}
|
}
|
||||||
testFailJSONPath(failStoreTests, t)
|
testFailJSONPath(failStoreTests, t)
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ type waitFor struct {
|
|||||||
|
|
||||||
// waitForPriorityQueue implements a priority queue for waitFor items.
|
// waitForPriorityQueue implements a priority queue for waitFor items.
|
||||||
//
|
//
|
||||||
// waitForPriorityQueue implements heap.Interface. The item occuring next in
|
// waitForPriorityQueue implements heap.Interface. The item occurring next in
|
||||||
// time (i.e., the item with the smallest readyAt) is at the root (index 0).
|
// time (i.e., the item with the smallest readyAt) is at the root (index 0).
|
||||||
// Peek returns this minimum item at index 0. Pop returns the minimum item after
|
// Peek returns this minimum item at index 0. Pop returns the minimum item after
|
||||||
// it has been removed from the queue and placed at index Len()-1 by
|
// it has been removed from the queue and placed at index Len()-1 by
|
||||||
|
Loading…
Reference in New Issue
Block a user