Skip to content

Commit

Permalink
Review Remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
trasc committed Jul 12, 2024
1 parent f5866f6 commit a31adae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/jobframework/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestIsParentJobManaged(t *testing.T) {
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
defer EnableIntegrationsForTest(t, "kubeflow.org/mpijob")()
t.Cleanup(EnableIntegrationsForTest(t, "kubeflow.org/mpijob"))
builder := utiltesting.NewClientBuilder(kubeflow.AddToScheme)
if tc.parentJob != nil {
builder = builder.WithObjects(tc.parentJob)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/jobs/job/job_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ var (
)

func TestReconciler(t *testing.T) {
defer jobframework.EnableIntegrationsForTest(t, FrameworkName)()
t.Cleanup(jobframework.EnableIntegrationsForTest(t, FrameworkName))
baseJobWrapper := utiltestingjob.MakeJob("job", "ns").
Suspend(true).
Queue("foo").
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/jobs/pod/pod_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func TestDefault(t *testing.T) {

for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
defer jobframework.EnableIntegrationsForTest(t, tc.enableIntegrations...)()
t.Cleanup(jobframework.EnableIntegrationsForTest(t, tc.enableIntegrations...))
builder := utiltesting.NewClientBuilder()
builder = builder.WithObjects(tc.initObjects...)
cli := builder.Build()
Expand Down Expand Up @@ -400,7 +400,7 @@ func TestGetRoleHash(t *testing.T) {
}

func TestValidateCreate(t *testing.T) {
defer jobframework.EnableIntegrationsForTest(t, "batch/job")()
t.Cleanup(jobframework.EnableIntegrationsForTest(t, "batch/job"))
testCases := map[string]struct {
pod *corev1.Pod
wantErr error
Expand Down Expand Up @@ -503,7 +503,7 @@ func TestValidateCreate(t *testing.T) {
}

func TestValidateUpdate(t *testing.T) {
defer jobframework.EnableIntegrationsForTest(t, "batch/job")()
t.Cleanup(jobframework.EnableIntegrationsForTest(t, "batch/job"))
testCases := map[string]struct {
oldPod *corev1.Pod
newPod *corev1.Pod
Expand Down

0 comments on commit a31adae

Please sign in to comment.