tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixosTests.haste-server: init
Maciej Krüger
4 years ago
d8bae875
a1cbf8cf
+24
2 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
haste-server.nix
+1
nixos/tests/all-tests.nix
···
193
193
hadoop.hdfs = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/hdfs.nix {};
194
194
hadoop.yarn = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/yarn.nix {};
195
195
haka = handleTest ./haka.nix {};
196
196
+
haste-server = handleTest ./haste-server.nix {};
196
197
haproxy = handleTest ./haproxy.nix {};
197
198
hardened = handleTest ./hardened.nix {};
198
199
hedgedoc = handleTest ./hedgedoc.nix {};
+23
nixos/tests/haste-server.nix
···
1
1
+
import ./make-test-python.nix ({ pkgs, lib, ... }:
2
2
+
{
3
3
+
name = "haste-server";
4
4
+
meta.maintainers = with lib.maintainers; [ mkg20001 ];
5
5
+
6
6
+
nodes.machine = { pkgs, ... }: {
7
7
+
environment.systemPackages = with pkgs; [
8
8
+
curl
9
9
+
jq
10
10
+
];
11
11
+
12
12
+
services.haste-server = {
13
13
+
enable = true;
14
14
+
};
15
15
+
};
16
16
+
17
17
+
testScript = ''
18
18
+
machine.wait_for_unit("haste-server")
19
19
+
machine.wait_until_succeeds("curl -s localhost:7777")
20
20
+
machine.succeed('curl -s -X POST http://localhost:7777/documents -d "Hello World!" > bla')
21
21
+
machine.succeed('curl http://localhost:7777/raw/$(cat bla | jq -r .key) | grep "Hello World"')
22
22
+
'';
23
23
+
})