From a4fb46f861f724f331dcbda4c3c6eeba211ae555 Mon Sep 17 00:00:00 2001 From: Jonatan Date: Mon, 26 Oct 2026 08:28:27 +0100 Subject: [PATCH] oci: fix rqlite data directory argument --- oci/catalog/apps/rqlite.json | 10 +++++----- oci/catalog/curated/rqlite.json | 10 +++++----- oci/tests/test_rqlite_profile.py | 27 +++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 oci/tests/test_rqlite_profile.py diff --git a/oci/catalog/apps/rqlite.json b/oci/catalog/apps/rqlite.json index 3e59fb63..dbca2959 100644 --- a/oci/catalog/apps/rqlite.json +++ b/oci/catalog/apps/rqlite.json @@ -44,8 +44,8 @@ "revision": "b84d5f9796360a0640baf654cc6c753b78eb5cbe", "image_repository_url": "https://hub.docker.com/r/rqlite/rqlite", "readme_pushed_at": "", - "compose_sha256": "02897034112dbb5ec8ade00916662dbed07356db366083700c3df87ed862ff21", - "generated_at": "2026-10-26T00:00:00+00:00", + "compose_sha256": "05d6ccf9931bb85374fae008ca8d0b9b40913f9d8db39130c5c5723f56c7683a", + "generated_at": "2026-10-26T07:25:00+00:00", "readme_raw_url": "https://rqlite.io/docs/" }, "container_contract": { @@ -97,7 +97,7 @@ "related_services": [], "restart": "unless-stopped", "stop_grace_period": null, - "original_compose": "{\n \"name\": \"rqlite\",\n \"services\": {\n \"rqlite\": {\n \"image\": \"rqlite/rqlite:latest\",\n \"restart\": \"unless-stopped\",\n \"ports\": [\n \"4001:4001/tcp\",\n \"4002:4002/tcp\"\n ],\n \"volumes\": [\n \"./file:/rqlite/file\"\n ],\n \"command\": [\n \"-on-disk-path=/rqlite/file\"\n ]\n }\n }\n}" + "original_compose": "{\n \"name\": \"rqlite\",\n \"services\": {\n \"rqlite\": {\n \"image\": \"rqlite/rqlite:latest\",\n \"restart\": \"unless-stopped\",\n \"ports\": [\n \"4001:4001/tcp\",\n \"4002:4002/tcp\"\n ],\n \"volumes\": [\n \"./file:/rqlite/file\"\n ],\n \"command\": [\n \"/rqlite/file\"\n ]\n }\n }\n}" }, "compose_stack": { "project_name": "rqlite", @@ -126,7 +126,7 @@ "./file:/rqlite/file" ], "command": [ - "-on-disk-path=/rqlite/file" + "/rqlite/file" ] } } @@ -363,7 +363,7 @@ "installer_profile": { "runtime": { "command": [ - "-on-disk-path=/rqlite/file" + "/rqlite/file" ] }, "startup_healthcheck": { diff --git a/oci/catalog/curated/rqlite.json b/oci/catalog/curated/rqlite.json index 3e59fb63..dbca2959 100644 --- a/oci/catalog/curated/rqlite.json +++ b/oci/catalog/curated/rqlite.json @@ -44,8 +44,8 @@ "revision": "b84d5f9796360a0640baf654cc6c753b78eb5cbe", "image_repository_url": "https://hub.docker.com/r/rqlite/rqlite", "readme_pushed_at": "", - "compose_sha256": "02897034112dbb5ec8ade00916662dbed07356db366083700c3df87ed862ff21", - "generated_at": "2026-10-26T00:00:00+00:00", + "compose_sha256": "05d6ccf9931bb85374fae008ca8d0b9b40913f9d8db39130c5c5723f56c7683a", + "generated_at": "2026-10-26T07:25:00+00:00", "readme_raw_url": "https://rqlite.io/docs/" }, "container_contract": { @@ -97,7 +97,7 @@ "related_services": [], "restart": "unless-stopped", "stop_grace_period": null, - "original_compose": "{\n \"name\": \"rqlite\",\n \"services\": {\n \"rqlite\": {\n \"image\": \"rqlite/rqlite:latest\",\n \"restart\": \"unless-stopped\",\n \"ports\": [\n \"4001:4001/tcp\",\n \"4002:4002/tcp\"\n ],\n \"volumes\": [\n \"./file:/rqlite/file\"\n ],\n \"command\": [\n \"-on-disk-path=/rqlite/file\"\n ]\n }\n }\n}" + "original_compose": "{\n \"name\": \"rqlite\",\n \"services\": {\n \"rqlite\": {\n \"image\": \"rqlite/rqlite:latest\",\n \"restart\": \"unless-stopped\",\n \"ports\": [\n \"4001:4001/tcp\",\n \"4002:4002/tcp\"\n ],\n \"volumes\": [\n \"./file:/rqlite/file\"\n ],\n \"command\": [\n \"/rqlite/file\"\n ]\n }\n }\n}" }, "compose_stack": { "project_name": "rqlite", @@ -126,7 +126,7 @@ "./file:/rqlite/file" ], "command": [ - "-on-disk-path=/rqlite/file" + "/rqlite/file" ] } } @@ -363,7 +363,7 @@ "installer_profile": { "runtime": { "command": [ - "-on-disk-path=/rqlite/file" + "/rqlite/file" ] }, "startup_healthcheck": { diff --git a/oci/tests/test_rqlite_profile.py b/oci/tests/test_rqlite_profile.py new file mode 100644 index 00000000..035ee2b2 --- /dev/null +++ b/oci/tests/test_rqlite_profile.py @@ -0,0 +1,27 @@ +"""The rqlite data directory is a positional argument to rqlited.""" + +import json +from pathlib import Path +import unittest + +ROOT = Path(__file__).resolve().parents[1] + + +class RqliteProfileTests(unittest.TestCase): + def test_persistent_data_directory_is_passed_positionally(self): + curated = json.loads((ROOT / "catalog/curated/rqlite.json").read_text()) + app = json.loads((ROOT / "catalog/apps/rqlite.json").read_text()) + self.assertEqual(curated, app) + + data_dir = "/rqlite/file" + self.assertEqual(curated["proxmox"]["installer_profile"]["runtime"]["command"], [data_dir]) + self.assertEqual(curated["compose_stack"]["services"][0]["compose"]["command"], [data_dir]) + original_compose = json.loads(curated["container_contract"]["original_compose"]) + self.assertEqual(original_compose["services"]["rqlite"]["command"], [data_dir]) + + mounted_paths = [volume["container_path"] for volume in curated["container_contract"]["volumes"]] + self.assertIn(data_dir, mounted_paths) + + +if __name__ == "__main__": + unittest.main()