@@ -89,6 +89,7 @@ var _ = common.SIGDescribe("Events API", func() {
89
89
Testname: New Event resource lifecycle, testing a single event
90
90
Description: Create an event, the event MUST exist.
91
91
The event is patched with a new note, the check MUST have the update note.
92
+ The event is updated with a new series, the check MUST have the update series.
92
93
The event is deleted and MUST NOT show up when listing all events.
93
94
*/
94
95
framework .ConformanceIt ("should ensure that an event can be fetched, patched, deleted, and listed" , func () {
@@ -147,6 +148,24 @@ var _ = common.SIGDescribe("Events API", func() {
147
148
framework .Failf ("test event wasn't properly patched: %v" , diff .ObjectReflectDiff (testEvent , event ))
148
149
}
149
150
151
+ ginkgo .By ("updating the test event" )
152
+ testEvent .Series = & eventsv1.EventSeries {
153
+ Count : 100 ,
154
+ LastObservedTime : metav1.MicroTime {Time : time .Unix (1505828956 , 0 )},
155
+ }
156
+ _ , err = client .Update (context .TODO (), testEvent , metav1.UpdateOptions {})
157
+ framework .ExpectNoError (err , "failed to update the test event" )
158
+
159
+ ginkgo .By ("getting the test event" )
160
+ event , err = client .Get (context .TODO (), eventName , metav1.GetOptions {})
161
+ framework .ExpectNoError (err , "failed to get test event" )
162
+ // clear ResourceVersion and ManagedFields which are set by control-plane
163
+ event .ObjectMeta .ResourceVersion = ""
164
+ event .ObjectMeta .ManagedFields = nil
165
+ if ! apiequality .Semantic .DeepEqual (testEvent , event ) {
166
+ framework .Failf ("test event wasn't properly updated: %v" , diff .ObjectReflectDiff (testEvent , event ))
167
+ }
168
+
150
169
ginkgo .By ("deleting the test event" )
151
170
err = client .Delete (context .TODO (), eventName , metav1.DeleteOptions {})
152
171
framework .ExpectNoError (err , "failed to delete the test event" )
0 commit comments