╭ changed ───╮ │src/test.zig│ ╰────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │10 test "fetch small" { │ │11 const io = std.testing.io; │ │12 const allocator = std.testing.allocator; │ │13 - try testFetch(.xit, .xit, .{ .wire = .http }, 3004, false, io, allocator); │ │14 - try testFetch(.xit, .xit, .{ .wire = .http }, 3005, true, io, allocator); │ │13 + try testFetch(.xit, .{ .wire = .http }, 3000, io, allocator); │ │14 if (.windows != builtin.os.tag) { │ │16 - try testFetch(.xit, .xit, .{ .wire = .ssh }, 3006, false, io, allocator);│ │17 - try testFetch(.xit, .xit, .{ .wire = .ssh }, 3007, true, io, allocator); │ │15 + try testFetch(.xit, .{ .wire = .ssh }, 3001, io, allocator); │ │16 } │ │17 } │ │18 │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │19 test "push small" { │ │20 const io = std.testing.io; │ │21 const allocator = std.testing.allocator; │ │24 - try testPush(.xit, .xit, .{ .wire = .http }, 3010, false, io, allocator); │ │25 - try testPush(.xit, .xit, .{ .wire = .http }, 3011, true, io, allocator); │ │22 + try testPush(.xit, .{ .wire = .http }, 3010, io, allocator); │ │23 if (.windows != builtin.os.tag) { │ │27 - try testPush(.xit, .xit, .{ .wire = .ssh }, 3012, false, io, allocator);│ │28 - try testPush(.xit, .xit, .{ .wire = .ssh }, 3013, true, io, allocator); │ │24 + try testPush(.xit, .{ .wire = .ssh }, 3011, io, allocator); │ │25 } │ │26 } │ │27 │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │28 test "push creates missing repo under serve" { │ │29 const io = std.testing.io; │ │30 const allocator = std.testing.allocator; │ │35 - try testPushCreatesMissingRepo(.xit, .xit, .{ .wire = .http }, 3014, io, allocator); │ │31 + try testPushCreatesMissingRepo(.xit, .{ .wire = .http }, 3020, io, allocator); │ │32 if (.windows != builtin.os.tag) { │ │37 - try testPushCreatesMissingRepo(.xit, .xit, .{ .wire = .ssh }, 3015, io, allocator);│ │33 + try testPushCreatesMissingRepo(.xit, .{ .wire = .ssh }, 3021, io, allocator); │ │34 } │ │35 } │ │36 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │37 test "clone small" { │ │38 const io = std.testing.io; │ │39 const allocator = std.testing.allocator; │ │44 - try testClone(.xit, .xit, .{ .wire = .http }, 3020, false, false, io, allocator); │ │45 - try testClone(.xit, .xit, .{ .wire = .http }, 3021, false, true, io, allocator); │ │40 + try testClone(.xit, .{ .wire = .http }, 3030, false, io, allocator); │ │41 if (.windows != builtin.os.tag) { │ │47 - try testClone(.xit, .xit, .{ .wire = .ssh }, 3022, false, false, io, allocator);│ │48 - try testClone(.xit, .xit, .{ .wire = .ssh }, 3023, false, true, io, allocator); │ │42 + try testClone(.xit, .{ .wire = .ssh }, 3031, false, io, allocator); │ │43 } │ │44 } │ │45 │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │46 test "clone small subprocess" { │ │47 const io = std.testing.io; │ │48 const allocator = std.testing.allocator; │ │55 - try testClone(.git, .xit, .{ .wire = .http }, 3030, true, false, io, allocator); │ │56 - try testClone(.git, .xit, .{ .wire = .http }, 3031, true, true, io, allocator); │ │49 + try testClone(.git, .{ .wire = .http }, 3040, true, io, allocator); │ │50 if (.windows != builtin.os.tag) { │ │58 - try testClone(.git, .xit, .{ .wire = .ssh }, 3032, true, false, io, allocator); │ │59 - try testClone(.git, .xit, .{ .wire = .ssh }, 3033, true, true, io, allocator); │ │51 + try testClone(.git, .{ .wire = .ssh }, 3041, true, io, allocator); │ │52 } │ │53 } │ │62 - │ │63 -test "fetch large" { │ │64 - const io = std.testing.io; │ │65 - const allocator = std.testing.allocator; │ │66 - try testFetchLarge(.git, .git, .{ .wire = .http }, 3040, false, false, io, allocator); │ │67 - if (.windows != builtin.os.tag) { │ │68 - try testFetchLarge(.git, .git, .{ .wire = .ssh }, 3041, false, false, io, allocator);│ │69 - } │ │70 -} │ │71 - │ │54 test "fetch large subprocess" { │ │73 - const io = std.testing.io; │ │74 - const allocator = std.testing.allocator; │ │75 - try testFetchLarge(.git, .xit, .{ .wire = .http }, 3050, true, false, io, allocator); │ │76 - try testFetchLarge(.git, .xit, .{ .wire = .http }, 3051, true, true, io, allocator); │ │77 - if (.windows != builtin.os.tag) { │ │78 - try testFetchLarge(.git, .xit, .{ .wire = .ssh }, 3052, true, false, io, allocator); │ │79 - try testFetchLarge(.git, .xit, .{ .wire = .ssh }, 3053, true, true, io, allocator); │ │80 - } │ │81 -} │ │82 - │ │83 -test "push large" { │ │55 const io = std.testing.io; │ │56 const allocator = std.testing.allocator; │ │86 - try testPushLarge(.git, .git, .{ .wire = .http }, 3060, false, false, io, allocator); │ │57 + try testFetchLarge(.git, .{ .wire = .http }, 3050, true, io, allocator); │ │58 if (.windows != builtin.os.tag) { │ │88 - try testPushLarge(.git, .git, .{ .wire = .ssh }, 3061, false, false, io, allocator); │ │59 + try testFetchLarge(.git, .{ .wire = .ssh }, 3051, true, io, allocator); │ │60 } │ │61 } │ │91 - │ │62 test "push large subprocess" { │ │63 const io = std.testing.io; │ │64 const allocator = std.testing.allocator; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │95 - try testPushLarge(.git, .xit, .{ .wire = .http }, 3070, true, false, io, allocator); │ │96 - try testPushLarge(.git, .xit, .{ .wire = .http }, 3071, true, true, io, allocator); │ │65 + try testPushLarge(.git, .{ .wire = .http }, 3060, true, io, allocator); │ │66 if (.windows != builtin.os.tag) { │ │98 - try testPushLarge(.git, .xit, .{ .wire = .ssh }, 3072, true, false, io, allocator);│ │99 - try testPushLarge(.git, .xit, .{ .wire = .ssh }, 3073, true, true, io, allocator); │ │67 + try testPushLarge(.git, .{ .wire = .ssh }, 3061, true, io, allocator); │ │68 } │ │69 } │ │70 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │ 71 fn Server( │ │104 - comptime server_repo_kind: rp.RepoKind, │ │ 72 comptime transport_def: net.TransportDefinition,│ │ 73 comptime temp_dir_name: []const u8, │ │ 74 comptime port: u16, │ ╰─────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────╮ │108 - comptime use_serve_command: bool,│ │ 75 ) type { │ │ 76 return struct { │ │ 77 core: Core, │ ╰──────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────╮ │ 79 const Core = switch (transport_def) { │ │ 80 .file => void, │ │ 81 .wire => |wire_kind| switch (wire_kind) { │ │116 - .http => if (use_serve_command) struct {│ │ 82 + .http => struct { │ │ 83 io: std.Io, │ │ 84 allocator: std.mem.Allocator, │ │ 85 process: ?std.process.Child, │ ╰─────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │120 - } else struct { │ │121 - io: std.Io, │ │122 - allocator: std.mem.Allocator, │ │123 - temp_dir_name: []const u8, │ │124 - stop_server_endpoint: []const u8, │ │125 - net_server: std.Io.net.Server, │ │126 - server_thread: std.Thread, │ │ 86 }, │ │ 87 .raw => unreachable, │ │129 - .ssh => if (use_serve_command) struct {│ │ 88 + .ssh => struct { │ │ 89 io: std.Io, │ │ 90 allocator: std.mem.Allocator, │ │ 91 sshd_process: ?std.process.Child, │ ╰────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯