@@ -82,6 +82,10 @@ func (s *Server) Start(port int) error {
8282 return http .ListenAndServe (addr , WithLogging (s .mux ))
8383}
8484
85+ const (
86+ riskNamePrefix = "TestAlertFeatureE2ETest"
87+ )
88+
8589func (s * Server ) handleGraph (w http.ResponseWriter , r * http.Request ) {
8690 if r .Method != http .MethodGet {
8791 http .Error (w , "Method not allowed" , http .StatusMethodNotAllowed )
@@ -267,7 +271,7 @@ func (s *Server) generateRisksAlwaysGraph(queriedVersion semver.Version, arch st
267271 Risks : []ConditionalUpdateRisk {
268272 {
269273 URL : "https://docs.openshift.com/synthetic-risk-a" ,
270- Name : "SyntheticRiskA" ,
274+ Name : riskNamePrefix + "SyntheticRiskA" ,
271275 Message : "This is a synthetic risk A that always applies for testing purposes" ,
272276 MatchingRules : []MatchingRule {
273277 {
@@ -277,7 +281,7 @@ func (s *Server) generateRisksAlwaysGraph(queriedVersion semver.Version, arch st
277281 },
278282 {
279283 URL : "https://docs.openshift.com/synthetic-risk-b" ,
280- Name : "SyntheticRiskB" ,
284+ Name : riskNamePrefix + "SyntheticRiskB" ,
281285 Message : "This is a synthetic risk B that always applies for testing purposes" ,
282286 MatchingRules : []MatchingRule {
283287 {
@@ -297,7 +301,7 @@ func (s *Server) generateRisksAlwaysGraph(queriedVersion semver.Version, arch st
297301 Risks : []ConditionalUpdateRisk {
298302 {
299303 URL : "https://docs.openshift.com/synthetic-risk-a" ,
300- Name : "SyntheticRiskA" ,
304+ Name : riskNamePrefix + "SyntheticRiskA" ,
301305 Message : "This is a synthetic risk A that always applies for testing purposes" ,
302306 MatchingRules : []MatchingRule {
303307 {
@@ -307,7 +311,7 @@ func (s *Server) generateRisksAlwaysGraph(queriedVersion semver.Version, arch st
307311 },
308312 {
309313 URL : "https://docs.openshift.com/synthetic-risk-c" ,
310- Name : "SyntheticRiskC" ,
314+ Name : riskNamePrefix + "SyntheticRiskC" ,
311315 Message : "This is a synthetic risk C that always applies for testing purposes" ,
312316 MatchingRules : []MatchingRule {
313317 {
@@ -372,7 +376,7 @@ func (s *Server) generateRisksMatchingGraph(queriedVersion semver.Version, arch
372376 Risks : []ConditionalUpdateRisk {
373377 {
374378 URL : "https://docs.openshift.com/synthetic-risk-promql" ,
375- Name : "SyntheticRisk" ,
379+ Name : riskNamePrefix + "SyntheticRisk" ,
376380 Message : "This is a synthetic risk with PromQL that always matches in OpenShift clusters" ,
377381 MatchingRules : []MatchingRule {
378382 {
@@ -433,7 +437,7 @@ func (s *Server) generateRisksCannotEvaluateGraph(queriedVersion semver.Version,
433437 Risks : []ConditionalUpdateRisk {
434438 {
435439 URL : "https://docs.openshift.com/synthetic-risk-promql" ,
436- Name : "SyntheticRisk" ,
440+ Name : riskNamePrefix + "SyntheticRisk" ,
437441 Message : "This is a synthetic risk with PromQL that cannot be evaluated in OpenShift clusters" ,
438442 MatchingRules : []MatchingRule {
439443 {
@@ -494,7 +498,7 @@ func (s *Server) generateRisksNonmatchingGraph(queriedVersion semver.Version, ar
494498 Risks : []ConditionalUpdateRisk {
495499 {
496500 URL : "https://docs.openshift.com/synthetic-risk-promql-nonmatching" ,
497- Name : "SyntheticRisk" ,
501+ Name : riskNamePrefix + "SyntheticRisk" ,
498502 Message : "This is a synthetic risk with PromQL that never matches in OpenShift clusters" ,
499503 MatchingRules : []MatchingRule {
500504 {
@@ -660,7 +664,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
660664 Risks : []ConditionalUpdateRisk {
661665 {
662666 URL : "https://docs.openshift.com/synthetic-risk-smoke" ,
663- Name : "RiskA" ,
667+ Name : riskNamePrefix + "RiskA" ,
664668 Message : "This is a synthetic risk with Always type for smoke testing" ,
665669 MatchingRules : []MatchingRule {
666670 {
@@ -684,7 +688,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
684688 Risks : []ConditionalUpdateRisk {
685689 {
686690 URL : "https://docs.openshift.com/synthetic-risk-smoke-promql" ,
687- Name : "RiskBMatches" ,
691+ Name : riskNamePrefix + "RiskBMatches" ,
688692 Message : "This is a synthetic risk with PromQL that matches for smoke testing" ,
689693 MatchingRules : []MatchingRule {
690694 {
@@ -711,7 +715,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
711715 Risks : []ConditionalUpdateRisk {
712716 {
713717 URL : "https://docs.openshift.com/synthetic-risk-smoke-promql-nomatch" ,
714- Name : "RiskCNoMatch" ,
718+ Name : riskNamePrefix + "RiskCNoMatch" ,
715719 Message : "This is a synthetic risk with PromQL that never matches for smoke testing" ,
716720 MatchingRules : []MatchingRule {
717721 {
@@ -738,7 +742,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
738742 Risks : []ConditionalUpdateRisk {
739743 {
740744 URL : "https://docs.openshift.com/synthetic-risk-smoke-combined-a" ,
741- Name : "RiskA" ,
745+ Name : riskNamePrefix + "RiskA" ,
742746 Message : "This is RiskA part of combined risks for smoke testing" ,
743747 MatchingRules : []MatchingRule {
744748 {
@@ -748,7 +752,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
748752 },
749753 {
750754 URL : "https://docs.openshift.com/synthetic-risk-smoke-combined-b" ,
751- Name : "RiskBMatches" ,
755+ Name : riskNamePrefix + "RiskBMatches" ,
752756 Message : "This is RiskBMatches part of combined risks for smoke testing" ,
753757 MatchingRules : []MatchingRule {
754758 {
@@ -761,7 +765,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
761765 },
762766 {
763767 URL : "https://docs.openshift.com/synthetic-risk-smoke-combined-c" ,
764- Name : "RiskCNoMatch" ,
768+ Name : riskNamePrefix + "RiskCNoMatch" ,
765769 Message : "This is RiskCNoMatch part of combined risks for smoke testing" ,
766770 MatchingRules : []MatchingRule {
767771 {
@@ -774,7 +778,7 @@ func (s *Server) generateSmokeTestGraph(queriedVersion semver.Version, arch stri
774778 },
775779 {
776780 URL : "https://docs.openshift.com/synthetic-risk-smoke-combined-d" ,
777- Name : "RiskDCannotEvaluate" ,
781+ Name : riskNamePrefix + "RiskDCannotEvaluate" ,
778782 Message : "This is RiskDCannotEvaluate part of combined risks for smoke testing" ,
779783 MatchingRules : []MatchingRule {
780784 {
@@ -1449,7 +1453,7 @@ func (s *Server) generateOCP88175Graph(queriedVersion semver.Version, arch strin
14491453 Risks : []ConditionalUpdateRisk {
14501454 {
14511455 URL : "https://docs.openshift.com/synthetic-risk-a" ,
1452- Name : "SomeInvokerThing" ,
1456+ Name : riskNamePrefix + "SomeInvokerThing" ,
14531457 Message : "This is SomeInvokerThing that always applies for testing purposes" ,
14541458 MatchingRules : []MatchingRule {rule },
14551459 },
@@ -1465,13 +1469,13 @@ func (s *Server) generateOCP88175Graph(queriedVersion semver.Version, arch strin
14651469 Risks : []ConditionalUpdateRisk {
14661470 {
14671471 URL : "https://docs.openshift.com/synthetic-risk-a" ,
1468- Name : "SomeInvokerThing" ,
1472+ Name : riskNamePrefix + "SomeInvokerThing" ,
14691473 Message : "This is SomeInvokerThing that always applies for testing purposes" ,
14701474 MatchingRules : []MatchingRule {rule },
14711475 },
14721476 {
14731477 URL : "https://docs.openshift.com/synthetic-risk-b" ,
1474- Name : "SomeChannelThing" ,
1478+ Name : riskNamePrefix + "SomeChannelThing" ,
14751479 Message : "This is SomeChannelThing that always applies for testing purposes" ,
14761480 MatchingRules : []MatchingRule {rule },
14771481 },
@@ -1487,7 +1491,7 @@ func (s *Server) generateOCP88175Graph(queriedVersion semver.Version, arch strin
14871491 Risks : []ConditionalUpdateRisk {
14881492 {
14891493 URL : "https://docs.openshift.com/synthetic-risk-b" ,
1490- Name : "SomeInfrastructureThing" ,
1494+ Name : riskNamePrefix + "SomeInfrastructureThing" ,
14911495 Message : "This is SomeInfrastructureThing that always applies for testing purposes" ,
14921496 MatchingRules : []MatchingRule {rule },
14931497 },
@@ -1533,7 +1537,7 @@ func (s *Server) generateOTA1813Graph(queriedVersion semver.Version, arch string
15331537 Risks : []ConditionalUpdateRisk {
15341538 {
15351539 URL : "https://docs.openshift.com/synthetic-risk-a" ,
1536- Name : "SomeInvokerThing" ,
1540+ Name : riskNamePrefix + "SomeInvokerThing" ,
15371541 Message : "This is SomeInvokerThing that always applies for testing purposes" ,
15381542 MatchingRules : []MatchingRule {
15391543 {
0 commit comments