From 10da60005650cde084a1e796775ae0146c0379ea Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Mon, 2 Dec 2024 12:59:26 +0100 Subject: [PATCH] e2e: add NodeDrain e2e test --- test/e2e/node_drain_test.go | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 test/e2e/node_drain_test.go diff --git a/test/e2e/node_drain_test.go b/test/e2e/node_drain_test.go new file mode 100644 index 0000000000..3892890145 --- /dev/null +++ b/test/e2e/node_drain_test.go @@ -0,0 +1,41 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "k8s.io/utils/ptr" + capi_e2e "sigs.k8s.io/cluster-api/test/e2e" +) + +var _ = Describe("When testing Node drain [supervisor] [PR-Blocking]", func() { + const specName = "quick-start" // copied from CAPI + Setup(specName, func(testSpecificSettingsGetter func() testSettings) { + capi_e2e.NodeDrainTimeoutSpec(ctx, func() capi_e2e.NodeDrainTimeoutSpecInput { + return capi_e2e.NodeDrainTimeoutSpecInput{ + E2EConfig: e2eConfig, + ClusterctlConfigPath: testSpecificSettingsGetter().ClusterctlConfigPath, + BootstrapClusterProxy: bootstrapClusterProxy, + ArtifactFolder: artifactFolder, + SkipCleanup: skipCleanup, + Flavor: ptr.To(testSpecificSettingsGetter().FlavorForMode("topology")), + InfrastructureProvider: ptr.To("vsphere"), + } + }) + }) +})