nixos/tests/opensearch: init

This commit is contained in:
Soner Sayakci 2023-02-14 18:16:11 +01:00
parent d7eb44a421
commit 4561785dfc
No known key found for this signature in database
3 changed files with 23 additions and 0 deletions

View file

@ -490,6 +490,7 @@ in {
ombi = handleTest ./ombi.nix {};
openarena = handleTest ./openarena.nix {};
openldap = handleTest ./openldap.nix {};
opensearch = handleTest ./opensearch.nix {};
openresty-lua = handleTest ./openresty-lua.nix {};
opensmtpd = handleTest ./opensmtpd.nix {};
opensmtpd-rspamd = handleTest ./opensmtpd-rspamd.nix {};

View file

@ -0,0 +1,19 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "opensearch";
meta.maintainers = with pkgs.lib.maintainers; [ shyim ];
nodes.machine = {
virtualisation.memorySize = 2048;
services.opensearch.enable = true;
};
testScript = ''
machine.start()
machine.wait_for_unit("opensearch.service")
machine.wait_for_open_port(9200)
machine.succeed(
"curl --fail localhost:9200"
)
'';
})

View file

@ -8,6 +8,7 @@
, coreutils
, autoPatchelfHook
, zlib
, nixosTests
}:
stdenvNoCC.mkDerivation rec {
@ -41,6 +42,8 @@ stdenvNoCC.mkDerivation rec {
runHook postInstall
'';
passthru.tests = { inherit (nixosTests) opensearch; };
meta = {
description = "Open Source, Distributed, RESTful Search Engine";
homepage = "https://github.com/opensearch-project/OpenSearch";