Skip to content

Commit

Permalink
Merge pull request #4308 from vincepri/cr09latest
Browse files Browse the repository at this point in the history
🌱 Update CR dependencies and Kubernetes 0.21.0-beta.1
  • Loading branch information
k8s-ci-robot authored Mar 15, 2021
2 parents bfd1c2c + 8d2174d commit 0bc5750
Show file tree
Hide file tree
Showing 17 changed files with 275 additions and 104 deletions.
2 changes: 1 addition & 1 deletion bootstrap/kubeadm/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ var _ = BeforeSuite(func() {
defer GinkgoRecover()
Expect(testEnv.StartManager(ctx)).To(Succeed())
}()

<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()
}, 60)

var _ = AfterSuite(func() {
Expand Down
1 change: 1 addition & 0 deletions controllers/machine_controller_phases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ var _ = Describe("Reconcile Machine Phases", func() {

// Set Deletion Timestamp.
machine.SetDeletionTimestamp(&deletionTimestamp)
machine.Finalizers = append(machine.Finalizers, "test")

// Set the LastUpdated to be able to verify it is updated when the phase changes
lastUpdated := metav1.NewTime(time.Now().Add(-10 * time.Second))
Expand Down
4 changes: 2 additions & 2 deletions controllers/machine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ func TestRemoveMachineFinalizerAfterDeleteReconcile(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "delete123",
Namespace: "default",
Finalizers: []string{clusterv1.MachineFinalizer},
Finalizers: []string{clusterv1.MachineFinalizer, "test"},
DeletionTimestamp: &dt,
},
Spec: clusterv1.MachineSpec{
Expand All @@ -1136,7 +1136,7 @@ func TestRemoveMachineFinalizerAfterDeleteReconcile(t *testing.T) {

var actual clusterv1.Machine
g.Expect(mr.Client.Get(ctx, key, &actual)).To(Succeed())
g.Expect(actual.ObjectMeta.Finalizers).To(BeEmpty())
g.Expect(actual.ObjectMeta.Finalizers).To(Equal([]string{"test"}))
}

func Test_clusterToActiveMachines(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controllers/remote/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ var _ = BeforeSuite(func() {
defer GinkgoRecover()
Expect(testEnv.StartManager(ctx)).To(Succeed())
}()

<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()
}, 60)

var _ = AfterSuite(func() {
Expand Down
2 changes: 0 additions & 2 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ func TestMain(m *testing.M) {
}
}()
<-testEnv.Manager.Elected()

// wait for webhook port to be open prior to running tests
testEnv.WaitForWebhooks()

code := m.Run()
Expand Down
1 change: 1 addition & 0 deletions controlplane/kubeadm/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func TestMain(m *testing.M) {
}
}()
<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()

// Run tests
code := m.Run()
Expand Down
1 change: 1 addition & 0 deletions controlplane/kubeadm/internal/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestMain(m *testing.M) {
}
}()
<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()

code := m.Run()

Expand Down
1 change: 1 addition & 0 deletions docs/book/src/developer/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func TestMain(m *testing.M) {
}
}()
<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()

// Run tests
code := m.Run()
Expand Down
2 changes: 1 addition & 1 deletion exp/addons/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ var _ = BeforeSuite(func() {
defer GinkgoRecover()
Expect(testEnv.StartManager(ctx)).To(Succeed())
}()

<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()
}, 60)

var _ = AfterSuite(func() {
Expand Down
4 changes: 2 additions & 2 deletions exp/controllers/machinepool_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "delete123",
Namespace: "default",
Finalizers: []string{expv1.MachinePoolFinalizer},
Finalizers: []string{expv1.MachinePoolFinalizer, "test"},
DeletionTimestamp: &dt,
},
Spec: expv1.MachinePoolSpec{
Expand All @@ -606,7 +606,7 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) {

var actual expv1.MachinePool
g.Expect(mr.Client.Get(ctx, key, &actual)).To(Succeed())
g.Expect(actual.ObjectMeta.Finalizers).To(BeEmpty())
g.Expect(actual.ObjectMeta.Finalizers).To(Equal([]string{"test"}))
}

func TestMachinePoolConditions(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion exp/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ var _ = BeforeSuite(func() {
defer GinkgoRecover()
Expect(testEnv.StartManager(ctx)).To(Succeed())
}()

<-testEnv.Manager.Elected()
testEnv.WaitForWebhooks()
}, 60)

var _ = AfterSuite(func() {
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ require (
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
google.golang.org/grpc v1.27.1
k8s.io/api v0.21.0-beta.0
k8s.io/apiextensions-apiserver v0.21.0-beta.0
k8s.io/apimachinery v0.21.0-beta.0
k8s.io/apiserver v0.21.0-beta.0
k8s.io/client-go v0.21.0-beta.0
k8s.io/cluster-bootstrap v0.21.0-beta.0
k8s.io/component-base v0.21.0-beta.0
k8s.io/api v0.21.0-beta.1
k8s.io/apiextensions-apiserver v0.21.0-beta.1
k8s.io/apimachinery v0.21.0-beta.1
k8s.io/apiserver v0.21.0-beta.1
k8s.io/client-go v0.21.0-beta.1
k8s.io/cluster-bootstrap v0.21.0-beta.1
k8s.io/component-base v0.21.0-beta.1
k8s.io/klog/v2 v2.5.0
k8s.io/kubectl v0.21.0-beta.0
k8s.io/kubectl v0.21.0-beta.1
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
sigs.k8s.io/controller-runtime v0.8.2-0.20210302195120-85527dfb5348
sigs.k8s.io/controller-runtime v0.8.2-0.20210314174504-df2c43d8896d
sigs.k8s.io/kind v0.9.0
sigs.k8s.io/yaml v1.2.0
)
167 changes: 126 additions & 41 deletions go.sum

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/infrastructure/docker/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ require (
github.com/onsi/gomega v1.10.5
github.com/pkg/errors v0.9.1
github.com/spf13/pflag v1.0.5
k8s.io/api v0.21.0-beta.0
k8s.io/apimachinery v0.21.0-beta.0
k8s.io/client-go v0.21.0-beta.0
k8s.io/api v0.21.0-beta.1
k8s.io/apimachinery v0.21.0-beta.1
k8s.io/client-go v0.21.0-beta.1
k8s.io/klog/v2 v2.5.0
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
sigs.k8s.io/cluster-api v0.3.3
sigs.k8s.io/controller-runtime v0.8.2-0.20210302195120-85527dfb5348
sigs.k8s.io/controller-runtime v0.8.2-0.20210314174504-df2c43d8896d
sigs.k8s.io/kind v0.9.0
sigs.k8s.io/yaml v1.2.0
)
Expand Down
Loading

0 comments on commit 0bc5750

Please sign in to comment.