@@ -98,25 +98,26 @@ func Test_recordAddOrUpdateEvent(t *testing.T) {
9898 expectedMessage : "pathological/true interesting/true reason/SomethingHappened Readiness probe failed (40 times)" ,
9999 },
100100 {
101- name : "allowed pathological event with known bug" ,
101+ name : "allowed pathological event with known bug (BZ 2000234) " ,
102102 args : args {
103103 ctx : context .TODO (),
104104 m : monitor .NewRecorder (),
105105 kubeEvent : & corev1.Event {
106106 Count : 40 ,
107- Reason : "TopologyAwareHintsDisabled " ,
107+ Reason : "ns/openshift-etcd pod/etcd-quorum-guard-42 node/worker-42 - reason/Unhealthy " ,
108108 InvolvedObject : corev1.ObjectReference {
109109 Kind : "Pod" ,
110- Namespace : "any " ,
111- Name : "any " ,
110+ Namespace : "openshift-etcd " ,
111+ Name : "etcd-quorum-guard-42 " ,
112112 },
113- Message : "irrelevant " ,
113+ Message : "Readiness probe failed: " ,
114114 LastTimestamp : metav1 .Now (),
115115 },
116116 significantlyBeforeNow : now .UTC ().Add (- 15 * time .Minute ),
117117 },
118- expectedLocator : "ns/any pod/any hmsg/e13faa98ab" ,
119- expectedMessage : "pathological/true interesting/true reason/TopologyAwareHintsDisabled irrelevant (40 times)" ,
118+ // hmsg in expectedLocator is the hash of the entire expectedMessage except the number of times
119+ expectedLocator : "ns/openshift-etcd pod/etcd-quorum-guard-42 hmsg/9100aa725d" ,
120+ expectedMessage : "pathological/true interesting/true reason/ns/openshift-etcd pod/etcd-quorum-guard-42 node/worker-42 - reason/Unhealthy Readiness probe failed: (40 times)" ,
120121 },
121122 }
122123 for _ , tt := range tests {
0 commit comments