Skip to content

Commit

Permalink
Removal v1beta1 webhook. (#316)
Browse files Browse the repository at this point in the history
Signed-off-by: xuezhaojun <zxue@redhat.com>
  • Loading branch information
xuezhaojun authored Nov 23, 2023
1 parent 6571a8a commit a46086d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 50 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func TestSyncDeploy(t *testing.T) {

// Check if resources are created as expected
// We expect create the namespace twice respectively in the management cluster and the hub cluster.
testingcommon.AssertEqualNumber(t, len(createKubeObjects), 29)
testingcommon.AssertEqualNumber(t, len(createKubeObjects), 28)
for _, object := range createKubeObjects {
ensureObject(t, object, clusterManager)
}
Expand Down Expand Up @@ -403,7 +403,7 @@ func TestSyncDelete(t *testing.T) {
deleteKubeActions = append(deleteKubeActions, deleteKubeAction)
}
}
testingcommon.AssertEqualNumber(t, len(deleteKubeActions), 29) // delete namespace both from the hub cluster and the mangement cluster
testingcommon.AssertEqualNumber(t, len(deleteKubeActions), 28) // delete namespace both from the hub cluster and the mangement cluster

var deleteCRDActions []clienttesting.DeleteActionImpl
crdActions := tc.apiExtensionClient.Actions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var (
"cluster-manager/hub/cluster-manager-registration-webhook-validatingconfiguration.yaml",
"cluster-manager/hub/cluster-manager-registration-webhook-mutatingconfiguration.yaml",
"cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration.yaml",
"cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration-v1beta1.yaml",
}
hubWorkWebhookResourceFiles = []string{
"cluster-manager/hub/cluster-manager-work-webhook-validatingconfiguration.yaml",
Expand Down
20 changes: 10 additions & 10 deletions test/integration/operator/clustermanager_hosted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 42 {
return fmt.Errorf("should get 42 relatedResources, actual got %v, %v",
if len(actual.Status.RelatedResources) != 41 {
return fmt.Errorf("should get 41 relatedResources, actual got %v, %v",
len(actual.Status.RelatedResources), actual.Status.RelatedResources)
}
return nil
Expand Down Expand Up @@ -479,8 +479,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 46 {
return fmt.Errorf("should get 46 relatedResources, actual got %v, %v",
if len(actual.Status.RelatedResources) != 45 {
return fmt.Errorf("should get 45 relatedResources, actual got %v, %v",
len(actual.Status.RelatedResources), actual.Status.RelatedResources)
}
return nil
Expand Down Expand Up @@ -552,8 +552,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 41 {
return fmt.Errorf("should get 41 relatedResources, actual got %v, %v",
if len(actual.Status.RelatedResources) != 40 {
return fmt.Errorf("should get 40 relatedResources, actual got %v, %v",
len(actual.Status.RelatedResources), actual.Status.RelatedResources)
}
return nil
Expand Down Expand Up @@ -613,8 +613,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 46 {
return fmt.Errorf("should get 46 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources)
if len(actual.Status.RelatedResources) != 45 {
return fmt.Errorf("should get 45 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources)
}
return nil
}, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred())
Expand Down Expand Up @@ -688,8 +688,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 46 {
return fmt.Errorf("should get 46 relatedResources, actual got %v", len(actual.Status.RelatedResources))
if len(actual.Status.RelatedResources) != 45 {
return fmt.Errorf("should get 45 relatedResources, actual got %v", len(actual.Status.RelatedResources))
}
return nil
}, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred())
Expand Down
20 changes: 10 additions & 10 deletions test/integration/operator/clustermanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 42 {
return fmt.Errorf("should get 42 relatedResources, actual got %v, %v",
if len(actual.Status.RelatedResources) != 41 {
return fmt.Errorf("should get 41 relatedResources, actual got %v, %v",
len(actual.Status.RelatedResources), actual.Status.RelatedResources)
}
return nil
Expand Down Expand Up @@ -453,8 +453,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 46 {
return fmt.Errorf("should get 46 relatedResources, actual got %v, %v",
if len(actual.Status.RelatedResources) != 45 {
return fmt.Errorf("should get 45 relatedResources, actual got %v, %v",
len(actual.Status.RelatedResources), actual.Status.RelatedResources)
}
return nil
Expand Down Expand Up @@ -524,8 +524,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 41 {
return fmt.Errorf("should get 41 relatedResources, actual got %v", len(actual.Status.RelatedResources))
if len(actual.Status.RelatedResources) != 40 {
return fmt.Errorf("should get 40 relatedResources, actual got %v", len(actual.Status.RelatedResources))
}
return nil
}, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred())
Expand Down Expand Up @@ -580,8 +580,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 46 {
return fmt.Errorf("should get 46 relatedResources, actual got %v", len(actual.Status.RelatedResources))
if len(actual.Status.RelatedResources) != 45 {
return fmt.Errorf("should get 45 relatedResources, actual got %v", len(actual.Status.RelatedResources))
}
return nil
}, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred())
Expand Down Expand Up @@ -651,8 +651,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() {
if err != nil {
return err
}
if len(actual.Status.RelatedResources) != 46 {
return fmt.Errorf("should get 46 relatedResources, actual got %v", len(actual.Status.RelatedResources))
if len(actual.Status.RelatedResources) != 45 {
return fmt.Errorf("should get 45 relatedResources, actual got %v", len(actual.Status.RelatedResources))
}
return nil
}, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred())
Expand Down

0 comments on commit a46086d

Please sign in to comment.