Move recreate_node.go to e2e/node

e2e/framework is a place to keep common functions for e2e tests, and
it is not a place to keep e2e tests themself. recreate_node.go is e2e
test for node.
This moves recreate_node.go to e2e/node.
This commit is contained in:
Kenichi Omichi 2020-06-18 21:54:14 +00:00
parent aa348b1577
commit 4163fd9420
3 changed files with 6 additions and 10 deletions

View File

@ -6,7 +6,6 @@ go_library(
"firewall.go",
"gce.go",
"ingress.go",
"recreate_node.go",
"util.go",
],
importpath = "k8s.io/kubernetes/test/e2e/framework/providers/gce",
@ -14,8 +13,6 @@ go_library(
deps = [
"//staging/src/k8s.io/api/core/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
@ -23,12 +20,8 @@ go_library(
"//staging/src/k8s.io/cloud-provider:go_default_library",
"//staging/src/k8s.io/legacy-cloud-providers/gce:go_default_library",
"//test/e2e/framework:go_default_library",
"//test/e2e/framework/node:go_default_library",
"//test/e2e/framework/pod:go_default_library",
"//test/e2e/framework/pv:go_default_library",
"//test/e2e/framework/service:go_default_library",
"//test/e2e/framework/skipper:go_default_library",
"//test/utils:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/google.golang.org/api/compute/v1:go_default_library",
"//vendor/google.golang.org/api/googleapi:go_default_library",

View File

@ -14,6 +14,7 @@ go_library(
"pod_gc.go",
"pods.go",
"pre_stop.go",
"recreate_node.go",
"runtimeclass.go",
"security_context.go",
"ssh.go",
@ -49,6 +50,7 @@ go_library(
"//test/e2e/framework/node:go_default_library",
"//test/e2e/framework/perf:go_default_library",
"//test/e2e/framework/pod:go_default_library",
"//test/e2e/framework/providers/gce:go_default_library",
"//test/e2e/framework/rc:go_default_library",
"//test/e2e/framework/security:go_default_library",
"//test/e2e/framework/skipper:go_default_library",

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package gce
package node
import (
"context"
@ -30,6 +30,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
"k8s.io/kubernetes/test/e2e/framework/providers/gce"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
testutils "k8s.io/kubernetes/test/utils"
)
@ -103,12 +104,12 @@ var _ = ginkgo.Describe("Recreate [Feature:Recreate]", func() {
// Recreate all the nodes in the test instance group
func testRecreate(c clientset.Interface, ps *testutils.PodStore, systemNamespace string, nodes []v1.Node, podNames []string) {
err := RecreateNodes(c, nodes)
err := gce.RecreateNodes(c, nodes)
if err != nil {
framework.Failf("Test failed; failed to start the restart instance group command.")
}
err = WaitForNodeBootIdsToChange(c, nodes, recreateNodeReadyAgainTimeout)
err = gce.WaitForNodeBootIdsToChange(c, nodes, recreateNodeReadyAgainTimeout)
if err != nil {
framework.Failf("Test failed; failed to recreate at least one node in %v.", recreateNodeReadyAgainTimeout)
}