mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
nixos/tests/svnserve: init
This commit is contained in:
parent
4e4dfda28b
commit
635fa3d7ee
|
|
@ -1405,6 +1405,7 @@ in
|
||||||
inherit runTest;
|
inherit runTest;
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
};
|
};
|
||||||
|
svnserve = runTest ./svnserve.nix;
|
||||||
swap-file-btrfs = runTest ./swap-file-btrfs.nix;
|
swap-file-btrfs = runTest ./swap-file-btrfs.nix;
|
||||||
swap-partition = runTest ./swap-partition.nix;
|
swap-partition = runTest ./swap-partition.nix;
|
||||||
swap-random-encryption = runTest ./swap-random-encryption.nix;
|
swap-random-encryption = runTest ./swap-random-encryption.nix;
|
||||||
|
|
|
||||||
60
nixos/tests/svnserve.nix
Normal file
60
nixos/tests/svnserve.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
name = "svnserve";
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
server = {
|
||||||
|
virtualisation.vlans = [ 1 ];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useNetworkd = true;
|
||||||
|
useDHCP = false;
|
||||||
|
firewall.allowedTCPPorts = [ 3690 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.network.networks."01-eth1" = {
|
||||||
|
name = "eth1";
|
||||||
|
networkConfig.Address = "10.0.0.1/24";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.svnserve.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.subversion ];
|
||||||
|
};
|
||||||
|
|
||||||
|
client =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
virtualisation.vlans = [ 1 ];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useNetworkd = true;
|
||||||
|
useDHCP = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.network.networks."01-eth1" = {
|
||||||
|
name = "eth1";
|
||||||
|
networkConfig.Address = "10.0.0.2/24";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.subversion ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript =
|
||||||
|
{ nodes, ... }:
|
||||||
|
''
|
||||||
|
start_all()
|
||||||
|
|
||||||
|
server.wait_for_unit("svnserve")
|
||||||
|
server.wait_for_open_port(3690)
|
||||||
|
server.succeed("svnadmin create '${nodes.server.services.svnserve.svnBaseDir}/project'")
|
||||||
|
server.succeed("sed -i 's/# anon-access = read/anon-access = write/' '${nodes.server.services.svnserve.svnBaseDir}/project/conf/svnserve.conf'")
|
||||||
|
|
||||||
|
client.succeed("svn checkout svn://10.0.0.1/project")
|
||||||
|
client.succeed("cd ./project && echo hello > ./file.txt && svn add ./file.txt && svn commit -m 'Added file.txt'")
|
||||||
|
|
||||||
|
client.succeed("svn checkout svn://10.0.0.1/project project-copy")
|
||||||
|
client.succeed("grep hello project-copy/file.txt")
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
perl ? null,
|
perl ? null,
|
||||||
sasl ? null,
|
sasl ? null,
|
||||||
serf ? null,
|
serf ? null,
|
||||||
|
nixosTests,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert bdbSupport -> aprutil.bdbSupport;
|
assert bdbSupport -> aprutil.bdbSupport;
|
||||||
|
|
@ -156,6 +157,8 @@ let
|
||||||
nativeCheckInputs = [ python3 ];
|
nativeCheckInputs = [ python3 ];
|
||||||
doCheck = false; # fails 10 out of ~2300 tests
|
doCheck = false; # fails 10 out of ~2300 tests
|
||||||
|
|
||||||
|
passthru.tests = { inherit (nixosTests) svnserve; };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Version control system intended to be a compelling replacement for CVS in the open source community";
|
description = "Version control system intended to be a compelling replacement for CVS in the open source community";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue