Skip to content

Improve testing infra for fetchTree/fetchGit #9388

@DavHau

Description

@DavHau

Is your feature request related to a problem? Please describe.
None of the code paths that could trigger actual networking seem to be tested as of now, limiting the test coverage to only file:// based actions.
I would like to add tests for potential bugs like this.

Describe the solution you'd like
Git already offers the git-http-backend CGI script. Therefore, all that's needed is a cgi capable http server. Python could be used, as it has all of that already built in, but having python as a dependency might be undesired due to bootstrapping complexity. Maybe there is a simpler cpp based http server that can be used.

Describe alternatives you've considered
Not testing network related code paths -> Instead rely on humans to find bugs during code review -> slow and unreliable.

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalfetchingNetworking with the outside (non-Nix) world, input lockingidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.tests

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions