╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │110 const haxy_path = try std.fs.path.join(allocator, &.{ cwd_path, "zig-out/bin/haxy" }); │ │111 defer allocator.free(haxy_path); │ │112 │ │115 - const http_listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{http_port}); │ │116 - const ssh_listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{ssh_port}); │ │113 + const http_listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{port}); │ │114 + const ssh_listen_arg = std.fmt.comptimePrint("127.0.0.1:{}", .{port + 1}); │ │115 │ │116 const process = try std.process.spawn(io, .{ │ │117 .argv = &.{ haxy_path, "serve", "--http-listen", http_listen_arg, "--ssh-listen", ssh_listen_arg, "--data-dir", temp_dir_name },│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │120 .stderr = .ignore, │ │121 }); │ │122 │ │125 - const address = try std.Io.net.IpAddress.parseIp4("127.0.0.1", http_port);│ │123 + const address = try std.Io.net.IpAddress.parseIp4("127.0.0.1", port); │ │124 for (0..50) |_| { │ │125 const stream = address.connect(io, .{ .mode = .stream }) catch { │ │126 try std.Io.sleep(io, .fromMilliseconds(100), .real); │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │136 fn testFetch( │ │137 comptime repo_kind: rp.RepoKind, │ │138 comptime transport_def: net.TransportDefinition,│ │139 + comptime port: u16, │ │140 io: std.Io, │ │141 allocator: std.mem.Allocator, │ │142 ) !void { │ ╰─────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │154 defer temp_dir.close(io); │ │155 │ │156 // init server │ │158 - var server_process = try runServer(io, allocator, temp_dir_name); │ │157 + var server_process = try runServer(io, allocator, temp_dir_name, port);│ │158 defer _ = server_process.kill(io); │ │159 │ │160 // register the repo under admin and locate its on-disk directory │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │195 │ │196 // add remote │ │197 { │ │199 - const remote_url = try remoteUrl(transport_def, allocator, "testrepo"); │ │198 + const remote_url = try remoteUrl(transport_def, allocator, "testrepo", port); │ │199 defer allocator.free(remote_url); │ │200 │ │201 try client_repo.addRemote(io, allocator, .{ .name = "origin", .value = remote_url });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │215 .file => false, │ │216 .wire => |wire_kind| .ssh == wire_kind, │ │217 }; │ │219 - const ssh_cmd_maybe = try sshCommand(is_ssh, allocator, cwd_path, temp_dir_name); │ │218 + const ssh_cmd_maybe = try sshCommand(is_ssh, allocator, cwd_path, temp_dir_name, port);│ │219 defer if (ssh_cmd_maybe) |ssh_cmd| allocator.free(ssh_cmd); │ │220 │ │221 try client_repo.fetch( │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │276 fn testPush( │ │277 comptime repo_kind: rp.RepoKind, │ │278 comptime transport_def: net.TransportDefinition,│ │279 + comptime port: u16, │ │280 io: std.Io, │ │281 allocator: std.mem.Allocator, │ │282 ) !void { │ ╰─────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │294 defer temp_dir.close(io); │ │295 │ │296 // init server │ │297 - var server_process = try runServer(io, allocator, temp_dir_name); │ │297 + var server_process = try runServer(io, allocator, temp_dir_name, port);│ │298 defer _ = server_process.kill(io); │ │299 │ │300 // register the repo under admin and locate its on-disk directory │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │338 │ │339 // add remote │ │340 { │ │341 - const remote_url = try remoteUrl(transport_def, allocator, "testrepo"); │ │341 + const remote_url = try remoteUrl(transport_def, allocator, "testrepo", port); │ │342 defer allocator.free(remote_url); │ │343 │ │344 try client_repo.addRemote(io, allocator, .{ .name = "origin", .value = remote_url });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │353 .file => false, │ │354 .wire => |wire_kind| .ssh == wire_kind, │ │355 }; │ │356 - const ssh_cmd_maybe = try sshCommand(is_ssh, allocator, cwd_path, temp_dir_name); │ │356 + const ssh_cmd_maybe = try sshCommand(is_ssh, allocator, cwd_path, temp_dir_name, port);│ │357 defer if (ssh_cmd_maybe) |ssh_cmd| allocator.free(ssh_cmd); │ │358 │ │359 try client_repo.push( │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯