@@ -117,7 +117,7 @@ func TestSenderReceiver_structured_v1(t *testing.T) {
117117 Context : cloudevents.EventContextV1 {
118118 ID : "ABC-123" ,
119119 Type : "unit.test.client.sent" ,
120- Time : & cloudevents.Timestamp {Time : now . Truncate ( time . Second ) },
120+ Time : & cloudevents.Timestamp {Time : now },
121121 Source : * cloudevents .ParseURIRef ("/unit/test/client" ),
122122 Subject : strptr ("resource" ),
123123 DataContentType : cloudevents .StringOfApplicationJSON (),
@@ -130,7 +130,7 @@ func TestSenderReceiver_structured_v1(t *testing.T) {
130130 Header : map [string ][]string {
131131 "content-type" : {"application/cloudevents+json" },
132132 },
133- Body : fmt .Sprintf (`{"data":{"hello":"unittest"},"id":"ABC-123","source":"/unit/test/client","specversion":"1.0","subject":"resource","time":%q,"type":"unit.test.client.sent"}` , now .Truncate ( time . Second ). Format (time .RFC3339 )),
133+ Body : fmt .Sprintf (`{"data":{"hello":"unittest"},"id":"ABC-123","source":"/unit/test/client","specversion":"1.0","subject":"resource","time":%q,"type":"unit.test.client.sent"}` , now .Format (time .RFC3339 )),
134134 ContentLength : 182 ,
135135 },
136136 },
@@ -163,7 +163,7 @@ func TestSenderReceiver_data_base64_v1(t *testing.T) {
163163 Context : cloudevents.EventContextV1 {
164164 ID : "ABC-123" ,
165165 Type : "unit.test.client.sent" ,
166- Time : & cloudevents.Timestamp {Time : now . Truncate ( time . Second ) },
166+ Time : & cloudevents.Timestamp {Time : now },
167167 Source : * cloudevents .ParseURIRef ("/unit/test/client" ),
168168 Subject : strptr ("resource" ),
169169 DataContentType : cloudevents .StringOfTextPlain (),
@@ -176,7 +176,7 @@ func TestSenderReceiver_data_base64_v1(t *testing.T) {
176176 Header : map [string ][]string {
177177 "content-type" : {"application/cloudevents+json" },
178178 },
179- Body : fmt .Sprintf (`{"data_base64":"aGVsbG86IHVuaXR0ZXN0","id":"ABC-123","source":"/unit/test/client","specversion":"1.0","subject":"resource","time":%q,"type":"unit.test.client.sent"}` , now .Truncate ( time . Second ). Format (time .RFC3339 )),
179+ Body : fmt .Sprintf (`{"data_base64":"aGVsbG86IHVuaXR0ZXN0","id":"ABC-123","source":"/unit/test/client","specversion":"1.0","subject":"resource","time":%q,"type":"unit.test.client.sent"}` , now .Format (time .RFC3339 )),
180180 ContentLength : 191 ,
181181 },
182182 },
0 commit comments