Skip to content

Commit

Permalink
fix: linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyuWu committed Jan 13, 2025
1 parent c8929dd commit 4f5b6a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ray-operator/apis/ray/v1/raycluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
func TestValidateRayClusterSpec(t *testing.T) {
tests := []struct {
gcsFaultToleranceOptions *GcsFaultToleranceOptions
name string
annotations map[string]string
envVars []corev1.EnvVar
name string
errorMessage string
envVars []corev1.EnvVar
expectError bool
}{
{
Expand Down Expand Up @@ -152,14 +152,15 @@ func TestValidateRayClusterSpec(t *testing.T) {
})
}
}

func TestValidateRayCluster(t *testing.T) {
tests := []struct {
GcsFaultToleranceOptions *GcsFaultToleranceOptions
name string
errorMessage string
ObjectMeta metav1.ObjectMeta
WorkerGroupSpecs []WorkerGroupSpec
expectError bool
errorMessage string
}{
{
name: "Invalid name",
Expand Down Expand Up @@ -241,8 +242,7 @@ func TestValidateRayCluster(t *testing.T) {
if tt.expectError {
assert.NotNil(t, err)
assert.IsType(t, &apierrors.StatusError{}, err)
statusErr := err.(*apierrors.StatusError)
assert.Contains(t, statusErr.ErrStatus.Details.Causes[0].Message, tt.errorMessage)
assert.Contains(t, err.Error(), tt.errorMessage)
} else {
assert.Nil(t, err)
}
Expand Down

0 comments on commit 4f5b6a4

Please sign in to comment.