mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/tests/gitdaemon: fix user and group
- change tmpfiles rule user/group to default daemon user/group set by gitDaemon module - git:git - add chown of created repo to user/group of daemon after local subtest on server (that run from root user) pass. Without it next subtest doing clone from remote fails with "detected dubious ownership in repository" on server side.
This commit is contained in:
parent
f7bff2d6e4
commit
a0e1d1fd6c
@ -20,7 +20,7 @@ in {
|
|||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
# type path mode user group age arg
|
# type path mode user group age arg
|
||||||
" d /git 0755 root root - -"
|
" d /git 0755 git git - -"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.gitDaemon = {
|
services.gitDaemon = {
|
||||||
@ -56,6 +56,10 @@ in {
|
|||||||
"rm -r /project",
|
"rm -r /project",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Change user/group to default daemon user/group from module
|
||||||
|
# to avoid "fatal: detected dubious ownership in repository at '/git/project.git'"
|
||||||
|
server.succeed("chown git:git -R /git/project.git")
|
||||||
|
|
||||||
with subtest("git daemon starts"):
|
with subtest("git daemon starts"):
|
||||||
server.wait_for_unit("git-daemon.service")
|
server.wait_for_unit("git-daemon.service")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user