Skip to content

Commit

Permalink
nixos/tests/xandikos: fix build
Browse files Browse the repository at this point in the history
Underscores in hostnames are invalid and rejected by `systemd-resolved`.
  • Loading branch information
Ma27 committed Nov 2, 2023
1 parent 362516f commit bb495fb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nixos/tests/xandikos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import ./make-test-python.nix (
meta.maintainers = with lib.maintainers; [ _0x4A6F ];

nodes = {
xandikos_client = {};
xandikos_default = {
xandikos-client = {};
xandikos-default = {
networking.firewall.allowedTCPPorts = [ 8080 ];
services.xandikos.enable = true;
};
xandikos_proxy = {
xandikos-proxy = {
networking.firewall.allowedTCPPorts = [ 80 8080 ];
services.xandikos.enable = true;
services.xandikos.address = "localhost";
Expand Down Expand Up @@ -47,7 +47,7 @@ import ./make-test-python.nix (
"curl -s --fail --location http://localhost:8080/ | grep -i Xandikos"
)
xandikos_client.wait_for_unit("network.target")
xandikos_client.fail("curl --fail http://xandikos_default:8080/")
xandikos_client.fail("curl --fail http://xandikos-default:8080/")
with subtest("Xandikos proxy"):
xandikos_proxy.wait_for_unit("multi-user.target")
Expand All @@ -58,12 +58,12 @@ import ./make-test-python.nix (
"curl -s --fail --location http://localhost:8080/ | grep -i Xandikos"
)
xandikos_client.wait_for_unit("network.target")
xandikos_client.fail("curl --fail http://xandikos_proxy:8080/")
xandikos_client.fail("curl --fail http://xandikos-proxy:8080/")
xandikos_client.succeed(
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/ | grep -i Xandikos"
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos-proxy/xandikos/ | grep -i Xandikos"
)
xandikos_client.succeed(
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/user/ | grep -i Xandikos"
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos-proxy/xandikos/user/ | grep -i Xandikos"
)
'';
}
Expand Down

0 comments on commit bb495fb

Please sign in to comment.