From 12bb89980e98d9e4874e0a36839e192189859b6c Mon Sep 17 00:00:00 2001 From: Sedef Date: Mon, 23 Mar 2020 12:59:34 -0700 Subject: [PATCH 1/2] [e2e] enable all docker e2e tests for CI --- test/infrastructure/docker/Makefile | 3 +-- test/infrastructure/docker/e2e/docker_test.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/infrastructure/docker/Makefile b/test/infrastructure/docker/Makefile index 9ddc2cb1f08f..198535aab7b6 100644 --- a/test/infrastructure/docker/Makefile +++ b/test/infrastructure/docker/Makefile @@ -91,9 +91,8 @@ test-e2e: ## Run the end-to-end tests E2E_CONF_FILE ?= e2e/local-e2e.conf SKIP_RESOURCE_CLEANUP ?= false -FOCUS ?= Basic run-e2e: - go test ./e2e -v -ginkgo.v -ginkgo.trace -count=1 -timeout=20m -tags=e2e -e2e.config="$(abspath $(E2E_CONF_FILE))" -skip-resource-cleanup=$(SKIP_RESOURCE_CLEANUP) -ginkgo.focus='$(FOCUS)' + go test ./e2e -v -ginkgo.v -ginkgo.trace -count=1 -timeout=20m -tags=e2e -e2e.config="$(abspath $(E2E_CONF_FILE))" -skip-resource-cleanup=$(SKIP_RESOURCE_CLEANUP) ## -------------------------------------- ## Binaries diff --git a/test/infrastructure/docker/e2e/docker_test.go b/test/infrastructure/docker/e2e/docker_test.go index 8a69ffc8cff2..3d457eb4b780 100644 --- a/test/infrastructure/docker/e2e/docker_test.go +++ b/test/infrastructure/docker/e2e/docker_test.go @@ -50,7 +50,7 @@ var _ = Describe("Docker", func() { namespace string clusterGen = &ClusterGenerator{} ) - SetDefaultEventuallyTimeout(3 * time.Minute) + SetDefaultEventuallyTimeout(10 * time.Minute) SetDefaultEventuallyPollingInterval(10 * time.Second) BeforeEach(func() { From 2c0019da41b2f6a7ad3ed11221df456a13a22fb6 Mon Sep 17 00:00:00 2001 From: Sedef Date: Mon, 23 Mar 2020 16:46:39 -0700 Subject: [PATCH 2/2] scaledown test --- .../kubeadm_control_plane_controller_test.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/controlplane/kubeadm/controllers/kubeadm_control_plane_controller_test.go b/controlplane/kubeadm/controllers/kubeadm_control_plane_controller_test.go index eb50c43a6266..f6e5a1c81df1 100644 --- a/controlplane/kubeadm/controllers/kubeadm_control_plane_controller_test.go +++ b/controlplane/kubeadm/controllers/kubeadm_control_plane_controller_test.go @@ -1665,9 +1665,15 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing. g := NewWithT(t) machines := map[string]*clusterv1.Machine{ - "one": machine("one"), + "one": machine("one"), + "two": machine("two"), + "three": machine("three"), } + fd2 := "b" + machines["one"].Spec.FailureDomain = &fd2 + machines["three"].Spec.FailureDomain = &fd2 + r := &KubeadmControlPlaneReconciler{ Log: log.Log, recorder: record.NewFakeRecorder(32), @@ -1685,16 +1691,23 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing. Machines: machines, } - _, err := r.scaleDownControlPlane(context.Background(), cluster, kcp, machines, machines, controlPlane) - g.Expect(err).ToNot(HaveOccurred()) + ml := clusterv1.MachineList{} + ml.Items = []clusterv1.Machine{*machines["two"]} + mll := internal.NewFilterableMachineCollectionFromMachineList(&ml) + _, err := r.scaleDownControlPlane(context.Background(), cluster, kcp, machines, mll, controlPlane) + g.Expect(err).To(HaveOccurred()) } func machine(name string) *clusterv1.Machine { + fd := "a" return &clusterv1.Machine{ ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: name, }, + Spec: clusterv1.MachineSpec{ + FailureDomain: &fd, + }, } }