mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-27 03:44:04 +00:00
fix ineffassign and varcheck
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
@@ -244,11 +244,6 @@ var _ = SIGDescribe("Pods", func() {
|
||||
pods, err := podClient.List(context.TODO(), options)
|
||||
framework.ExpectNoError(err, "failed to query for pods")
|
||||
framework.ExpectEqual(len(pods.Items), 0)
|
||||
options = metav1.ListOptions{
|
||||
LabelSelector: selector.String(),
|
||||
ResourceVersion: pods.ListMeta.ResourceVersion,
|
||||
}
|
||||
|
||||
listCompleted := make(chan bool, 1)
|
||||
lw := &cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
|
||||
@@ -78,6 +78,7 @@ var _ = lifecycle.SIGDescribe("[Feature:BootstrapTokens]", func() {
|
||||
|
||||
ginkgo.By("wait for the bootstrap token secret be signed")
|
||||
err = WaitforSignedClusterInfoByBootStrapToken(c, tokenID)
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
cfgMap, err := f.ClientSet.CoreV1().ConfigMaps(metav1.NamespacePublic).Get(context.TODO(), bootstrapapi.ConfigMapClusterInfo, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
@@ -83,6 +83,7 @@ var _ = SIGDescribe("Events", func() {
|
||||
selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
|
||||
options := metav1.ListOptions{LabelSelector: selector.String()}
|
||||
pods, err := podClient.List(context.TODO(), options)
|
||||
framework.ExpectNoError(err)
|
||||
framework.ExpectEqual(len(pods.Items), 1)
|
||||
|
||||
ginkgo.By("retrieving the pod")
|
||||
|
||||
@@ -78,10 +78,6 @@ var _ = SIGDescribe("Pods Extended", func() {
|
||||
pods, err := podClient.List(context.TODO(), options)
|
||||
framework.ExpectNoError(err, "failed to query for pod")
|
||||
framework.ExpectEqual(len(pods.Items), 0)
|
||||
options = metav1.ListOptions{
|
||||
LabelSelector: selector.String(),
|
||||
ResourceVersion: pods.ListMeta.ResourceVersion,
|
||||
}
|
||||
|
||||
ginkgo.By("submitting the pod to kubernetes")
|
||||
podClient.Create(pod)
|
||||
|
||||
@@ -72,11 +72,6 @@ var _ = SIGDescribe("LimitRange", func() {
|
||||
limitRanges, err := f.ClientSet.CoreV1().LimitRanges(f.Namespace.Name).List(context.TODO(), options)
|
||||
framework.ExpectNoError(err, "failed to query for limitRanges")
|
||||
framework.ExpectEqual(len(limitRanges.Items), 0)
|
||||
options = metav1.ListOptions{
|
||||
LabelSelector: selector.String(),
|
||||
ResourceVersion: limitRanges.ListMeta.ResourceVersion,
|
||||
}
|
||||
|
||||
listCompleted := make(chan bool, 1)
|
||||
lw := &cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
|
||||
@@ -61,7 +61,7 @@ const (
|
||||
func TestConcurrentEvictionRequests(t *testing.T) {
|
||||
podNameFormat := "test-pod-%d"
|
||||
|
||||
s, closeFn, rm, informers, clientSet := rmSetup(t)
|
||||
s, closeFn, rm, informers, _ := rmSetup(t)
|
||||
defer closeFn()
|
||||
|
||||
ns := framework.CreateTestingNamespace("concurrent-eviction-requests", s, t)
|
||||
@@ -180,7 +180,7 @@ func TestConcurrentEvictionRequests(t *testing.T) {
|
||||
|
||||
// TestTerminalPodEviction ensures that PDB is not checked for terminal pods.
|
||||
func TestTerminalPodEviction(t *testing.T) {
|
||||
s, closeFn, rm, informers, clientSet := rmSetup(t)
|
||||
s, closeFn, rm, informers, _ := rmSetup(t)
|
||||
defer closeFn()
|
||||
|
||||
ns := framework.CreateTestingNamespace("terminalpod-eviction", s, t)
|
||||
|
||||
Reference in New Issue
Block a user