mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
nixosTests/bitbox-bridge: init
only run these tests on linux Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
This commit is contained in:
@@ -214,6 +214,7 @@ in {
|
||||
bind = handleTest ./bind.nix {};
|
||||
bird = handleTest ./bird.nix {};
|
||||
birdwatcher = handleTest ./birdwatcher.nix {};
|
||||
bitbox-bridge = runTest ./bitbox-bridge.nix;
|
||||
bitcoind = handleTest ./bitcoind.nix {};
|
||||
bittorrent = handleTest ./bittorrent.nix {};
|
||||
blockbook-frontend = handleTest ./blockbook-frontend.nix {};
|
||||
|
||||
30
nixos/tests/bitbox-bridge.nix
Normal file
30
nixos/tests/bitbox-bridge.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
testPort = 8179;
|
||||
in
|
||||
{
|
||||
name = "bitbox-bridge";
|
||||
meta = {
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [
|
||||
izelnakri
|
||||
tensor5
|
||||
];
|
||||
};
|
||||
|
||||
nodes.machine = {
|
||||
services.bitbox-bridge = {
|
||||
enable = true;
|
||||
port = testPort;
|
||||
runOnMount = false;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("bitbox-bridge.service")
|
||||
machine.wait_for_open_port(${toString testPort})
|
||||
machine.wait_until_succeeds("curl -fL http://localhost:${toString testPort}/api/info | grep version")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user