@@ -13,7 +13,6 @@ import (
1313 "time"
1414
1515 cloudevents "github.com/cloudevents/sdk-go/v2"
16- "github.com/cloudevents/sdk-go/v2/types"
1716)
1817
1918func TestSenderReceiver_binary_v1 (t * testing.T ) {
@@ -101,7 +100,6 @@ func TestSenderReceiver_binary_v1(t *testing.T) {
101100
102101func TestSenderReceiver_structured_v1 (t * testing.T ) {
103102 now := time .Now ()
104-
105103 testCases := DirectTapTestCases {
106104 "Structured v1.0" : {
107105 now : now ,
@@ -131,7 +129,7 @@ func TestSenderReceiver_structured_v1(t *testing.T) {
131129 Header : map [string ][]string {
132130 "content-type" : {"application/cloudevents+json" },
133131 },
134- 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"}` , types . FormatTime ( now .UTC () )),
132+ 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 )),
135133 ContentLength : 182 ,
136134 },
137135 },
@@ -177,7 +175,7 @@ func TestSenderReceiver_data_base64_v1(t *testing.T) {
177175 Header : map [string ][]string {
178176 "content-type" : {"application/cloudevents+json" },
179177 },
180- 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 .UTC (). Format (time .RFC3339Nano )),
178+ 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 )),
181179 ContentLength : 191 ,
182180 },
183181 },
0 commit comments