Skip to content

Commit b661b86

Browse files
Use strictly confined snap
1 parent 8b65855 commit b661b86

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/charm.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ def _on_remove_default_gw_action(self, event: ActionEvent) -> None:
148148
@staticmethod
149149
def _install_srsran() -> None:
150150
"""Installs srsRAN snap."""
151-
shell("snap install srsran --edge --devmode")
151+
shell("snap install srsran --edge")
152+
shell("snap connect srsran:network-control")
153+
shell("snap connect srsran:process-control")
154+
shell("snap connect srsran:system-observe")
152155
logger.info("Installed srsRAN snap")
153156

154157
@staticmethod

tests/unit/test_charm.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ def test_given_unit_is_leader_when_on_install_then_srsran_snap_is_installed(self
4747

4848
self.harness.charm.on.install.emit()
4949

50-
patch_shell.assert_called_with("snap install srsran --edge --devmode")
50+
patch_shell.assert_has_calls(
51+
[
52+
call("snap install srsran --edge"),
53+
call("snap connect srsran:network-control"),
54+
call("snap connect srsran:process-control"),
55+
call("snap connect srsran:system-observe"),
56+
]
57+
)
5158

5259
@patch("charm.shell", new=Mock())
5360
def test_given_unit_is_leader_when_install_then_status_is_maintenance(self):

0 commit comments

Comments
 (0)