@@ -7124,6 +7124,7 @@ mod tests {
71247124 /// A pkt-line receive-pack body carrying one branch-create ref update, so the
71257125 /// handler's post-receive tail resolves a non-empty new-tip set (the delta
71267126 /// scan's git stages run).
7127+ #[ cfg( unix) ]
71277128 fn ref_update_body ( new_sha : & str ) -> axum:: body:: Bytes {
71287129 let line = format ! ( "{ZERO_SHA} {new_sha} refs/heads/main" ) ;
71297130 axum:: body:: Bytes :: from ( format ! ( "{:04x}{}0000" , line. len( ) + 4 , line) )
@@ -9581,13 +9582,15 @@ mod tests {
95819582 )
95829583 }
95839584
9585+ #[ cfg( unix) ]
95849586 fn f2a_log ( log : & std:: path:: Path ) -> String {
95859587 std:: fs:: read_to_string ( log) . unwrap_or_default ( )
95869588 }
95879589
95889590 /// Withheld-walk children run so far. `ls-tree` is the walk's signature child
95899591 /// (`blob_paths` lists every reachable commit's tree); the delta scan and the
95909592 /// full-scan fallback use `rev-list` / `cat-file` instead.
9593+ #[ cfg( unix) ]
95919594 fn f2a_walks ( log : & std:: path:: Path ) -> usize {
95929595 f2a_log ( log)
95939596 . lines ( )
@@ -9599,6 +9602,7 @@ mod tests {
95999602 /// the withheld walk actually runs rather than taking the no-rule shortcut).
96009603 /// The repo's on-disk path is passed to the tail directly, so no repo_store or
96019604 /// receive-pack plumbing is involved.
9605+ #[ cfg( unix) ]
96029606 async fn f2a_state (
96039607 pool : sqlx:: PgPool ,
96049608 git_bin : & str ,
@@ -9630,6 +9634,7 @@ mod tests {
96309634 ( state, rec)
96319635 }
96329636
9637+ #[ cfg( unix) ]
96339638 fn f2a_update ( ref_name : & str , new_sha : & str ) -> Vec < RefUpdate > {
96349639 vec ! [ RefUpdate {
96359640 old_sha: ZERO_SHA . to_string( ) ,
@@ -9638,6 +9643,7 @@ mod tests {
96389643 } ]
96399644 }
96409645
9646+ #[ cfg( unix) ]
96419647 const F2A_PUSHER : & str = "did:key:z6MkF2aPusherAAAAAAAAAAAAAAAAAAAAAAAAAA" ;
96429648
96439649 /// Scenario 1 (the finding). A second rapid push to the same repo coalesces
@@ -9711,6 +9717,7 @@ mod tests {
97119717 }
97129718 /// Poll `cond` until it holds, with a bound so a regression fails the test
97139719 /// rather than hanging the suite.
9720+ #[ cfg( unix) ]
97149721 async fn f2a_wait_for ( mut cond : impl FnMut ( ) -> bool , what : & str ) {
97159722 let deadline = std:: time:: Instant :: now ( ) + std:: time:: Duration :: from_secs ( 20 ) ;
97169723 while !cond ( ) {
@@ -9725,6 +9732,7 @@ mod tests {
97259732 /// A `rev-list --objects` line names the tips a DELTA scan was asked to resolve,
97269733 /// so it attributes that scan to one push's tips. The withheld walk's own
97279734 /// `rev-list --all` / `ls-tree` lines never carry a tip as an argument this way.
9735+ #[ cfg( unix) ]
97289736 fn f2a_delta_scanned ( log : & std:: path:: Path , tip : & str ) -> bool {
97299737 f2a_log ( log)
97309738 . lines ( )
@@ -9871,6 +9879,7 @@ mod tests {
98719879
98729880 /// Mount a Pinata upload endpoint that assigns every object the same CID, and
98739881 /// point the state at it. Returns the server (kept alive by the caller) and CID.
9882+ #[ cfg( unix) ]
98749883 async fn f2a_pinata ( state : & mut AppState ) -> ( mockito:: ServerGuard , String ) {
98759884 let cid = "bafyf2acoalescedmapping" . to_string ( ) ;
98769885 let mut server = mockito:: Server :: new_async ( ) . await ;
@@ -9890,6 +9899,7 @@ mod tests {
98909899
98919900 /// Poll the branch to CID table until the push's mapping lands (the Pinata
98929901 /// worker is detached), bounded so a regression fails rather than hangs.
9902+ #[ cfg( unix) ]
98939903 async fn f2a_wait_for_branch_cid (
98949904 db : & crate :: db:: Db ,
98959905 slug : & str ,
@@ -9909,6 +9919,7 @@ mod tests {
99099919 }
99109920 }
99119921
9922+ #[ cfg( unix) ]
99129923 fn f2a_slug ( rec : & crate :: db:: RepoRecord ) -> String {
99139924 format ! (
99149925 "{}/{}" ,
@@ -10042,6 +10053,7 @@ mod tests {
1004210053 // and `z6p2fail`), and owner-only push is on by default, so the identity has to
1004310054 // follow the repo each push targets rather than being fixed for both.
1004410055
10056+ #[ cfg( unix) ]
1004510057 fn p2_push (
1004610058 state : & AppState ,
1004710059 owner : & str ,
@@ -10060,6 +10072,7 @@ mod tests {
1006010072 )
1006110073 }
1006210074
10075+ #[ cfg( unix) ]
1006310076 fn p2_logged ( log : & std:: path:: Path , prefix : & str ) -> bool {
1006410077 f2a_log ( log) . lines ( ) . any ( |l| l. starts_with ( prefix) )
1006510078 }
@@ -10359,6 +10372,7 @@ mod tests {
1035910372 /// runs exactly one `rev-list --all`, so this counts the walks that were attempted
1036010373 /// (the `ls-tree` counter above cannot: a walk whose enumeration fails never gets
1036110374 /// to `ls-tree`).
10375+ #[ cfg( unix) ]
1036210376 fn f2b_walk_attempts ( log : & std:: path:: Path ) -> usize {
1036310377 f2a_log ( log)
1036410378 . lines ( )
0 commit comments