╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭─────────────────────────────────────────────────────────╮ │553 fn testPushCreatesMissingRepo( │ │554 comptime repo_kind: rp.RepoKind, │ │555 comptime transport_def: net.TransportDefinition,│ │653 - comptime port: u16, │ │556 io: std.Io, │ │557 allocator: std.mem.Allocator, │ │558 ) !void { │ ╰─────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │568 defer cwd.deleteTree(io, temp_dir_name) catch {}; │ │569 defer temp_dir.close(io); │ │570 │ │669 - var server = try Server(transport_def, temp_dir_name, port).init(io, allocator);│ │670 - try server.start(); │ │671 - defer server.stop(); │ │571 + var server_process = try runServer(io, allocator, temp_dir_name); │ │572 + defer _ = server_process.kill(io); │ │573 │ │574 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │575 defer allocator.free(cwd_path); │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │602 const remote_url = switch (transport_def) { │ │603 .file => unreachable, │ │604 .wire => |wire_kind| switch (wire_kind) { │ │704 - .http => try std.fmt.allocPrint(allocator, "http://localhost:{}/server", .{port}), │ │605 + .http => try std.fmt.allocPrint(allocator, "http://localhost:{}/server", .{http_port}), │ │606 .raw => unreachable, │ │706 - .ssh => try std.fmt.allocPrint(allocator, "ssh://localhost:{}{s}{s}", .{ port, separator, server_path }), │ │607 + .ssh => try std.fmt.allocPrint(allocator, "ssh://localhost:{}{s}{s}", .{ ssh_port, separator, server_path }),│ │608 }, │ │609 }; │ │610 defer allocator.free(remote_url); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │619 }; │ │620 // haxy generates a fresh host key on every run, so don't try to record │ │621 // it. accept the unknown host and skip writing to known_hosts. the key │ │721 - // identity flag picks the ed25519 key created in Server.init. │ │622 + // identity flag picks the ed25519 key created in runServer. │ │623 const ssh_cmd_maybe: ?[]const u8 = if (is_ssh) blk: { │ │624 const priv_key_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "key" });│ │625 defer allocator.free(priv_key_path); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────╮ │628 } else null; │ │629 defer if (ssh_cmd_maybe) |ssh_cmd| allocator.free(ssh_cmd);│ │630 │ │730 - │ │631 try client_repo.push( │ │632 io, │ │633 allocator, │ ╰────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │651 fn testClone( │ │652 comptime repo_kind: rp.RepoKind, │ │653 comptime transport_def: net.TransportDefinition,│ │754 - comptime port: u16, │ │654 comptime shell_out_to_git: bool, │ │655 io: std.Io, │ │656 allocator: std.mem.Allocator, │ ╰─────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │669 defer temp_dir.close(io); │ │670 │ │671 // init server │ │773 - var server = try Server(transport_def, temp_dir_name, port).init(io, allocator);│ │774 - try server.start(); │ │775 - defer server.stop(); │ │672 + var server_process = try runServer(io, allocator, temp_dir_name); │ │673 + defer _ = server_process.kill(io); │ │674 │ │675 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │676 defer allocator.free(cwd_path); │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │733 //.file => try std.fmt.allocPrint(allocator, "file://{s}{s}", .{ separator, server_path }), │ │734 .file => try std.fmt.allocPrint(allocator, "server", .{}), // relative file paths work too │ │735 .wire => |wire_kind| switch (wire_kind) { │ │838 - .http => try std.fmt.allocPrint(allocator, "http://localhost:{}/server", .{port}), │ │839 - .raw => try std.fmt.allocPrint(allocator, "git://localhost:{}/server", .{port}), │ │840 - .ssh => try std.fmt.allocPrint(allocator, "ssh://localhost:{}{s}{s}", .{ port, separator, server_path }), │ │736 + .http => try std.fmt.allocPrint(allocator, "http://localhost:{}/server", .{http_port}), │ │737 + .raw => try std.fmt.allocPrint(allocator, "git://localhost:{}/server", .{http_port}), │ │738 + .ssh => try std.fmt.allocPrint(allocator, "ssh://localhost:{}{s}{s}", .{ ssh_port, separator, server_path }),│ │739 }, │ │740 }; │ │741 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │745 .file => false, │ │746 .wire => |wire_kind| .ssh == wire_kind, │ │747 }; │ │850 - │ │748 │ │749 if (shell_out_to_git) { │ │750 const priv_key_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "key" });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │ 929 client_path, │ │ 930 .{ .wire = .{ .ssh = .{ │ │ 931 .command = ssh_cmd_maybe, │ │1035 - } } }, │ │ 932 + } } }, │ │ 933 ); │ │ 934 defer client_repo.deinit(io, allocator);│ │ 935 │ ╰──────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯