File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Tests/AWSLambdaRuntimeCoreTests Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ import Foundation
1516import NIOHTTP1
16- import XCTest
17+ import Testing
1718
1819@testable import AWSLambdaRuntimeCore
1920
20- class InvocationTest : XCTestCase {
21+ @Suite
22+ struct InvocationTest {
23+ @Test
2124 func testInvocationTraceID( ) throws {
2225 let headers = HTTPHeaders ( [
2326 ( AmazonHeaders . requestID, " test " ) ,
2427 ( AmazonHeaders . deadline, String ( Date ( timeIntervalSinceNow: 60 ) . millisSinceEpoch) ) ,
2528 ( AmazonHeaders . invokedFunctionARN, " arn:aws:lambda:us-east-1:123456789012:function:custom-runtime " ) ,
2629 ] )
2730
28- var invocation : InvocationMetadata ?
31+ var maybeInvocation : InvocationMetadata ?
2932
30- XCTAssertNoThrow ( invocation = try InvocationMetadata ( headers: headers) )
31- XCTAssertNotNil ( invocation)
32-
33- guard !invocation!. traceID. isEmpty else {
34- XCTFail ( " Invocation traceID is empty " )
35- return
36- }
33+ #expect( throws: Never . self) { maybeInvocation = try InvocationMetadata ( headers: headers) }
34+ let invocation = try #require( maybeInvocation)
35+ #expect( !invocation. traceID. isEmpty)
3736 }
3837}
You can’t perform that action at this time.
0 commit comments