Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Tests/AWSLambdaEventsTests/S3Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ struct S3Tests {
#expect(record.awsRegion == .eu_central_1)
#expect(record.eventName == "ObjectCreated:Put")
#expect(record.eventTime.ISO8601Format() == Date(timeIntervalSince1970: 1_578_907_540.621).ISO8601Format())
// see https://github.com/swiftlang/swift-foundation/issues/1561#issuecomment-3448853449
#expect(abs(record.eventTime.timeIntervalSince1970 - 1_578_907_540.621) < 0.0005)
#expect(record.userIdentity == S3Event.UserIdentity(principalId: "AWS:AAAAAAAJ2MQ4YFQZ7AULJ"))
#expect(record.requestParameters == S3Event.RequestParameters(sourceIPAddress: "123.123.123.123"))
#expect(record.responseElements.count == 2)
Expand All @@ -136,6 +138,8 @@ struct S3Tests {
#expect(record.awsRegion == .eu_central_1)
#expect(record.eventName == "ObjectRemoved:DeleteMarkerCreated")
#expect(record.eventTime.ISO8601Format() == Date(timeIntervalSince1970: 1_578_907_540.621).ISO8601Format())
// see https://github.com/swiftlang/swift-foundation/issues/1561#issuecomment-3448853449
#expect(abs(record.eventTime.timeIntervalSince1970 - 1_578_907_540.621) < 0.0005)
#expect(record.userIdentity == S3Event.UserIdentity(principalId: "AWS:AAAAAAAJ2MQ4YFQZ7AULJ"))
#expect(record.requestParameters == S3Event.RequestParameters(sourceIPAddress: "123.123.123.123"))
#expect(record.responseElements.count == 2)
Expand Down
4 changes: 4 additions & 0 deletions Tests/AWSLambdaEventsTests/Utils/DateWrapperTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ struct DateWrapperTests {
#if swift(<6.2)
let error = (any Error).self
#else
#if canImport(FoundationEssentials)
let error = Never.self
#else
let error = (any Error).self
#endif
#endif
#expect(throws: error) {
try JSONDecoder().decode(TestEvent.self, from: json.data(using: .utf8)!)
Expand Down