mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	fix staticcheck failures of test/integration/client test/integration/disruption
This commit is contained in:
		@@ -59,9 +59,7 @@ test/e2e/autoscaling
 | 
				
			|||||||
test/e2e/instrumentation/logging/stackdriver
 | 
					test/e2e/instrumentation/logging/stackdriver
 | 
				
			||||||
test/e2e/instrumentation/monitoring
 | 
					test/e2e/instrumentation/monitoring
 | 
				
			||||||
test/integration/auth
 | 
					test/integration/auth
 | 
				
			||||||
test/integration/client
 | 
					 | 
				
			||||||
test/integration/deployment
 | 
					test/integration/deployment
 | 
				
			||||||
test/integration/disruption
 | 
					 | 
				
			||||||
test/integration/etcd
 | 
					test/integration/etcd
 | 
				
			||||||
test/integration/examples
 | 
					test/integration/examples
 | 
				
			||||||
test/integration/framework
 | 
					test/integration/framework
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -179,7 +179,7 @@ func TestAtomicPut(t *testing.T) {
 | 
				
			|||||||
					tmpRC.Spec.Selector[l] = v
 | 
										tmpRC.Spec.Selector[l] = v
 | 
				
			||||||
					tmpRC.Spec.Template.Labels[l] = v
 | 
										tmpRC.Spec.Template.Labels[l] = v
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				tmpRC, err = rcs.Update(tmpRC)
 | 
									_, err = rcs.Update(tmpRC)
 | 
				
			||||||
				if err != nil {
 | 
									if err != nil {
 | 
				
			||||||
					if apierrors.IsConflict(err) {
 | 
										if apierrors.IsConflict(err) {
 | 
				
			||||||
						// This is what we expect.
 | 
											// This is what we expect.
 | 
				
			||||||
@@ -226,7 +226,7 @@ func TestPatch(t *testing.T) {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	pods := c.CoreV1().Pods("default")
 | 
						pods := c.CoreV1().Pods("default")
 | 
				
			||||||
	pod, err := pods.Create(&podBody)
 | 
						_, err := pods.Create(&podBody)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		t.Fatalf("Failed creating patchpods: %v", err)
 | 
							t.Fatalf("Failed creating patchpods: %v", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -285,7 +285,7 @@ func TestPatch(t *testing.T) {
 | 
				
			|||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			t.Fatalf("Failed updating patchpod with patch type %s: %v", k, err)
 | 
								t.Fatalf("Failed updating patchpod with patch type %s: %v", k, err)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		pod, err = pods.Get(name, metav1.GetOptions{})
 | 
							pod, err := pods.Get(name, metav1.GetOptions{})
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			t.Fatalf("Failed getting patchpod: %v", err)
 | 
								t.Fatalf("Failed getting patchpod: %v", err)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -163,6 +163,9 @@ func TestPDBWithScaleSubresource(t *testing.T) {
 | 
				
			|||||||
	waitPDBStable(t, clientSet, 4, nsName, pdb.Name)
 | 
						waitPDBStable(t, clientSet, 4, nsName, pdb.Name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	newPdb, err := clientSet.PolicyV1beta1().PodDisruptionBudgets(nsName).Get(pdb.Name, metav1.GetOptions{})
 | 
						newPdb, err := clientSet.PolicyV1beta1().PodDisruptionBudgets(nsName).Get(pdb.Name, metav1.GetOptions{})
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Errorf("Error getting PodDisruptionBudget: %v", err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if expected, found := int32(replicas), newPdb.Status.ExpectedPods; expected != found {
 | 
						if expected, found := int32(replicas), newPdb.Status.ExpectedPods; expected != found {
 | 
				
			||||||
		t.Errorf("Expected %d, but found %d", expected, found)
 | 
							t.Errorf("Expected %d, but found %d", expected, found)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user