@@ -203,7 +203,7 @@ import Vapor
203203 #expect( v. resolvedDependencies == [ . init( packageName: " packageName " ,
204204 repositoryURL: " repositoryURL " ) ] )
205205 // build failed, hence no package platform compatibility yet
206- let p = try await XCTUnwrapAsync ( try await Package . find ( p. id, on: app. db) )
206+ let p = try #require ( try await Package . find ( p. id, on: app. db) )
207207 #expect( p. platformCompatibility == [ ] )
208208 } )
209209 }
@@ -237,7 +237,7 @@ import Vapor
237237 #expect( v. resolvedDependencies == [ . init( packageName: " foo " ,
238238 repositoryURL: " http://foo/bar " ) ] )
239239 // build ok now -> package is macos compatible
240- let p = try await XCTUnwrapAsync ( try await Package . find ( p. id, on: app. db) )
240+ let p = try #require ( try await Package . find ( p. id, on: app. db) )
241241 #expect( p. platformCompatibility == [ . macOS] )
242242 } )
243243 }
@@ -262,7 +262,7 @@ import Vapor
262262 let builds = try await Build . query ( on: app. db) . all ( )
263263 #expect( Set ( builds. map ( \. id) ) == Set ( [ . id0, . id1] ) )
264264 // additional ios build ok -> package is also ios compatible
265- let p = try await XCTUnwrapAsync ( try await Package . find ( p. id, on: app. db) )
265+ let p = try #require ( try await Package . find ( p. id, on: app. db) )
266266 #expect( p. platformCompatibility == [ . iOS, . macOS] )
267267 } )
268268 }
@@ -376,10 +376,10 @@ import Vapor
376376 " api/versions/ \( versionId) /build-report " ,
377377 headers: . applicationJSON,
378378 body: body,
379- afterResponse: { res in
379+ afterResponse: { res async throws in
380380 // validation
381381 #expect( res. status == . unauthorized)
382- try await XCTAssertEqualAsync ( try await Build . query ( on: db) . count ( ) , 0 )
382+ #expect ( try await Build . query ( on: db) . count ( ) == 0 )
383383 }
384384 )
385385
@@ -389,10 +389,10 @@ import Vapor
389389 " api/versions/ \( versionId) /build-report " ,
390390 headers: . bearerApplicationJSON( " wrong " ) ,
391391 body: body,
392- afterResponse: { res in
392+ afterResponse: { res async throws in
393393 // validation
394394 #expect( res. status == . unauthorized)
395- try await XCTAssertEqualAsync ( try await Build . query ( on: db) . count ( ) , 0 )
395+ #expect ( try await Build . query ( on: db) . count ( ) == 0 )
396396 }
397397 )
398398
@@ -405,10 +405,10 @@ import Vapor
405405 " api/versions/ \( versionId) /build-report " ,
406406 headers: . bearerApplicationJSON( " secr3t " ) ,
407407 body: body,
408- afterResponse: { res in
408+ afterResponse: { res async throws in
409409 // validation
410410 #expect( res. status == . unauthorized)
411- try await XCTAssertEqualAsync ( try await Build . query ( on: db) . count ( ) , 0 )
411+ #expect ( try await Build . query ( on: db) . count ( ) == 0 )
412412 }
413413 )
414414 }
@@ -491,7 +491,7 @@ import Vapor
491491 body: body,
492492 afterResponse: { res async throws in
493493 // validation
494- let p = try await XCTUnwrapAsync ( await Package . find ( p. id, on: app. db) )
494+ let p = try #require ( await Package . find ( p. id, on: app. db) )
495495#if os(Linux)
496496 if p. updatedAt == originalPackageUpdate {
497497 logWarning ( )
@@ -707,10 +707,10 @@ import Vapor
707707 " api/builds/ \( buildId) /doc-report " ,
708708 headers: . applicationJSON,
709709 body: body,
710- afterResponse: { res in
710+ afterResponse: { res async throws in
711711 // validation
712712 #expect( res. status == . unauthorized)
713- try await XCTAssertEqualAsync ( try await DocUpload . query ( on: app. db) . count ( ) , 0 )
713+ #expect ( try await DocUpload . query ( on: app. db) . count ( ) == 0 )
714714 }
715715 )
716716
@@ -720,10 +720,10 @@ import Vapor
720720 " api/builds/ \( buildId) /doc-report " ,
721721 headers: . bearerApplicationJSON( " wrong " ) ,
722722 body: body,
723- afterResponse: { res in
723+ afterResponse: { res async throws in
724724 // validation
725725 #expect( res. status == . unauthorized)
726- try await XCTAssertEqualAsync ( try await DocUpload . query ( on: app. db) . count ( ) , 0 )
726+ #expect ( try await DocUpload . query ( on: app. db) . count ( ) == 0 )
727727 }
728728 )
729729
@@ -736,10 +736,10 @@ import Vapor
736736 " api/builds/ \( buildId) /doc-report " ,
737737 headers: . bearerApplicationJSON( " secr3t " ) ,
738738 body: body,
739- afterResponse: { res in
739+ afterResponse: { res async throws in
740740 // validation
741741 #expect( res. status == . unauthorized)
742- try await XCTAssertEqualAsync ( try await DocUpload . query ( on: app. db) . count ( ) , 0 )
742+ #expect ( try await DocUpload . query ( on: app. db) . count ( ) == 0 )
743743 }
744744 )
745745 }
0 commit comments