Skip to content

Commit 5ec2627

Browse files
authored
Attempt to fix issue #102 (#104)
After the explanation received by Stephen (swiftlang/swift-foundation#1561 (comment)), change the test to make it pass with Double+Double date precision
1 parent a85c7a7 commit 5ec2627

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/AWSLambdaEventsTests/S3Tests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct S3Tests {
111111
#expect(record.eventSource == "aws:s3")
112112
#expect(record.awsRegion == .eu_central_1)
113113
#expect(record.eventName == "ObjectCreated:Put")
114-
#expect(record.eventTime == Date(timeIntervalSince1970: 1_578_907_540.621))
114+
#expect(record.eventTime.ISO8601Format() == Date(timeIntervalSince1970: 1_578_907_540.621).ISO8601Format())
115115
#expect(record.userIdentity == S3Event.UserIdentity(principalId: "AWS:AAAAAAAJ2MQ4YFQZ7AULJ"))
116116
#expect(record.requestParameters == S3Event.RequestParameters(sourceIPAddress: "123.123.123.123"))
117117
#expect(record.responseElements.count == 2)
@@ -135,7 +135,7 @@ struct S3Tests {
135135
#expect(record.eventSource == "aws:s3")
136136
#expect(record.awsRegion == .eu_central_1)
137137
#expect(record.eventName == "ObjectRemoved:DeleteMarkerCreated")
138-
#expect(record.eventTime == Date(timeIntervalSince1970: 1_578_907_540.621))
138+
#expect(record.eventTime.ISO8601Format() == Date(timeIntervalSince1970: 1_578_907_540.621).ISO8601Format())
139139
#expect(record.userIdentity == S3Event.UserIdentity(principalId: "AWS:AAAAAAAJ2MQ4YFQZ7AULJ"))
140140
#expect(record.requestParameters == S3Event.RequestParameters(sourceIPAddress: "123.123.123.123"))
141141
#expect(record.responseElements.count == 2)

0 commit comments

Comments
 (0)