mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixosTests.haste-server: init
This commit is contained in:
parent
a1cbf8cfff
commit
d8bae875e0
@ -193,6 +193,7 @@ in
|
||||
hadoop.hdfs = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/hdfs.nix {};
|
||||
hadoop.yarn = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/yarn.nix {};
|
||||
haka = handleTest ./haka.nix {};
|
||||
haste-server = handleTest ./haste-server.nix {};
|
||||
haproxy = handleTest ./haproxy.nix {};
|
||||
hardened = handleTest ./hardened.nix {};
|
||||
hedgedoc = handleTest ./hedgedoc.nix {};
|
||||
|
23
nixos/tests/haste-server.nix
Normal file
23
nixos/tests/haste-server.nix
Normal file
@ -0,0 +1,23 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
{
|
||||
name = "haste-server";
|
||||
meta.maintainers = with lib.maintainers; [ mkg20001 ];
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
jq
|
||||
];
|
||||
|
||||
services.haste-server = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("haste-server")
|
||||
machine.wait_until_succeeds("curl -s localhost:7777")
|
||||
machine.succeed('curl -s -X POST http://localhost:7777/documents -d "Hello World!" > bla')
|
||||
machine.succeed('curl http://localhost:7777/raw/$(cat bla | jq -r .key) | grep "Hello World"')
|
||||
'';
|
||||
})
|
Loading…
Reference in New Issue
Block a user