mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #59645 from hanxiaoshuai/cleanup0209
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>. remove unused function printIndentedJson and printAllPods in test/integration/scheduler **What this PR does / why we need it**: remove unused function printIndentedJson and printAllPods in test/integration/scheduler **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**: **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -19,7 +19,6 @@ package scheduler
 | 
				
			|||||||
// This file tests the VolumeScheduling feature.
 | 
					// This file tests the VolumeScheduling feature.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"encoding/json"
 | 
					 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"net/http"
 | 
						"net/http"
 | 
				
			||||||
	"net/http/httptest"
 | 
						"net/http/httptest"
 | 
				
			||||||
@@ -311,13 +310,3 @@ func markNodeSelector(pod *v1.Pod, node string) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	pod.Spec.NodeSelector = ns
 | 
						pod.Spec.NodeSelector = ns
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
func printIndentedJson(data interface{}) string {
 | 
					 | 
				
			||||||
	var indentedJSON []byte
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	indentedJSON, err := json.MarshalIndent(data, "", "\t")
 | 
					 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		return fmt.Sprintf("JSON parse error: %v", err)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return string(indentedJSON)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -381,15 +381,3 @@ func cleanupPods(cs clientset.Interface, t *testing.T, pods []*v1.Pod) {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
// printAllPods prints a list of all the pods and their node names. This is used
 | 
					 | 
				
			||||||
// for debugging.
 | 
					 | 
				
			||||||
func printAllPods(t *testing.T, cs clientset.Interface, nsName string) {
 | 
					 | 
				
			||||||
	podList, err := cs.CoreV1().Pods(nsName).List(metav1.ListOptions{})
 | 
					 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		t.Logf("Error getting pods: %v", err)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	for _, pod := range podList.Items {
 | 
					 | 
				
			||||||
		t.Logf("Pod:\n\tName:%v\n\tNamespace:%v\n\tNode Name:%v\n", pod.Name, pod.Namespace, pod.Spec.NodeName)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user