Skip to content

Commit

Permalink
chore(meshexternalservice): prevent targeting mesh circuit breaker by…
Browse files Browse the repository at this point in the history
… validation

Signed-off-by: slonka <[email protected]>
  • Loading branch information
slonka committed Sep 19, 2024
1 parent 1a81ca1 commit fa4aa70
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg/plugins/policies/core/matchers/egress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ var _ = Describe("EgressMatchedPolicies", func() {
Expect(err).ToNot(HaveOccurred())
Expect(bytes).To(test_matchers.MatchGoldenYAML(strings.Replace(inputFile, ".input.", ".golden.", 1)))
},
Entry("should generate to resource rules for egress and mesh externalservice"),
XEntry("should generate to resource rules for egress and mesh externalservice"),
)
},
test.EntriesForFolder(filepath.Join("egressmatchedpolicies", "meshexternalservice", "torules")),
Expand All @@ -151,7 +151,7 @@ var _ = Describe("EgressMatchedPolicies", func() {
Expect(err).ToNot(HaveOccurred())
Expect(bytes).To(test_matchers.MatchGoldenYAML(strings.Replace(inputFile, ".input.", ".golden.", 1)))
},
Entry("should generate to resource rules for egress and mesh externalservice"),
XEntry("should generate to resource rules for egress and mesh externalservice"),
)
},
test.EntriesForFolder(filepath.Join("egressmatchedpolicies", "meshexternalservice", "fromtorules")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func validateTo(topTargetRef common_api.TargetRef, to []To) validators.Validatio
SupportedKinds: []common_api.TargetRefKind{
common_api.Mesh,
common_api.MeshService,
common_api.MeshExternalService,
common_api.MeshMultiZoneService,
},
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ to:
name: web-backend
default:
connectionLimits: { }`),
Entry("with MeshExternalService example", `
XEntry("with MeshExternalService example", `
targetRef:
kind: Mesh
to:
Expand Down Expand Up @@ -490,7 +490,7 @@ violations:
- field: spec.to[0].default.outlierDetection.detectors.successRate.standardDeviationFactor
message: 'invalid number'`,
}),
Entry("status codes out of range in expectedStatuses", testCase{
XEntry("status codes out of range in expectedStatuses", testCase{
inputYaml: `
targetRef:
kind: MeshService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ var _ = Describe("MeshCircuitBreaker", func() {
}),
)

It("should generate correct configuration for MeshExternalService with ZoneEgress", func() {
XIt("should generate correct configuration for MeshExternalService with ZoneEgress", func() {
// given
rs := core_xds.NewResourceSet()
rs.Add(&core_xds.Resource{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ spec:
})
})

Context("MeshExternalService with MeshCircuitBreaker", func() {
XContext("MeshExternalService with MeshCircuitBreaker", func() {
E2EAfterEach(func() {
Expect(DeleteMeshResources(universal.Cluster, meshNameNoDefaults,
meshcircuitbreaker_api.MeshCircuitBreakerResourceTypeDescriptor,
Expand Down

0 comments on commit fa4aa70

Please sign in to comment.