fix static check for test/e2e/framework

This commit is contained in:
SataQiu
2019-08-21 17:28:36 +08:00
parent 0dfb87dfa5
commit c60377c682
15 changed files with 38 additions and 118 deletions

View File

@@ -621,18 +621,6 @@ func (config *NetworkingTestConfig) setup(selector map[string]string) {
}
}
func (config *NetworkingTestConfig) cleanup() {
nsClient := config.getNamespacesClient()
nsList, err := nsClient.List(metav1.ListOptions{})
if err == nil {
for _, ns := range nsList.Items {
if strings.Contains(ns.Name, config.f.BaseName) && ns.Name != config.Namespace {
nsClient.Delete(ns.Name, nil)
}
}
}
}
// shuffleNodes copies nodes from the specified slice into a copy in random
// order. It returns a new slice.
func shuffleNodes(nodes []v1.Node) []v1.Node {
@@ -713,10 +701,6 @@ func (config *NetworkingTestConfig) getServiceClient() coreclientset.ServiceInte
return config.f.ClientSet.CoreV1().Services(config.Namespace)
}
func (config *NetworkingTestConfig) getNamespacesClient() coreclientset.NamespaceInterface {
return config.f.ClientSet.CoreV1().Namespaces()
}
// CheckReachabilityFromPod checks reachability from the specified pod.
func CheckReachabilityFromPod(expectToBeReachable bool, timeout time.Duration, namespace, pod, target string) {
cmd := fmt.Sprintf("wget -T 5 -qO- %q", target)