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

Chore: field semantic correction #8370

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions pkg/apis/sinks/v1alpha1/integration_sink_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (spec *IntegrationSinkSpec) Validate(ctx context.Context) *apis.FieldError
// Additional validation for AWS S3 required fields
if spec.Aws.S3 != nil {
if spec.Aws.S3.Arn == "" {
errs = errs.Also(apis.ErrMissingField("aws.s3.bucketNameOrArn"))
errs = errs.Also(apis.ErrMissingField("aws.s3.arn"))
}
if spec.Aws.S3.Region == "" {
errs = errs.Also(apis.ErrMissingField("aws.s3.region"))
Expand All @@ -76,7 +76,7 @@ func (spec *IntegrationSinkSpec) Validate(ctx context.Context) *apis.FieldError
// Additional validation for AWS SQS required fields
if spec.Aws.SQS != nil {
if spec.Aws.SQS.Arn == "" {
errs = errs.Also(apis.ErrMissingField("aws.sqs.queueNameOrArn"))
errs = errs.Also(apis.ErrMissingField("aws.sqs.arn"))
}
if spec.Aws.SQS.Region == "" {
errs = errs.Also(apis.ErrMissingField("aws.sqs.region"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestIntegrationSinkSpecValidation(t *testing.T) {
},
},
},
want: apis.ErrMissingField("aws.sqs.queueNameOrArn"),
want: apis.ErrMissingField("aws.sqs.arn"),
},
{
name: "AWS SNS sink without TopicNameOrArn (invalid)",
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/sources/v1alpha1/integration_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (spec *IntegrationSourceSpec) Validate(ctx context.Context) *apis.FieldErro
// Additional validation for AWS SQS required fields
if spec.Aws.SQS != nil {
if spec.Aws.SQS.Arn == "" {
errs = errs.Also(apis.ErrMissingField("aws.sqs.queueNameOrArn"))
errs = errs.Also(apis.ErrMissingField("aws.sqs.arn"))
}
if spec.Aws.SQS.Region == "" {
errs = errs.Also(apis.ErrMissingField("aws.sqs.region"))
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/sources/v1alpha1/integration_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestIntegrationSourceSpecValidation(t *testing.T) {
},
},
},
want: apis.ErrMissingField("aws.sqs.queueNameOrArn"),
want: apis.ErrMissingField("aws.sqs.arn"),
},
{
name: "AWS DDBStreams source without Table (invalid)",
Expand Down
Loading