mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-10-07 05:56:40 +00:00
test(oci): run Glances port contract in isolation
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
"""Glances' Web UI is the only listener used by the native ``-w`` profile."""
|
"""Glances' Web UI is the only listener used by the native ``-w`` profile."""
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
sys.path.insert(0, str(ROOT / "src"))
|
||||||
|
|
||||||
from proxmenux_oci.catalog import Catalog
|
from proxmenux_oci.catalog import Catalog
|
||||||
|
|
||||||
|
|
||||||
class GlancesPortContractTests(unittest.TestCase):
|
class GlancesPortContractTests(unittest.TestCase):
|
||||||
def test_web_profile_exposes_only_the_web_ui_port(self):
|
def test_web_profile_exposes_only_the_web_ui_port(self):
|
||||||
root = Path(__file__).resolve().parents[1]
|
template = Catalog(ROOT).compose("glances")
|
||||||
template = Catalog(root).compose("glances")
|
|
||||||
|
|
||||||
ports = template["container_contract"]["ports"]
|
ports = template["container_contract"]["ports"]
|
||||||
self.assertEqual([item["container_port"] for item in ports], [61208])
|
self.assertEqual([item["container_port"] for item in ports], [61208])
|
||||||
|
|||||||
Reference in New Issue
Block a user