Skip to content

Commit

Permalink
Add manifest conditions
Browse files Browse the repository at this point in the history
Check for the existence of the podman.socket for the Cockpit client
scenario.
  • Loading branch information
jelly committed Jun 14, 2023
1 parent ac46469 commit f2852b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"conditions": [
{"path-exists": "/lib/systemd/system/podman.socket"}
],
"menu": {
"index": {
"label": "Podman containers",
Expand Down
14 changes: 14 additions & 0 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -2563,6 +2563,20 @@ class TestApplication(testlib.MachineCase):
b.click(".pf-m-expanded button:contains('Logs')")
b.wait_in_text(".pf-m-expanded .pf-c-empty-state__content", "failed to obtain logs for Container")

@testlib.skipOstree("/lib is read-only")
def testManifest(self):
b = self.browser
m = self.machine
self.restore_file("/lib/systemd/system/podman.socket")
m.execute("rm /lib/systemd/system/podman.socket")
self.login_and_go(None)
b.wait_in_text("#host-apps .pf-m-current", "Overview")

if self.is_pybridge():
self.assertIn("Podman", b.text("#host-apps .pf-m-current"))
else:
self.assertNotIn("Podman", b.text("#host-apps .pf-m-current"))


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

0 comments on commit f2852b4

Please sign in to comment.