Skip to content

Add cel tests for upstreamsettingspolicy #3742

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

Merged
merged 7 commits into from
Aug 19, 2025
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
10 changes: 10 additions & 0 deletions tests/cel/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ const (
grpcRouteKind = "GRPCRoute"
tcpRouteKind = "TCPRoute"
invalidKind = "InvalidKind"
serviceKind = "Service"
)

const (
gatewayGroup = "gateway.networking.k8s.io"
invalidGroup = "invalid.networking.k8s.io"
discoveryGroup = "discovery.k8s.io/v1"
coreGroup = "core"
emptyGroup = ""
)

// ClientSettingsPolicy validation errors.
Expand All @@ -44,6 +47,13 @@ const (
expectedMinReplicasLessThanOrEqualError = `minReplicas must be less than or equal to maxReplicas`
)

// UpstreamSettingsPolicy validation errors.
const (
expectedTargetRefKindServiceError = `TargetRefs Kind must be: Service`
expectedTargetRefGroupCoreError = `TargetRefs Group must be core`
expectedTargetRefNameUniqueError = `TargetRef Name must be unique`
)

const (
defaultNamespace = "default"
)
Expand Down
Loading
Loading