@@ -117,7 +117,7 @@ func TestSenderReceiver_structured_v1(t *testing.T) {
117
117
Context : cloudevents.EventContextV1 {
118
118
ID : "ABC-123" ,
119
119
Type : "unit.test.client.sent" ,
120
- Time : & cloudevents.Timestamp {Time : now . Truncate ( time . Second ) },
120
+ Time : & cloudevents.Timestamp {Time : now },
121
121
Source : * cloudevents .ParseURIRef ("/unit/test/client" ),
122
122
Subject : strptr ("resource" ),
123
123
DataContentType : cloudevents .StringOfApplicationJSON (),
@@ -130,7 +130,7 @@ func TestSenderReceiver_structured_v1(t *testing.T) {
130
130
Header : map [string ][]string {
131
131
"content-type" : {"application/cloudevents+json" },
132
132
},
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 )),
134
134
ContentLength : 182 ,
135
135
},
136
136
},
@@ -163,7 +163,7 @@ func TestSenderReceiver_data_base64_v1(t *testing.T) {
163
163
Context : cloudevents.EventContextV1 {
164
164
ID : "ABC-123" ,
165
165
Type : "unit.test.client.sent" ,
166
- Time : & cloudevents.Timestamp {Time : now . Truncate ( time . Second ) },
166
+ Time : & cloudevents.Timestamp {Time : now },
167
167
Source : * cloudevents .ParseURIRef ("/unit/test/client" ),
168
168
Subject : strptr ("resource" ),
169
169
DataContentType : cloudevents .StringOfTextPlain (),
@@ -176,7 +176,7 @@ func TestSenderReceiver_data_base64_v1(t *testing.T) {
176
176
Header : map [string ][]string {
177
177
"content-type" : {"application/cloudevents+json" },
178
178
},
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 )),
180
180
ContentLength : 191 ,
181
181
},
182
182
},
0 commit comments