Skip to content

Commit

Permalink
Fix CI (ray-project#1145)
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
kevin85421 authored Jun 6, 2023
1 parent ecf1431 commit cf7c0b0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ func TestReconcile_Autoscaler_ServiceAccountName(t *testing.T) {
// Case 1: There is no ServiceAccount "my-sa" in the Kubernetes cluster
runtimeObjects := []runtime.Object{}
fakeClient := clientFake.NewClientBuilder().WithRuntimeObjects(runtimeObjects...).Build()
ctx := context.Background()

// Initialize the reconciler
testRayClusterReconciler := &RayClusterReconciler{
Expand All @@ -975,7 +976,7 @@ func TestReconcile_Autoscaler_ServiceAccountName(t *testing.T) {
// However, if KubeRay creates a ServiceAccount for users, the autoscaler may encounter permission issues during
// zero-downtime rolling updates when RayService is performed. See https://github.com/ray-project/kuberay/pull/1128
// for more details.
err := testRayClusterReconciler.reconcileAutoscalerServiceAccount(cluster)
err := testRayClusterReconciler.reconcileAutoscalerServiceAccount(ctx, cluster)
assert.NotNil(t, err,
"When users specify ServiceAccountName for the head Pod, they need to create a ServiceAccount themselves. "+
"If the ServiceAccount does not exist, the reconciler should return an error. However, err is nil.")
Expand All @@ -992,7 +993,7 @@ func TestReconcile_Autoscaler_ServiceAccountName(t *testing.T) {
Log: ctrl.Log.WithName("controllers").WithName("RayCluster"),
}

err = testRayClusterReconciler.reconcileAutoscalerServiceAccount(cluster)
err = testRayClusterReconciler.reconcileAutoscalerServiceAccount(ctx, cluster)
assert.Nil(t, err)
}

Expand Down

0 comments on commit cf7c0b0

Please sign in to comment.