Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #1145

Merged
merged 1 commit into from
Jun 6, 2023
Merged

Fix CI #1145

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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