-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nixos/seafile: support running WebDAV extension
Added option to start the optional WebDAV service alongside a Seafile server. Added options for configuring the WebDAV service. Added subtests for WebDAV server to Seafile test.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ import ./make-test-python.nix ({ pkgs, ... }: | |
ccnetSettings.General.SERVICE_URL = "http://server"; | ||
adminEmail = "[email protected]"; | ||
initialAdminPassword = "seafile_password"; | ||
webdav = { | ||
enable = true; | ||
shareName = "/webdav"; | ||
}; | ||
}; | ||
services.nginx = { | ||
enable = true; | ||
|
@@ -33,6 +37,7 @@ import ./make-test-python.nix ({ pkgs, ... }: | |
proxy_http_version 1.1; | ||
''; | ||
}; | ||
locations."/webdav".proxyPass = "http://unix:/run/seafdav/gunicorn.sock:/webdav"; | ||
}; | ||
}; | ||
networking.firewall = { allowedTCPPorts = [ 80 ]; }; | ||
|
@@ -117,5 +122,15 @@ import ./make-test-python.nix ({ pkgs, ... }: | |
client2.succeed("ls -la test01 >&2") | ||
client2.succeed('[ `cat test01/first_file` = "bla" ]') | ||
with subtest("start webdav-server"): | ||
server.wait_for_unit("seafdav.service") | ||
server.wait_for_file("/run/seafdav/gunicorn.sock") | ||
with subtest("webdav download file"): | ||
client2.succeed( | ||
"curl http://server/webdav/test01/first_file -u admin\@example.com -p seafile_password -o first_file.webdav" | ||
) | ||
client2.succeed('[ `cat first_file.webdav` = "bla" ]') | ||
''; | ||
}) |