mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 10:52:22 +00:00
oci: fix rqlite data directory argument
This commit is contained in:
@@ -44,8 +44,8 @@
|
|||||||
"revision": "b84d5f9796360a0640baf654cc6c753b78eb5cbe",
|
"revision": "b84d5f9796360a0640baf654cc6c753b78eb5cbe",
|
||||||
"image_repository_url": "https://hub.docker.com/r/rqlite/rqlite",
|
"image_repository_url": "https://hub.docker.com/r/rqlite/rqlite",
|
||||||
"readme_pushed_at": "",
|
"readme_pushed_at": "",
|
||||||
"compose_sha256": "02897034112dbb5ec8ade00916662dbed07356db366083700c3df87ed862ff21",
|
"compose_sha256": "05d6ccf9931bb85374fae008ca8d0b9b40913f9d8db39130c5c5723f56c7683a",
|
||||||
"generated_at": "2026-10-26T00:00:00+00:00",
|
"generated_at": "2026-10-26T07:25:00+00:00",
|
||||||
"readme_raw_url": "https://rqlite.io/docs/"
|
"readme_raw_url": "https://rqlite.io/docs/"
|
||||||
},
|
},
|
||||||
"container_contract": {
|
"container_contract": {
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
"related_services": [],
|
"related_services": [],
|
||||||
"restart": "unless-stopped",
|
"restart": "unless-stopped",
|
||||||
"stop_grace_period": null,
|
"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": {
|
"compose_stack": {
|
||||||
"project_name": "rqlite",
|
"project_name": "rqlite",
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
"./file:/rqlite/file"
|
"./file:/rqlite/file"
|
||||||
],
|
],
|
||||||
"command": [
|
"command": [
|
||||||
"-on-disk-path=/rqlite/file"
|
"/rqlite/file"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,7 +363,7 @@
|
|||||||
"installer_profile": {
|
"installer_profile": {
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"command": [
|
"command": [
|
||||||
"-on-disk-path=/rqlite/file"
|
"/rqlite/file"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"startup_healthcheck": {
|
"startup_healthcheck": {
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
"revision": "b84d5f9796360a0640baf654cc6c753b78eb5cbe",
|
"revision": "b84d5f9796360a0640baf654cc6c753b78eb5cbe",
|
||||||
"image_repository_url": "https://hub.docker.com/r/rqlite/rqlite",
|
"image_repository_url": "https://hub.docker.com/r/rqlite/rqlite",
|
||||||
"readme_pushed_at": "",
|
"readme_pushed_at": "",
|
||||||
"compose_sha256": "02897034112dbb5ec8ade00916662dbed07356db366083700c3df87ed862ff21",
|
"compose_sha256": "05d6ccf9931bb85374fae008ca8d0b9b40913f9d8db39130c5c5723f56c7683a",
|
||||||
"generated_at": "2026-10-26T00:00:00+00:00",
|
"generated_at": "2026-10-26T07:25:00+00:00",
|
||||||
"readme_raw_url": "https://rqlite.io/docs/"
|
"readme_raw_url": "https://rqlite.io/docs/"
|
||||||
},
|
},
|
||||||
"container_contract": {
|
"container_contract": {
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
"related_services": [],
|
"related_services": [],
|
||||||
"restart": "unless-stopped",
|
"restart": "unless-stopped",
|
||||||
"stop_grace_period": null,
|
"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": {
|
"compose_stack": {
|
||||||
"project_name": "rqlite",
|
"project_name": "rqlite",
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
"./file:/rqlite/file"
|
"./file:/rqlite/file"
|
||||||
],
|
],
|
||||||
"command": [
|
"command": [
|
||||||
"-on-disk-path=/rqlite/file"
|
"/rqlite/file"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,7 +363,7 @@
|
|||||||
"installer_profile": {
|
"installer_profile": {
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"command": [
|
"command": [
|
||||||
"-on-disk-path=/rqlite/file"
|
"/rqlite/file"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"startup_healthcheck": {
|
"startup_healthcheck": {
|
||||||
|
|||||||
@@ -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()
|
||||||
Reference in New Issue
Block a user