summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
author1000101 <b1000101@pm.me>2020-06-23 13:09:03 +0200
committer1000101 <b1000101@pm.me>2020-06-26 16:16:49 +0200
commitc6d346b323043cdf84517a4723e358c2fc55011b (patch)
treeb19d6ed998d489dbdd593f36964099af0982ebaf /nixos
parentde3c56ffd83f88d988923984d579d23e386c00f9 (diff)
nixos/blockbook-frontend: add tests
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/blockbook-frontend.nix28
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 7056d414e9e9..a210a68bfefd 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -33,6 +33,7 @@ in
bees = handleTest ./bees.nix {};
bind = handleTest ./bind.nix {};
bittorrent = handleTest ./bittorrent.nix {};
+ blockbook-frontend = handleTest ./blockbook-frontend.nix {};
buildkite-agents = handleTest ./buildkite-agents.nix {};
boot = handleTestOn ["x86_64-linux"] ./boot.nix {}; # syslinux is unsupported on aarch64
boot-stage1 = handleTest ./boot-stage1.nix {};
diff --git a/nixos/tests/blockbook-frontend.nix b/nixos/tests/blockbook-frontend.nix
new file mode 100644
index 000000000000..67d0fcab9479
--- /dev/null
+++ b/nixos/tests/blockbook-frontend.nix
@@ -0,0 +1,28 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+ name = "blockbook-frontend";
+ meta = with pkgs.stdenv.lib; {
+ maintainers = with maintainers; [ maintainers."1000101" ];
+ };
+
+ machine = { ... }: {
+ services.blockbook-frontend."test" = {
+ enable = true;
+ };
+ services.bitcoind = {
+ enable = true;
+ rpc = {
+ port = 8030;
+ users.rpc.passwordHMAC = "acc2374e5f9ba9e62a5204d3686616cf$53abdba5e67a9005be6a27ca03a93ce09e58854bc2b871523a0d239a72968033";
+ };
+ };
+ };
+
+ testScript = ''
+ start_all()
+ machine.wait_for_unit("blockbook-frontend-test.service")
+
+ machine.wait_for_open_port(9030)
+
+ machine.succeed("curl -sSfL http://localhost:9030 | grep 'Blockbook'")
+ '';
+})