about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorSoner Sayakci <s.sayakci@shopware.com>2023-02-14 18:16:11 +0100
committerSoner Sayakci <s.sayakci@shopware.com>2023-02-14 20:00:27 +0000
commit4561785dfc6f454ce4df116a212f9282be76a164 (patch)
treeab99a3ee5e6c12a6655e202911d8dcba473fcb09 /nixos/tests
parentd7eb44a4210e86e93002a5de90dd425ddef8e5d4 (diff)
nixos/tests/opensearch: init
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/opensearch.nix19
2 files changed, 20 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index ced2687ed9a43..4e8334622f834 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -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 {};
diff --git a/nixos/tests/opensearch.nix b/nixos/tests/opensearch.nix
new file mode 100644
index 0000000000000..db63c2e053f5d
--- /dev/null
+++ b/nixos/tests/opensearch.nix
@@ -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"
+    )
+  '';
+})