Skip to content

Commit 36e55a6

Browse files
jellymartinpitt
authored andcommitted
Add manifest conditions
Check for the existence of the podman.socket for the Cockpit client scenario.
1 parent ac46469 commit 36e55a6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"conditions": [
3+
{"path-exists": "/lib/systemd/system/podman.socket"}
4+
],
25
"menu": {
36
"index": {
47
"label": "Podman containers",

test/check-application

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2563,6 +2563,21 @@ class TestApplication(testlib.MachineCase):
25632563
b.click(".pf-m-expanded button:contains('Logs')")
25642564
b.wait_in_text(".pf-m-expanded .pf-c-empty-state__content", "failed to obtain logs for Container")
25652565

2566+
@testlib.skipOstree("/lib is read-only")
2567+
def testManifest(self):
2568+
b = self.browser
2569+
m = self.machine
2570+
self.restore_file("/lib/systemd/system/podman.socket", post_restore_action="systemctl daemon-reload")
2571+
m.execute("rm /lib/systemd/system/podman.socket")
2572+
self.login_and_go(None)
2573+
b.wait_in_text("#host-apps .pf-m-current", "Overview")
2574+
2575+
# HACK: is_pybridge should also check TEST_SCENARIO
2576+
if self.is_pybridge() or os.getenv('TEST_SCENARIO') == 'pybridge':
2577+
self.assertNotIn("Podman", b.text("#host-apps"))
2578+
else:
2579+
self.assertIn("Podman", b.text("#host-apps"))
2580+
25662581

25672582
if __name__ == '__main__':
25682583
testlib.test_main()

0 commit comments

Comments
 (0)