Skip to content

Commit 62f7931

Browse files
committed
tests(integration): remove deprecation-warning cases for CTR/TrainJob webhooks
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
1 parent 2e90081 commit 62f7931

2 files changed

Lines changed: 0 additions & 32 deletions

File tree

test/integration/webhooks/clustertrainingruntime_webhook_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2424

2525
trainer "github.com/kubeflow/trainer/v2/pkg/apis/trainer/v1alpha1"
26-
"github.com/kubeflow/trainer/v2/pkg/constants"
2726
testingutil "github.com/kubeflow/trainer/v2/pkg/util/testing"
2827
"github.com/kubeflow/trainer/v2/test/integration/framework"
2928
)
@@ -72,20 +71,6 @@ var _ = ginkgo.Describe("ClusterTrainingRuntime Webhook", ginkgo.Ordered, func()
7271
Obj()).
7372
Obj()
7473
}),
75-
ginkgo.Entry("Should succeed to create deprecated ClusterTrainingRuntime (warning expected)",
76-
func() *trainer.ClusterTrainingRuntime {
77-
baseRuntime := testingutil.MakeClusterTrainingRuntimeWrapper(clTrainingRuntimeName + "-deprecated")
78-
obj := baseRuntime.
79-
RuntimeSpec(
80-
testingutil.MakeTrainingRuntimeSpecWrapper(baseRuntime.Spec).
81-
Obj()).
82-
Obj()
83-
if obj.Labels == nil {
84-
obj.Labels = map[string]string{}
85-
}
86-
obj.Labels[constants.LabelDeprecated] = constants.DeprecatedTrueValue
87-
return obj
88-
}),
8974
)
9075
})
9176
})

test/integration/webhooks/trainjob_test.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,6 @@ var _ = ginkgo.Describe("TrainJob Webhook", ginkgo.Ordered, func() {
110110
Obj()
111111
},
112112
gomega.Succeed()),
113-
ginkgo.Entry("Should succeed in creating trainJob referencing deprecated ClusterTrainingRuntime (warning expected)",
114-
func() *trainer.TrainJob {
115-
// Mark the existing ClusterTrainingRuntime as deprecated
116-
gomega.Eventually(func(g gomega.Gomega) {
117-
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(clusterTrainingRuntime), clusterTrainingRuntime)).Should(gomega.Succeed())
118-
}, util.Timeout, util.Interval).Should(gomega.Succeed())
119-
if clusterTrainingRuntime.Labels == nil {
120-
clusterTrainingRuntime.Labels = map[string]string{}
121-
}
122-
clusterTrainingRuntime.Labels[constants.LabelDeprecated] = constants.DeprecatedTrueValue
123-
gomega.Expect(k8sClient.Update(ctx, clusterTrainingRuntime)).To(gomega.Succeed())
124-
125-
return testingutil.MakeTrainJobWrapper(ns.Name, jobName).
126-
RuntimeRef(trainer.GroupVersion.WithKind(trainer.ClusterTrainingRuntimeKind), runtimeName).
127-
Obj()
128-
},
129-
gomega.Succeed()),
130113
ginkgo.Entry("Should fail in creating trainJob with pre-trained model config when referencing a trainingRuntime without an initializer",
131114
func() *trainer.TrainJob {
132115
newContainers := []corev1.Container{}

0 commit comments

Comments
 (0)