Skip to content

Commit

Permalink
chore(meshhealthcheck): prevent targeting meshexternalservice by vali…
Browse files Browse the repository at this point in the history
…dation

Signed-off-by: slonka <slonka@users.noreply.github.com>
  • Loading branch information
slonka committed Sep 19, 2024
1 parent ec36212 commit 61f1b6e
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 @@ -40,7 +40,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 @@ -82,7 +82,7 @@ to:
tcp: # it will pick the protocol as described in 'protocol selection' section
disabled: true # new, default false, can be disabled for override
`),
Entry("to level MeshExternalService", `
XEntry("to level MeshExternalService", `
targetRef:
kind: Mesh
to:
Expand Down Expand Up @@ -295,7 +295,7 @@ violations:
- field: spec.to[0].default.http.expectedStatuses[1]
message: must be in inclusive range [100, 599]`,
}),
Entry("cannot use MeshExternalService with other type than Mesh", testCase{
XEntry("cannot use MeshExternalService with other type than Mesh", testCase{
inputYaml: `
targetRef:
kind: MeshSubset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ var _ = Describe("MeshHealthCheck", 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 @@ -591,7 +591,7 @@ spec:
})
})

Context("MeshExternalService with MeshHealthCheck", func() {
XContext("MeshExternalService with MeshHealthCheck", func() {
E2EAfterEach(func() {
Expect(DeleteMeshResources(universal.Cluster, meshNameNoDefaults,
meshhealthcheck_api.MeshHealthCheckResourceTypeDescriptor,
Expand Down

0 comments on commit 61f1b6e

Please sign in to comment.