You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve testing infra for fetchTree/fetchGit #9388
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
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.
Yes, it would be nice if you could upstream these modules. I played around a bit wit the python http server, but it seems like advanced path rewriting capabilities are required in order to use thegit-http-backend. Just using gitea might be simpler.
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
Activity
roberth commentedon Nov 19, 2023
I'd be happy to upstream into nixpkgs these modules that help set up a gitea. https://github.com/hercules-ci/hercules-ci-effects/tree/master/effects/testsupport
gitea is fairly quick to launch (unlike, say, gitlab) VM+gitea take about 10 s.
OTOH these a lot of value in keeping the test setup minimal.
Bootstrapping should be done without tests.
Also this could be a
checkstest instead of aninstallCheckPhasetest.DavHau commentedon Nov 19, 2023
Yes, it would be nice if you could upstream these modules. I played around a bit wit the python http server, but it seems like advanced path rewriting capabilities are required in order to use thegit-http-backend. Just using gitea might be simpler.
nixos-discourse commentedon Dec 3, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-12-01-nix-team-meeting-minutes-108/36402/1
initialize test suite for git fetchers
initialize test suite for git fetchers
initialize test suite for git fetchers
initialize test suite for git fetchers