depot/third_party/nixpkgs/nixos/tests/eris-server.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

23 lines
698 B
Nix

import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "eris-server";
meta.maintainers = with lib.maintainers; [ ehmry ];
nodes.server = {
environment.systemPackages = [ pkgs.eris-go pkgs.nim.pkgs.eris ];
services.eris-server = {
enable = true;
decode = true;
listenHttp = "[::1]:80";
backends = [ "badger+file:///var/cache/eris.badger?get&put" ];
mountpoint = "/eris";
};
};
testScript = ''
start_all()
server.wait_for_unit("eris-server.service")
server.wait_for_open_port(5683)
server.wait_for_open_port(80)
server.succeed("eriscmd get http://[::1] $(echo 'Hail ERIS!' | eriscmd put coap+tcp://[::1]:5683)")
'';
})